Skip to content

Commit 497236a

Browse files
authored
update the location of assert for REG_ZR check (#112294)
* update the location of assert for REG_ZR check * encodeZRtoSP() in caller
1 parent 826d931 commit 497236a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/coreclr/jit/emitarm64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8012,7 +8012,7 @@ void emitter::emitIns_R_S(instruction ins, emitAttr attr, regNumber reg1, int va
80128012
regNumber rsvdReg = codeGen->rsGetRsvdReg();
80138013

80148014
// add rsvd, fp, #imm
8015-
emitIns_R_R_Imm(INS_add, EA_8BYTE, rsvdReg, reg2, imm);
8015+
emitIns_R_R_Imm(INS_add, EA_8BYTE, rsvdReg, encodingZRtoSP(reg2), imm);
80168016
// str p0, [rsvd, #0, mul vl]
80178017
emitIns_R_R_I(ins, attr, reg1, rsvdReg, 0);
80188018

@@ -8285,7 +8285,7 @@ void emitter::emitIns_S_R(instruction ins, emitAttr attr, regNumber reg1, int va
82858285
regNumber rsvdReg = codeGen->rsGetRsvdReg();
82868286

82878287
// add rsvd, fp, #imm
8288-
emitIns_R_R_Imm(INS_add, EA_8BYTE, rsvdReg, reg2, imm);
8288+
emitIns_R_R_Imm(INS_add, EA_8BYTE, rsvdReg, encodingZRtoSP(reg2), imm);
82898289
// str p0, [rsvd, #0, mul vl]
82908290
emitIns_R_R_I(ins, attr, reg1, rsvdReg, 0);
82918291

0 commit comments

Comments
 (0)