--- gcc/config/a29k/a29k.h 2018/04/24 18:21:47 1.1.1.3 +++ gcc/config/a29k/a29k.h 2018/04/24 18:29:18 1.1.1.4 @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for AMD Am29000 CPU. - Copyright (C) 1988, 90, 91, 92, 93, 1994 Free Software Foundation, Inc. + Copyright (C) 1988, 90-94, 1995 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) This file is part of GNU CC. @@ -16,7 +16,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ /* Names to predefine in the preprocessor for this target machine. */ @@ -90,6 +91,11 @@ extern int target_flags; #define TARGET_SOFT_FLOAT (target_flags & 512) +/* This means that we should not emit the multm or mutmu instructions + that some embedded systems' trap handlers don't support. */ + +#define TARGET_MULTM ((target_flags & 1024) == 0) + #define TARGET_SWITCHES \ { {"dw", 1}, \ {"ndw", -1}, \ @@ -109,6 +115,7 @@ extern int target_flags; {"reuse-arg-regs", -256}, \ {"no-reuse-arg-regs", 256}, \ {"soft-float", 512}, \ + {"no-multm", 1024}, \ {"", TARGET_DEFAULT}} #define TARGET_DEFAULT 3 @@ -724,11 +731,12 @@ extern struct rtx_def *a29k_get_reloaded /* Value is the number of bytes of arguments automatically popped when returning from a subroutine call. + FUNDECL is the declaration node of the function (as a tree), FUNTYPE is the data type of the function (as a tree), or for a library call it is an identifier node for the subroutine name. SIZE is the number of bytes of arguments passed on the stack. */ -#define RETURN_POPS_ARGS(FUNTYPE,SIZE) 0 +#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 /* Define how to find the value returned by a function. VALTYPE is the data type of the value (as a tree). @@ -777,19 +785,21 @@ extern struct rtx_def *a29k_get_reloaded /* Same, but called for incoming args. On the 29k, we use this to set all argument registers to fixed and - set the last 16 local regs (lr112-lr127) to available. Some - will later be changed to call-saved by FUNCTION_INCOMING_ARG. */ + set the last 16 local regs, less two, (lr110-lr125) to available. Some + will later be changed to call-saved by FUNCTION_INCOMING_ARG. + lr126,lr127 are always fixed, they are place holders for the caller's + lr0,lr1. */ -#define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,IGNORE) \ +#define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,IGNORE) \ { int i; \ - for (i = R_AR (0); i < R_AR (16); i++) \ + for (i = R_AR (0) - 2; i < R_AR (16); i++) \ { \ fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 1; \ SET_HARD_REG_BIT (fixed_reg_set, i); \ SET_HARD_REG_BIT (call_used_reg_set, i); \ SET_HARD_REG_BIT (call_fixed_reg_set, i); \ } \ - for (i = R_LR (112); i < R_LR (128); i++) \ + for (i = R_LR (110); i < R_LR (126); i++) \ { \ fixed_regs[i] = call_used_regs[i] = call_fixed_regs[i] = 0; \ CLEAR_HARD_REG_BIT (fixed_reg_set, i); \ @@ -1082,10 +1092,10 @@ extern char *a29k_function_name; /* Maximum number of registers that can appear in a valid memory address. */ #define MAX_REGS_PER_ADDRESS 1 -/* Recognize any constant value that is a valid address. +/* Recognize any constant value that is a valid address. */ - None are on the 29K. */ -#define CONSTANT_ADDRESS_P(X) 0 +#define CONSTANT_ADDRESS_P(X) \ +(GET_CODE (X) == CONST_INT && (unsigned) INTVAL (X) < 0x100) /* Include all constant integers and constant doubles */ #define LEGITIMATE_CONSTANT_P(X) 1 @@ -1433,6 +1443,12 @@ literal_section () \ extern int a29k_debug_reg_map[]; #define DBX_REGISTER_NUMBER(REGNO) a29k_debug_reg_map[REGNO] +/* This how to write an assembler directive to FILE to switch to + section NAME for DECL. */ + +#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \ + fprintf (FILE, "\t.sect %s, bss\n\t.use %s\n", NAME, NAME) + /* This is how to output the definition of a user-level label named NAME, such as the label on a static function or variable NAME. */