aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2010-03-20 12:27:42 +0100
committerAurelien Jarno <aurelien@aurel32.net>2010-03-20 12:27:42 +0100
commit9e97d8e9418ddd8f26a2aa4dbb80853d3e8af392 (patch)
tree64e9cb2039d6a0c041592b7abc96c7973df268cf
parent26c5d372e4848cbe85bcda10a4c5e98ad3aa051a (diff)
tcg/arm: don't save/restore r7 in prologue/epilogue
There is no need to save r7, it is used to store the address of the env structure and is not modified by GCC. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r--tcg/arm/tcg-target.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c
index b50bb762a6..1d8debe153 100644
--- a/tcg/arm/tcg-target.c
+++ b/tcg/arm/tcg-target.c
@@ -1676,15 +1676,15 @@ static inline void tcg_out_movi(TCGContext *s, TCGType type,
void tcg_target_qemu_prologue(TCGContext *s)
{
- /* Theoretically there is no need to save r12, but an
- even number of registers to be saved as per EABI */
+ /* There is no need to save r7, it is used to store the address
+ of the env structure and is not modified by GCC. */
- /* stmdb sp!, { r4 - r12, lr } */
- tcg_out32(s, (COND_AL << 28) | 0x092d5ff0);
+ /* stmdb sp!, { r4 - r6, r8 - r11, lr } */
+ tcg_out32(s, (COND_AL << 28) | 0x092d4f70);
tcg_out_bx(s, COND_AL, TCG_REG_R0);
tb_ret_addr = s->code_ptr;
- /* ldmia sp!, { r4 - r12, pc } */
- tcg_out32(s, (COND_AL << 28) | 0x08bd9ff0);
+ /* ldmia sp!, { r4 - r6, r8 - r11, pc } */
+ tcg_out32(s, (COND_AL << 28) | 0x08bd8f70);
}