YJIT: A64: In CPopAll, pop into the register before using MSR

Or else we put garbage into the flags.
This commit is contained in:
Alan Wu 2026-01-13 23:15:47 -05:00
parent 9f3225d0c5
commit cdb2b0eed5
Notes: git 2026-01-14 22:20:25 +00:00

View File

@ -1155,8 +1155,8 @@ impl Assembler
let regs = Assembler::get_caller_save_regs();
// Pop the state/flags register
msr(cb, SystemRegister::NZCV, Self::SCRATCH0);
emit_pop(cb, Self::SCRATCH0);
msr(cb, SystemRegister::NZCV, Self::SCRATCH0);
for reg in regs.into_iter().rev() {
emit_pop(cb, A64Opnd::Reg(reg));