backend/arm64: Properly return halt reason (#713)

This commit is contained in:
SachinVin 2022-11-06 01:02:48 +05:30 committed by GitHub
parent 848e0913df
commit b5ad066372
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,6 +192,12 @@ void A32AddressSpace::EmitPrelude() {
code.LDR(Wscratch0, SP, offsetof(StackLayout, save_host_fpcr)); code.LDR(Wscratch0, SP, offsetof(StackLayout, save_host_fpcr));
code.MSR(oaknut::SystemReg::FPCR, Xscratch0); code.MSR(oaknut::SystemReg::FPCR, Xscratch0);
oaknut::Label exit_hr_loop;
code.l(exit_hr_loop);
code.LDAXR(W0, Xhalt);
code.STLXR(Wscratch0, WZR, Xhalt);
code.CBNZ(Wscratch0, exit_hr_loop);
ABI_PopRegisters(code, ABI_CALLEE_SAVE | (1 << 30), sizeof(StackLayout)); ABI_PopRegisters(code, ABI_CALLEE_SAVE | (1 << 30), sizeof(StackLayout));
code.RET(); code.RET();