3 ms·
There's a good question in the comments there that I still don't see the answer to. How does this work if there's an interrupt between the branch and the endbra
by dataflow 3y ago
There's a good question in the comments there that I still don't see the answer to. How does this work if there's an interrupt between the branch and the endbranch? Does the OS need to save/restore the "branchness" bit?
- drdrey 3y agothere is no branchness bit, if there's an endbranch you can jump to it
- dataflow 3y agoAh so when you return from an interrupt, the check is no longer done?
- simcop2387 3y agoI'd assume so since it wouldn't be a call/jmp coming from a computed address in a register. That said I haven't read the documentation for any of this. But interrupts should be having a stack pointer change and other things happening that would be different, which is why they use the IRET instruction and not the RET one.
- muricula 3y agoYes, on arm the branch type is saved in SPSR_EL1 in the BTYPE field. That stands for Saved Program State Register for Kernel Mode (Exception Level 1) and Branch Type. https://developer.arm.com/documentation/ddi0595/2021-12/AArch64-Registers/SPSR-EL1--Saved-Program-Status-Register--EL1- https://developer.arm.com/documentation/ddi0595/2021-12/AArc...