diff options
author | obrien <obrien@FreeBSD.org> | 2002-05-09 20:02:13 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-05-09 20:02:13 +0000 |
commit | c8f5fc7032940ad6633f932ac40cade82ec4d0cc (patch) | |
tree | 29a0f0a6c79a69ecc64f612947a0fe5904311713 /contrib/gcc/config/arm/arm.h | |
parent | c9ab9ae440a8066b2c2b85b157b1fdadcf09916a (diff) | |
download | FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.zip FreeBSD-src-c8f5fc7032940ad6633f932ac40cade82ec4d0cc.tar.gz |
Gcc 3.1.0 pre-release from the FSF anoncvs repo on 9-May-2002 15:57:15 EDT.
Diffstat (limited to 'contrib/gcc/config/arm/arm.h')
-rw-r--r-- | contrib/gcc/config/arm/arm.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/contrib/gcc/config/arm/arm.h b/contrib/gcc/config/arm/arm.h index 46f938e..5e8b5d9 100644 --- a/contrib/gcc/config/arm/arm.h +++ b/contrib/gcc/config/arm/arm.h @@ -81,8 +81,6 @@ extern struct rtx_def * pool_vector_label; /* Set to 1 when a return insn is output, this means that the epilogue is not needed. */ extern int return_used_this_function; -/* Nonzero if the prologue must setup `fp'. */ -extern int current_function_anonymous_args; /* Just in case configure has failed to define anything. */ #ifndef TARGET_CPU_DEFAULT @@ -855,7 +853,7 @@ extern const char * structure_size_string; regno <= LAST_ARM_FP_REGNUM; ++regno) \ fixed_regs[regno] = call_used_regs[regno] = 1; \ } \ - if (flag_pic) \ + if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) \ { \ fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ @@ -1029,6 +1027,13 @@ extern const char * structure_size_string; 16, 17, 18, 19, 20, 21, 22, 23, \ 24, 25, 26 \ } + +/* Interrupt functions can only use registers that have already been + saved by the prologue, even if they would normally be + call-clobbered. */ +#define HARD_REGNO_RENAME_OK(SRC, DST) \ + (! IS_INTERRUPT (cfun->machine->func_type) || \ + regs_ever_live[DST]) /* Register and constant classes. */ @@ -1454,6 +1459,8 @@ typedef struct machine_function int lr_save_eliminated; /* Records the type of the current function. */ unsigned long func_type; + /* Record if the function has a variable argument list. */ + int uses_anonymous_args; } machine_function; @@ -1536,8 +1543,7 @@ typedef struct that way. */ #define SETUP_INCOMING_VARARGS(CUM, MODE, TYPE, PRETEND_SIZE, NO_RTL) \ { \ - extern int current_function_anonymous_args; \ - current_function_anonymous_args = 1; \ + cfun->machine->uses_anonymous_args = 1; \ if ((CUM).nregs < NUM_ARG_REGS) \ (PRETEND_SIZE) = (NUM_ARG_REGS - (CUM).nregs) * UNITS_PER_WORD; \ } @@ -1844,7 +1850,8 @@ typedef struct #define THUMB_LEGITIMATE_CONSTANT_P(X) \ ( GET_CODE (X) == CONST_INT \ || GET_CODE (X) == CONST_DOUBLE \ - || CONSTANT_ADDRESS_P (X)) + || CONSTANT_ADDRESS_P (X) \ + || flag_pic) #define LEGITIMATE_CONSTANT_P(X) \ (TARGET_ARM ? ARM_LEGITIMATE_CONSTANT_P (X) : THUMB_LEGITIMATE_CONSTANT_P (X)) @@ -1892,9 +1899,9 @@ typedef struct or known to be defined in this file then encode a short call flag. This macro is used inside the ENCODE_SECTION macro. */ #define ARM_ENCODE_CALL_TYPE(decl) \ - if (TREE_CODE (decl) == FUNCTION_DECL) \ + if (TREE_CODE_CLASS (TREE_CODE (decl)) == 'd') \ { \ - if (DECL_WEAK (decl)) \ + if (TREE_CODE (decl) == FUNCTION_DECL && DECL_WEAK (decl)) \ arm_encode_call_attribute (decl, LONG_CALL_FLAG_CHAR); \ else if (! TREE_PUBLIC (decl)) \ arm_encode_call_attribute (decl, SHORT_CALL_FLAG_CHAR); \ |