diff options
author | Adam Nemet <anemet@lnxw.com> | 2002-08-08 11:08:34 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2002-08-08 11:08:34 +0000 |
commit | aeaf4d25a8a6a06c8dd8735e0a9b3608acc10d3f (patch) | |
tree | 93cd6302918d1181eda42bc96399b563baaea6e1 /gcc/config/arm/arm.h | |
parent | 5bfc90dea315f4ec135119a3526741e8fa6deb48 (diff) | |
download | gcc-aeaf4d25a8a6a06c8dd8735e0a9b3608acc10d3f.zip gcc-aeaf4d25a8a6a06c8dd8735e0a9b3608acc10d3f.tar.gz gcc-aeaf4d25a8a6a06c8dd8735e0a9b3608acc10d3f.tar.bz2 |
arm.c (thumb_unexpanded_epilogue): Stack the PIC register.
* config/arm/arm.c (thumb_unexpanded_epilogue): Stack the PIC register.
(thumb_expand_prologue): Likewise.
(thumb_output_function_prologue): Likewise.
* config/arm/arm.h (THUMB_INITIAL_ELIMINATION_OFFSET): Account for the
additional push of the PIC register.
From-SVN: r56128
Diffstat (limited to 'gcc/config/arm/arm.h')
-rw-r--r-- | gcc/config/arm/arm.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index aee6484..64e7187 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -1621,7 +1621,13 @@ typedef struct ((TO) == ARM_HARD_FRAME_POINTER_REGNUM && TARGET_THUMB) ? 0 : \ ((TO) == THUMB_HARD_FRAME_POINTER_REGNUM && TARGET_ARM) ? 0 : \ 1) - + +#define THUMB_REG_PUSHED_P(reg) \ + (regs_ever_live [reg] \ + && (! call_used_regs [reg] \ + || (flag_pic && (reg) == PIC_OFFSET_TABLE_REGNUM)) \ + && !(TARGET_SINGLE_PIC_BASE && ((reg) == arm_pic_register))) + /* Define the offset between two registers, one to be eliminated, and the other its replacement, at the start of a routine. */ #define ARM_INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ @@ -1640,13 +1646,13 @@ typedef struct int count_regs = 0; \ int regno; \ for (regno = 8; regno < 13; regno ++) \ - if (regs_ever_live[regno] && ! call_used_regs[regno]) \ - count_regs ++; \ + if (THUMB_REG_PUSHED_P (regno)) \ + count_regs ++; \ if (count_regs) \ (OFFSET) += 4 * count_regs; \ count_regs = 0; \ for (regno = 0; regno <= LAST_LO_REGNUM; regno ++) \ - if (regs_ever_live[regno] && ! call_used_regs[regno]) \ + if (THUMB_REG_PUSHED_P (regno)) \ count_regs ++; \ if (count_regs || ! leaf_function_p () || thumb_far_jump_used_p (0))\ (OFFSET) += 4 * (count_regs + 1); \ |