diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-04 15:33:03 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-04 15:33:03 +0000 |
commit | f843e5282a67aeaafd6309e9ce6b633e13e6744c (patch) | |
tree | 2fc9bd8ff1403df02a0f3edba5bd9d17e6d4e6f5 /tcg/sparc | |
parent | 762e823086ad37453c2308bccf01223f07759eab (diff) | |
download | qemu-f843e5282a67aeaafd6309e9ce6b633e13e6744c.zip qemu-f843e5282a67aeaafd6309e9ce6b633e13e6744c.tar.gz qemu-f843e5282a67aeaafd6309e9ce6b633e13e6744c.tar.bz2 |
Allocate space for static call args, increase stack frame size on Sparc64
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6973 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tcg/sparc')
-rw-r--r-- | tcg/sparc/tcg-target.c | 18 | ||||
-rw-r--r-- | tcg/sparc/tcg-target.h | 8 |
2 files changed, 17 insertions, 9 deletions
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 2c571a7..ea08aa7 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/sparc/tcg-target.c @@ -578,9 +578,11 @@ static void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args, global registers */ // delay slot tcg_out_ldst(s, TCG_AREG0, TCG_REG_CALL_STACK, - TCG_TARGET_CALL_STACK_OFFSET - sizeof(long), HOST_ST_OP); + TCG_TARGET_CALL_STACK_OFFSET - TCG_STATIC_CALL_ARGS_SIZE - + sizeof(long), HOST_ST_OP); tcg_out_ldst(s, TCG_AREG0, TCG_REG_CALL_STACK, - TCG_TARGET_CALL_STACK_OFFSET - sizeof(long), HOST_LD_OP); + TCG_TARGET_CALL_STACK_OFFSET - TCG_STATIC_CALL_ARGS_SIZE - + sizeof(long), HOST_LD_OP); /* data_reg = sign_extend(arg0) */ switch(opc) { @@ -781,9 +783,11 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, global registers */ // delay slot tcg_out_ldst(s, TCG_AREG0, TCG_REG_CALL_STACK, - TCG_TARGET_CALL_STACK_OFFSET - sizeof(long), HOST_ST_OP); + TCG_TARGET_CALL_STACK_OFFSET - TCG_STATIC_CALL_ARGS_SIZE - + sizeof(long), HOST_ST_OP); tcg_out_ldst(s, TCG_AREG0, TCG_REG_CALL_STACK, - TCG_TARGET_CALL_STACK_OFFSET - sizeof(long), HOST_LD_OP); + TCG_TARGET_CALL_STACK_OFFSET - TCG_STATIC_CALL_ARGS_SIZE - + sizeof(long), HOST_LD_OP); /* will become: ba label2 */ @@ -905,9 +909,11 @@ static inline void tcg_out_op(TCGContext *s, int opc, const TCGArg *args, global registers */ // delay slot tcg_out_ldst(s, TCG_AREG0, TCG_REG_CALL_STACK, - TCG_TARGET_CALL_STACK_OFFSET - sizeof(long), HOST_ST_OP); + TCG_TARGET_CALL_STACK_OFFSET - TCG_STATIC_CALL_ARGS_SIZE - + sizeof(long), HOST_ST_OP); tcg_out_ldst(s, TCG_AREG0, TCG_REG_CALL_STACK, - TCG_TARGET_CALL_STACK_OFFSET - sizeof(long), HOST_LD_OP); + TCG_TARGET_CALL_STACK_OFFSET - TCG_STATIC_CALL_ARGS_SIZE - + sizeof(long), HOST_LD_OP); break; case INDEX_op_jmp: case INDEX_op_br: diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h index 43ec818..97f3533 100644 --- a/tcg/sparc/tcg-target.h +++ b/tcg/sparc/tcg-target.h @@ -75,12 +75,14 @@ enum { #define TCG_REG_CALL_STACK TCG_REG_I6 #ifdef __arch64__ // Reserve space for AREG0 -#define TCG_TARGET_STACK_MINFRAME (176 + 2 * (int)sizeof(long)) -#define TCG_TARGET_CALL_STACK_OFFSET (2047 + TCG_TARGET_STACK_MINFRAME) +#define TCG_TARGET_STACK_MINFRAME (176 + 4 * (int)sizeof(long) + \ + TCG_STATIC_CALL_ARGS_SIZE) +#define TCG_TARGET_CALL_STACK_OFFSET (2047 - 16) #define TCG_TARGET_STACK_ALIGN 16 #else // AREG0 + one word for alignment -#define TCG_TARGET_STACK_MINFRAME (92 + (2 + 1) * (int)sizeof(long)) +#define TCG_TARGET_STACK_MINFRAME (92 + (2 + 1) * (int)sizeof(long) + \ + TCG_STATIC_CALL_ARGS_SIZE) #define TCG_TARGET_CALL_STACK_OFFSET TCG_TARGET_STACK_MINFRAME #define TCG_TARGET_STACK_ALIGN 8 #endif |