Skip to content

Commit cdb2b0e

Browse files
committed
YJIT: A64: In CPopAll, pop into the register before using MSR
Or else we put garbage into the flags.
1 parent 9f3225d commit cdb2b0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

yjit/src/backend/arm64/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,8 +1155,8 @@ impl Assembler
11551155
let regs = Assembler::get_caller_save_regs();
11561156

11571157
// Pop the state/flags register
1158-
msr(cb, SystemRegister::NZCV, Self::SCRATCH0);
11591158
emit_pop(cb, Self::SCRATCH0);
1159+
msr(cb, SystemRegister::NZCV, Self::SCRATCH0);
11601160

11611161
for reg in regs.into_iter().rev() {
11621162
emit_pop(cb, A64Opnd::Reg(reg));

0 commit comments

Comments
 (0)