Index: gcc/gcc/config/sparc/sparc.h |
diff --git a/gcc/gcc/config/sparc/sparc.h b/gcc/gcc/config/sparc/sparc.h |
index 35a4c1e079cf383a1d47219d772806143e3d2cda..b4b43c0512662318017cf40de27598686e82e300 100644 |
--- a/gcc/gcc/config/sparc/sparc.h |
+++ b/gcc/gcc/config/sparc/sparc.h |
@@ -1,6 +1,6 @@ |
/* Definitions of target machine for GNU compiler, for Sun SPARC. |
Copyright (C) 1987, 1988, 1989, 1992, 1994, 1995, 1996, 1997, 1998, 1999 |
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
Free Software Foundation, Inc. |
Contributed by Michael Tiemann (tiemann@cygnus.com). |
64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, |
@@ -625,25 +625,17 @@ extern struct sparc_cpu_select sparc_select[]; |
/* The widest floating-point format really supported by the hardware. */ |
#define WIDEST_HARDWARE_FP_SIZE 64 |
-/* Width in bits of a pointer. |
- See also the macro `Pmode' defined below. */ |
+/* Width in bits of a pointer. This is the size of ptr_mode. */ |
#define POINTER_SIZE (TARGET_PTR64 ? 64 : 32) |
+/* This is the machine mode used for addresses. */ |
+#define Pmode (TARGET_ARCH64 ? DImode : SImode) |
+ |
/* If we have to extend pointers (only when TARGET_ARCH64 and not |
TARGET_PTR64), we want to do it unsigned. This macro does nothing |
if ptr_mode and Pmode are the same. */ |
#define POINTERS_EXTEND_UNSIGNED 1 |
-/* For TARGET_ARCH64 we need this, as we don't have instructions |
- for arithmetic operations which do zero/sign extension at the same time, |
- so without this we end up with a srl/sra after every assignment to an |
- user variable, which means very very bad code. */ |
-#define PROMOTE_FUNCTION_MODE(MODE, UNSIGNEDP, TYPE) \ |
-if (TARGET_ARCH64 \ |
- && GET_MODE_CLASS (MODE) == MODE_INT \ |
- && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ |
- (MODE) = word_mode; |
- |
/* Allocation boundary (in *bits*) for storing arguments in argument list. */ |
#define PARM_BOUNDARY (TARGET_ARCH64 ? 64 : 32) |
@@ -965,13 +957,6 @@ extern int sparc_mode_class[]; |
} \ |
} while (0) |
-/* Value should be nonzero if functions must have frame pointers. |
- Zero means the frame pointer need not be set up (and parms |
- may be accessed via the stack pointer) in functions that seem suitable. |
- Used in flow.c, global.c, ra.c and reload1.c. */ |
-#define FRAME_POINTER_REQUIRED \ |
- (! (leaf_function_p () && only_leaf_regs_used ())) |
- |
/* Base register for access to arguments of the function. */ |
#define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM |
@@ -1083,6 +1068,15 @@ enum reg_class { NO_REGS, FPCC_REGS, I64_REGS, GENERAL_REGS, FP_REGS, |
{-1, -1, -1, 0x20}, /* GENERAL_OR_EXTRA_FP_REGS */ \ |
{-1, -1, -1, 0x3f}} /* ALL_REGS */ |
+/* The same information, inverted: |
+ Return the class number of the smallest class containing |
+ reg number REGNO. This could be a conditional expression |
+ or could index an array. */ |
+ |
+extern enum reg_class sparc_regno_reg_class[FIRST_PSEUDO_REGISTER]; |
+ |
+#define REGNO_REG_CLASS(REGNO) sparc_regno_reg_class[(REGNO)] |
+ |
/* The following macro defines cover classes for Integrated Register |
Allocator. Cover classes is a set of non-intersected register |
classes covering all hard registers used for register allocation |
@@ -1110,15 +1104,6 @@ enum reg_class { NO_REGS, FPCC_REGS, I64_REGS, GENERAL_REGS, FP_REGS, |
&& GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) \ |
? reg_classes_intersect_p (CLASS, FP_REGS) : 0) |
-/* The same information, inverted: |
- Return the class number of the smallest class containing |
- reg number REGNO. This could be a conditional expression |
- or could index an array. */ |
- |
-extern enum reg_class sparc_regno_reg_class[FIRST_PSEUDO_REGISTER]; |
- |
-#define REGNO_REG_CLASS(REGNO) sparc_regno_reg_class[(REGNO)] |
- |
/* This is the order in which to allocate registers normally. |
We put %f0-%f7 last among the float registers, so as to make it more |
@@ -1384,13 +1369,6 @@ extern char leaf_reg_remap[]; |
{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ |
{ FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM} } |
-/* The way this is structured, we can't eliminate SFP in favor of SP |
- if the frame pointer is required: we want to use the SFP->HFP elimination |
- in that case. But the test in update_eliminables doesn't know we are |
- assuming below that we only do the former elimination. */ |
-#define CAN_ELIMINATE(FROM, TO) \ |
- ((TO) == HARD_FRAME_POINTER_REGNUM || !FRAME_POINTER_REQUIRED) |
- |
/* We always pretend that this is a leaf function because if it's not, |
there's no point in trying to eliminate the frame pointer. If it |
is a leaf function, we guessed right! */ |
@@ -1556,14 +1534,6 @@ function_arg_padding ((MODE), (TYPE)) |
&& (GET_MODE_ALIGNMENT (MODE) == 128 \ |
|| ((TYPE) && TYPE_ALIGN (TYPE) == 128))) \ |
? 128 : PARM_BOUNDARY) |
- |
-/* Define the information needed to generate branch and scc insns. This is |
- stored from the compare operation. Note that we can't use "rtx" here |
- since it hasn't been defined! */ |
- |
-extern GTY(()) rtx sparc_compare_op0; |
-extern GTY(()) rtx sparc_compare_op1; |
-extern GTY(()) rtx sparc_compare_emitted; |
/* Generate the special assembly code needed to tell the assembler whatever |
@@ -1642,16 +1612,6 @@ do { \ |
#define TRAMPOLINE_SIZE (TARGET_ARCH64 ? 32 : 16) |
#define TRAMPOLINE_ALIGNMENT 128 /* 16 bytes */ |
- |
-/* Emit RTL insns to initialize the variable parts of a trampoline. |
- FNADDR is an RTX for the address of the function's pure code. |
- CXT is an RTX for the static chain value for the function. */ |
- |
-#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ |
- if (TARGET_ARCH64) \ |
- sparc64_initialize_trampoline (TRAMP, FNADDR, CXT); \ |
- else \ |
- sparc_initialize_trampoline (TRAMP, FNADDR, CXT) |
/* Generate RTL to flush the register windows so as to make arbitrary frames |
available. */ |
@@ -1851,15 +1811,9 @@ do { \ |
#define USE_AS_OFFSETABLE_LO10 0 |
#endif |
-/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression |
- that is a valid memory address for an instruction. |
- The MODE argument is the machine mode for the MEM expression |
- that wants to use this address. |
- |
- On SPARC, the actual legitimate addresses must be REG+REG or REG+SMALLINT |
- ordinarily. This changes a bit when generating PIC. |
- |
- If you change this, execute "rm explow.o recog.o reload.o". */ |
+/* On SPARC, the actual legitimate addresses must be REG+REG or REG+SMALLINT |
+ ordinarily. This changes a bit when generating PIC. The details are |
+ in sparc.c's implementation of TARGET_LEGITIMATE_ADDRESS_P. */ |
#define SYMBOLIC_CONST(X) symbolic_operand (X, VOIDmode) |
@@ -1881,20 +1835,6 @@ do { \ |
#define RTX_OK_FOR_OLO10_P(X) \ |
(GET_CODE (X) == CONST_INT && INTVAL (X) >= -0x1000 && INTVAL (X) < 0xc00 - 8) |
-#ifdef REG_OK_STRICT |
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ |
-{ \ |
- if (legitimate_address_p (MODE, X, 1)) \ |
- goto ADDR; \ |
-} |
-#else |
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ |
-{ \ |
- if (legitimate_address_p (MODE, X, 0)) \ |
- goto ADDR; \ |
-} |
-#endif |
- |
/* Go to LABEL if ADDR (a legitimate address expression) |
has an effect that depends on the machine mode it is used for. |
@@ -1923,27 +1863,6 @@ do { \ |
} \ |
} |
-/* Try machine-dependent ways of modifying an illegitimate address |
- to be legitimate. If we find one, return the new, valid address. |
- This macro is used in only one place: `memory_address' in explow.c. |
- |
- OLDX is the address as it was before break_out_memory_refs was called. |
- In some cases it is useful to look at this to decide what needs to be done. |
- |
- MODE and WIN are passed so that this macro can use |
- GO_IF_LEGITIMATE_ADDRESS. |
- |
- It is always safe for this macro to do nothing. It exists to recognize |
- opportunities to optimize the output. */ |
- |
-/* On SPARC, change REG+N into REG+REG, and REG+(X*Y) into REG+REG. */ |
-#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ |
-{ \ |
- (X) = legitimize_address (X, OLDX, MODE); \ |
- if (memory_address_p (MODE, X)) \ |
- goto WIN; \ |
-} |
- |
/* Try a machine-dependent way of reloading an illegitimate address |
operand. If we find one, push the reload and jump to WIN. This |
macro is used in only one place: `find_reloads_address' in reload.c. |
@@ -2028,9 +1947,6 @@ do { \ |
is done just by pretending it is already truncated. */ |
#define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 |
-/* Specify the machine mode used for addresses. */ |
-#define Pmode (TARGET_ARCH64 ? DImode : SImode) |
- |
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE, |
return the mode to be used for the comparison. For floating-point, |
CCFP[E]mode is used. CC_NOOVmode should be used when the first operand |