diff --git a/internal/decoder/generic_amd64_go116.go b/internal/decoder/generic_amd64_go116.go index b597043f9..8ce4bd880 100644 --- a/internal/decoder/generic_amd64_go116.go +++ b/internal/decoder/generic_amd64_go116.go @@ -645,7 +645,8 @@ func (self *_ValueDecoder) compile() { self.Emit("MOVQ", _R8, _VAR_cs_p) self.Emit("MOVQ", _AX, _VAR_cs_n) self.Emit("MOVQ", _DI, _VAR_cs_LR) - self.Emit("MOVQ", _T_byte, jit.Ptr(_SP, 0)) + self.Emit("MOVQ", _T_byte, _R8) + self.Emit("MOVQ", _R8, jit.Ptr(_SP, 0)) self.Emit("MOVQ", _AX, jit.Ptr(_SP, 8)) self.Emit("MOVQ", _AX, jit.Ptr(_SP, 16)) self.call_go(_F_makeslice) diff --git a/internal/encoder/assembler_amd64_go116.go b/internal/encoder/assembler_amd64_go116.go index d056259f2..40497d60b 100644 --- a/internal/encoder/assembler_amd64_go116.go +++ b/internal/encoder/assembler_amd64_go116.go @@ -579,7 +579,8 @@ var ( func (self *_Assembler) more_space() { self.Link(_LB_more_space) - self.Emit("MOVQ", _T_byte, jit.Ptr(_SP, 0)) // MOVQ $_T_byte, (SP) + self.Emit("MOVQ", _T_byte, _AX) // MOVQ $_T_byte, _AX + self.Emit("MOVQ", _AX, jit.Ptr(_SP, 0)) // MOVQ _AX, (SP) self.Emit("MOVQ", _RP, jit.Ptr(_SP, 8)) // MOVQ RP, 8(SP) self.Emit("MOVQ", _RL, jit.Ptr(_SP, 16)) // MOVQ RL, 16(SP) self.Emit("MOVQ", _RC, jit.Ptr(_SP, 24)) // MOVQ RC, 24(SP)