From 9a15fa2f1a2b44b40a5e9ad591849bfadd1ba7ee Mon Sep 17 00:00:00 2001 From: "duanyi.aster" Date: Tue, 29 Oct 2024 21:55:26 +0800 Subject: [PATCH] fix:(encoder) incorrectly pass pv due to wrongly use `BTC` instead of `BTS` --- 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