summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/java/org
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2023-08-27 13:48:22 +0200
committerJosJuice <josjuice@gmail.com>2023-08-29 19:05:26 +0200
commit8c2c665af3c00205b94069a24d8ca76e0a2365fa (patch)
treef30f8fa1520e58a41f327325a1e82395c3ef18f9 /Source/Android/app/src/main/java/org
parent7ac0db70c661abc4f648b4f5d970eb8d2a8053c6 (diff)
Jit: Check MSR state in BLR optimization
When we execute a JIT block, we have to make sure that both the PC and the DR/IR bits of MSR are the same as they were when the block was compiled. When jumping to a block from the dispatcher, this is done in the way you would expect: By checking the PC and the relevant MSR bits. However, when returning to a block using the BLR optimization, we only check the PC. Checking the MSR bits is done by instead resetting the stack when the MSR changes, making PC checks afterwards fail. Except... We were only resetting the stack on rfi instructions. There are actually many more ways for the MSR to change, and we weren't covering those at all. I looked into resetting the stack on all of them, but it would be pretty cumbersome both in terms of writing the code and in terms of how often at runtime we'd have to reset the stack, so I think the better option would be to check the MSR bits along with the PC. That's what this commit implements.
Diffstat (limited to 'Source/Android/app/src/main/java/org')
0 files changed, 0 insertions, 0 deletions