From 8203bbac352a42ab8e29cbed50e2f7c9c8bfb09c Mon Sep 17 00:00:00 2001 From: Yi Duan Date: Mon, 20 Dec 2021 17:26:19 +0800 Subject: [PATCH] fix: remove stack writeBarrier for encoder (#159) Co-authored-by: duanyi.aster --- encoder/assembler_amd64_go116.go | 2 +- encoder/assembler_amd64_go117.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/encoder/assembler_amd64_go116.go b/encoder/assembler_amd64_go116.go index e68e0186d..a4c4d8565 100644 --- a/encoder/assembler_amd64_go116.go +++ b/encoder/assembler_amd64_go116.go @@ -463,7 +463,7 @@ func (self *_Assembler) prep_buffer_c() { func (self *_Assembler) save_buffer() { self.Emit("MOVQ", _ARG_rb, _CX) // MOVQ rb<>+0(FP), CX - self.WriteRecNotAX(2, _RP, jit.Ptr(_CX, 0)) // MOVQ RP, (CX) + self.Emit("MOVQ", _RP, jit.Ptr(_CX, 0)) // MOVQ RP, (CX) self.Emit("MOVQ", _RL, jit.Ptr(_CX, 8)) // MOVQ RL, 8(CX) self.Emit("MOVQ", _RC, jit.Ptr(_CX, 16)) // MOVQ RC, 16(CX) } diff --git a/encoder/assembler_amd64_go117.go b/encoder/assembler_amd64_go117.go index 6e4454352..818e1d3da 100644 --- a/encoder/assembler_amd64_go117.go +++ b/encoder/assembler_amd64_go117.go @@ -469,7 +469,7 @@ func (self *_Assembler) prep_buffer_AX() { func (self *_Assembler) save_buffer() { self.Emit("MOVQ", _ARG_rb, _CX) // MOVQ rb<>+0(FP), CX - self.WriteRecNotAX(2, _RP, jit.Ptr(_CX, 0)) // MOVQ RP, (CX) + self.Emit("MOVQ", _RP, jit.Ptr(_CX, 0)) // MOVQ RP, (CX) self.Emit("MOVQ", _RL, jit.Ptr(_CX, 8)) // MOVQ RL, 8(CX) self.Emit("MOVQ", _RC, jit.Ptr(_CX, 16)) // MOVQ RC, 16(CX) }