summaryrefslogtreecommitdiff
path: root/tcg/README
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2010-03-05 08:35:07 +0100
committerAurelien Jarno <aurelien@aurel32.net>2010-03-13 11:44:25 +0100
commit4e17eae9f2ee49833698aae2753c5bb041510870 (patch)
treed24fcd7f4f2ba56eabad2a8a4c6f1fb73a24f028 /tcg/README
parent2e21e7491ff2af3628a97d4652e7adcc6961c2e9 (diff)
tcg/arm: correctly save/restore registers in prologue/epilogue
Since commit 6113d6d3169393c323ac4c82d756a850145a5e7a QEMU crashes on ARM hosts. This is not a bug of this commit, but a latent bug revealed by this commit. The TCG code is called through a procedure call using the prologue and epilogue code. This code does not save and restore enough registers. The "Procedure Call Standard for the ARM Architecture" says: A subroutine must preserve the contents of the registers r4-r8, r10,  r11 and SP (and r9 in PCS variants that designate r9 as v6). The current code only saves and restores r9 to r11, and misses r4 to r8. The patch fixes that by saving r4 to r12. Theoretically there is no need to save and restore r12, but an even number of registers have to be saved as per EABI. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/README')
0 files changed, 0 insertions, 0 deletions