diff options
Diffstat (limited to 'gcc/config/arc/arc.h')
-rw-r--r-- | gcc/config/arc/arc.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 523ea72a57b..67b9fad3ab3 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -372,6 +372,16 @@ if (GET_MODE_CLASS (MODE) == MODE_INT \ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, \ 27, 28, 29, 30 } +/* Macro to conditionally modify fixed_regs/call_used_regs. */ +#define CONDITIONAL_REGISTER_USAGE \ +do { \ + if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) \ + { \ + fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ + call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ + } \ +} while (0) + /* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. This is ordinarily the length in words of a value of mode MODE @@ -1169,7 +1179,7 @@ do { \ pointer and frame pointer registers. If this macro is not defined, it is up to the machine-dependent files to allocate such a register (if necessary). */ -#define PIC_OFFSET_TABLE_REGNUM 26 +#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 26 : INVALID_REGNUM) /* Define this macro if the register defined by PIC_OFFSET_TABLE_REGNUM is clobbered by calls. Do not define this macro if PIC_OFFSET_TABLE_REGNUM |