From b1872c15f8bd05c7969824ab64c65cd1475382de Mon Sep 17 00:00:00 2001 From: Yi Duan Date: Tue, 5 Nov 2024 15:54:45 +0800 Subject: [PATCH] fix:(encoder) incorrectly pass pv due to wrongly use `BTC` instead of `BTS` (#706) --- internal/encoder/x86/assembler_regabi_amd64.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/encoder/x86/assembler_regabi_amd64.go b/internal/encoder/x86/assembler_regabi_amd64.go index 75e3ecde6..95f452a02 100644 --- a/internal/encoder/x86/assembler_regabi_amd64.go +++ b/internal/encoder/x86/assembler_regabi_amd64.go @@ -1050,8 +1050,9 @@ func (self *Assembler) _asm_OP_recurse(p *ir.Instr) { self.Emit("MOVQ", _ST, _DI) // MOVQ ST, DI self.Emit("MOVQ", _ARG_fv, _SI) // MOVQ $fv, SI if pv { - self.Emit("BTCQ", jit.Imm(alg.BitPointerValue), _SI) // BTCQ $1, SI + self.Emit("BTSQ", jit.Imm(alg.BitPointerValue), _SI) // BTSQ $1, SI } + self.call_encoder(_F_encodeTypedPointer) // CALL encodeTypedPointer self.Emit("TESTQ", _ET, _ET) // TESTQ ET, ET self.Sjmp("JNZ", _LB_error) // JNZ _error