Commit fc27d102 by Kaveh R. Ghazi Committed by Kaveh Ghazi

* config/sparc/sparc.c: Convert to ISO C.

From-SVN: r70510
parent e80d5f80
2003-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2003-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/sparc/sparc.c: Convert to ISO C.
* config/sparc/sparc-protos.h: Don't use the PARAMS macro. * config/sparc/sparc-protos.h: Don't use the PARAMS macro.
* config/sparc/sparc.c: Likewise. * config/sparc/sparc.c: Likewise.
......
...@@ -256,7 +256,7 @@ struct gcc_target targetm = TARGET_INITIALIZER; ...@@ -256,7 +256,7 @@ struct gcc_target targetm = TARGET_INITIALIZER;
initialization. */ initialization. */
void void
sparc_override_options () sparc_override_options (void)
{ {
static struct code_model { static struct code_model {
const char *const name; const char *const name;
...@@ -456,8 +456,7 @@ sparc_override_options () ...@@ -456,8 +456,7 @@ sparc_override_options ()
or branch on register contents instructions. */ or branch on register contents instructions. */
int int
v9_regcmp_p (code) v9_regcmp_p (enum rtx_code code)
enum rtx_code code;
{ {
return (code == EQ || code == NE || code == GE || code == LT return (code == EQ || code == NE || code == GE || code == LT
|| code == LE || code == GT); || code == LE || code == GT);
...@@ -470,9 +469,7 @@ v9_regcmp_p (code) ...@@ -470,9 +469,7 @@ v9_regcmp_p (code)
or const0_rtx. */ or const0_rtx. */
int int
reg_or_0_operand (op, mode) reg_or_0_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (register_operand (op, mode)) if (register_operand (op, mode))
return 1; return 1;
...@@ -490,9 +487,7 @@ reg_or_0_operand (op, mode) ...@@ -490,9 +487,7 @@ reg_or_0_operand (op, mode)
/* Return nonzero only if OP is const1_rtx. */ /* Return nonzero only if OP is const1_rtx. */
int int
const1_operand (op, mode) const1_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return op == const1_rtx; return op == const1_rtx;
} }
...@@ -500,9 +495,7 @@ const1_operand (op, mode) ...@@ -500,9 +495,7 @@ const1_operand (op, mode)
/* Nonzero if OP is a floating point value with value 0.0. */ /* Nonzero if OP is a floating point value with value 0.0. */
int int
fp_zero_operand (op, mode) fp_zero_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_MODE_CLASS (GET_MODE (op)) != MODE_FLOAT) if (GET_MODE_CLASS (GET_MODE (op)) != MODE_FLOAT)
return 0; return 0;
...@@ -512,9 +505,7 @@ fp_zero_operand (op, mode) ...@@ -512,9 +505,7 @@ fp_zero_operand (op, mode)
/* Nonzero if OP is a register operand in floating point register. */ /* Nonzero if OP is a register operand in floating point register. */
int int
fp_register_operand (op, mode) fp_register_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (! register_operand (op, mode)) if (! register_operand (op, mode))
return 0; return 0;
...@@ -528,8 +519,7 @@ fp_register_operand (op, mode) ...@@ -528,8 +519,7 @@ fp_register_operand (op, mode)
sethi instruction. */ sethi instruction. */
int int
fp_sethi_p (op) fp_sethi_p (rtx op)
rtx op;
{ {
if (GET_CODE (op) == CONST_DOUBLE) if (GET_CODE (op) == CONST_DOUBLE)
{ {
...@@ -553,8 +543,7 @@ fp_sethi_p (op) ...@@ -553,8 +543,7 @@ fp_sethi_p (op)
mov instruction. */ mov instruction. */
int int
fp_mov_p (op) fp_mov_p (rtx op)
rtx op;
{ {
if (GET_CODE (op) == CONST_DOUBLE) if (GET_CODE (op) == CONST_DOUBLE)
{ {
...@@ -578,8 +567,7 @@ fp_mov_p (op) ...@@ -578,8 +567,7 @@ fp_mov_p (op)
instruction sequence. */ instruction sequence. */
int int
fp_high_losum_p (op) fp_high_losum_p (rtx op)
rtx op;
{ {
/* The constraints calling this should only be in /* The constraints calling this should only be in
SFmode move insns, so any constant which cannot SFmode move insns, so any constant which cannot
...@@ -605,9 +593,7 @@ fp_high_losum_p (op) ...@@ -605,9 +593,7 @@ fp_high_losum_p (op)
/* Nonzero if OP is an integer register. */ /* Nonzero if OP is an integer register. */
int int
intreg_operand (op, mode) intreg_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (register_operand (op, SImode) return (register_operand (op, SImode)
|| (TARGET_ARCH64 && register_operand (op, DImode))); || (TARGET_ARCH64 && register_operand (op, DImode)));
...@@ -616,9 +602,7 @@ intreg_operand (op, mode) ...@@ -616,9 +602,7 @@ intreg_operand (op, mode)
/* Nonzero if OP is a floating point condition code register. */ /* Nonzero if OP is a floating point condition code register. */
int int
fcc_reg_operand (op, mode) fcc_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
/* This can happen when recog is called from combine. Op may be a MEM. /* This can happen when recog is called from combine. Op may be a MEM.
Fail instead of calling abort in this case. */ Fail instead of calling abort in this case. */
...@@ -643,9 +627,7 @@ fcc_reg_operand (op, mode) ...@@ -643,9 +627,7 @@ fcc_reg_operand (op, mode)
/* Nonzero if OP is a floating point condition code fcc0 register. */ /* Nonzero if OP is a floating point condition code fcc0 register. */
int int
fcc0_reg_operand (op, mode) fcc0_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
/* This can happen when recog is called from combine. Op may be a MEM. /* This can happen when recog is called from combine. Op may be a MEM.
Fail instead of calling abort in this case. */ Fail instead of calling abort in this case. */
...@@ -664,9 +646,7 @@ fcc0_reg_operand (op, mode) ...@@ -664,9 +646,7 @@ fcc0_reg_operand (op, mode)
/* Nonzero if OP is an integer or floating point condition code register. */ /* Nonzero if OP is an integer or floating point condition code register. */
int int
icc_or_fcc_reg_operand (op, mode) icc_or_fcc_reg_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) == REG && REGNO (op) == SPARC_ICC_REG) if (GET_CODE (op) == REG && REGNO (op) == SPARC_ICC_REG)
{ {
...@@ -683,9 +663,7 @@ icc_or_fcc_reg_operand (op, mode) ...@@ -683,9 +663,7 @@ icc_or_fcc_reg_operand (op, mode)
/* Nonzero if OP can appear as the dest of a RESTORE insn. */ /* Nonzero if OP can appear as the dest of a RESTORE insn. */
int int
restore_operand (op, mode) restore_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (GET_CODE (op) == REG && GET_MODE (op) == mode return (GET_CODE (op) == REG && GET_MODE (op) == mode
&& (REGNO (op) < 8 || (REGNO (op) >= 24 && REGNO (op) < 32))); && (REGNO (op) < 8 || (REGNO (op) >= 24 && REGNO (op) < 32)));
...@@ -695,9 +673,7 @@ restore_operand (op, mode) ...@@ -695,9 +673,7 @@ restore_operand (op, mode)
memory address. */ memory address. */
int int
call_operand (op, mode) call_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) != MEM) if (GET_CODE (op) != MEM)
abort (); abort ();
...@@ -706,9 +682,7 @@ call_operand (op, mode) ...@@ -706,9 +682,7 @@ call_operand (op, mode)
} }
int int
call_operand_address (op, mode) call_operand_address (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (symbolic_operand (op, mode) || memory_address_p (Pmode, op)); return (symbolic_operand (op, mode) || memory_address_p (Pmode, op));
} }
...@@ -717,9 +691,7 @@ call_operand_address (op, mode) ...@@ -717,9 +691,7 @@ call_operand_address (op, mode)
reference and a constant. */ reference and a constant. */
int int
symbolic_operand (op, mode) symbolic_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
enum machine_mode omode = GET_MODE (op); enum machine_mode omode = GET_MODE (op);
...@@ -747,9 +719,7 @@ symbolic_operand (op, mode) ...@@ -747,9 +719,7 @@ symbolic_operand (op, mode)
operand of mode MODE. */ operand of mode MODE. */
int int
symbolic_memory_operand (op, mode) symbolic_memory_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) == SUBREG) if (GET_CODE (op) == SUBREG)
op = SUBREG_REG (op); op = SUBREG_REG (op);
...@@ -763,9 +733,7 @@ symbolic_memory_operand (op, mode) ...@@ -763,9 +733,7 @@ symbolic_memory_operand (op, mode)
/* Return truth value of statement that OP is a LABEL_REF of mode MODE. */ /* Return truth value of statement that OP is a LABEL_REF of mode MODE. */
int int
label_ref_operand (op, mode) label_ref_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (GET_CODE (op) != LABEL_REF) if (GET_CODE (op) != LABEL_REF)
return 0; return 0;
...@@ -778,9 +746,7 @@ label_ref_operand (op, mode) ...@@ -778,9 +746,7 @@ label_ref_operand (op, mode)
in either the medium/low or medium/anywhere code models of sparc64. */ in either the medium/low or medium/anywhere code models of sparc64. */
int int
sp64_medium_pic_operand (op, mode) sp64_medium_pic_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
/* Check for (const (minus (symbol_ref:GOT) /* Check for (const (minus (symbol_ref:GOT)
(const (minus (label) (pc))))). */ (const (minus (label) (pc))))). */
...@@ -805,9 +771,7 @@ sp64_medium_pic_operand (op, mode) ...@@ -805,9 +771,7 @@ sp64_medium_pic_operand (op, mode)
are accessed with EMBMEDANY_BASE_REG. */ are accessed with EMBMEDANY_BASE_REG. */
int int
data_segment_operand (op, mode) data_segment_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
switch (GET_CODE (op)) switch (GET_CODE (op))
{ {
...@@ -827,9 +791,7 @@ data_segment_operand (op, mode) ...@@ -827,9 +791,7 @@ data_segment_operand (op, mode)
This is needed in the medium/anywhere code model on v9. */ This is needed in the medium/anywhere code model on v9. */
int int
text_segment_operand (op, mode) text_segment_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
switch (GET_CODE (op)) switch (GET_CODE (op))
{ {
...@@ -851,9 +813,7 @@ text_segment_operand (op, mode) ...@@ -851,9 +813,7 @@ text_segment_operand (op, mode)
not symbolic. */ not symbolic. */
int int
reg_or_nonsymb_mem_operand (op, mode) reg_or_nonsymb_mem_operand (register rtx op, enum machine_mode mode)
register rtx op;
enum machine_mode mode;
{ {
if (register_operand (op, mode)) if (register_operand (op, mode))
return 1; return 1;
...@@ -865,9 +825,8 @@ reg_or_nonsymb_mem_operand (op, mode) ...@@ -865,9 +825,8 @@ reg_or_nonsymb_mem_operand (op, mode)
} }
int int
splittable_symbolic_memory_operand (op, mode) splittable_symbolic_memory_operand (rtx op,
rtx op; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) != MEM) if (GET_CODE (op) != MEM)
return 0; return 0;
...@@ -877,9 +836,8 @@ splittable_symbolic_memory_operand (op, mode) ...@@ -877,9 +836,8 @@ splittable_symbolic_memory_operand (op, mode)
} }
int int
splittable_immediate_memory_operand (op, mode) splittable_immediate_memory_operand (rtx op,
rtx op; enum machine_mode mode ATTRIBUTE_UNUSED)
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) != MEM) if (GET_CODE (op) != MEM)
return 0; return 0;
...@@ -891,9 +849,7 @@ splittable_immediate_memory_operand (op, mode) ...@@ -891,9 +849,7 @@ splittable_immediate_memory_operand (op, mode)
/* Return truth value of whether OP is EQ or NE. */ /* Return truth value of whether OP is EQ or NE. */
int int
eq_or_neq (op, mode) eq_or_neq (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == EQ || GET_CODE (op) == NE); return (GET_CODE (op) == EQ || GET_CODE (op) == NE);
} }
...@@ -902,9 +858,7 @@ eq_or_neq (op, mode) ...@@ -902,9 +858,7 @@ eq_or_neq (op, mode)
or LTU for non-floating-point. We handle those specially. */ or LTU for non-floating-point. We handle those specially. */
int int
normal_comp_operator (op, mode) normal_comp_operator (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
...@@ -922,9 +876,7 @@ normal_comp_operator (op, mode) ...@@ -922,9 +876,7 @@ normal_comp_operator (op, mode)
MATCH_OPERATOR to recognize all the branch insns. */ MATCH_OPERATOR to recognize all the branch insns. */
int int
noov_compare_op (op, mode) noov_compare_op (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
...@@ -942,9 +894,7 @@ noov_compare_op (op, mode) ...@@ -942,9 +894,7 @@ noov_compare_op (op, mode)
MATCH_OPERATOR to recognize all the branch insns. */ MATCH_OPERATOR to recognize all the branch insns. */
int int
noov_compare64_op (op, mode) noov_compare64_op (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
...@@ -964,9 +914,7 @@ noov_compare64_op (op, mode) ...@@ -964,9 +914,7 @@ noov_compare64_op (op, mode)
conditional move or branch on register contents instructions. */ conditional move or branch on register contents instructions. */
int int
v9_regcmp_op (op, mode) v9_regcmp_op (register rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
register rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
...@@ -979,9 +927,7 @@ v9_regcmp_op (op, mode) ...@@ -979,9 +927,7 @@ v9_regcmp_op (op, mode)
/* Return 1 if this is a SIGN_EXTEND or ZERO_EXTEND operation. */ /* Return 1 if this is a SIGN_EXTEND or ZERO_EXTEND operation. */
int int
extend_op (op, mode) extend_op (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return GET_CODE (op) == SIGN_EXTEND || GET_CODE (op) == ZERO_EXTEND; return GET_CODE (op) == SIGN_EXTEND || GET_CODE (op) == ZERO_EXTEND;
} }
...@@ -991,9 +937,7 @@ extend_op (op, mode) ...@@ -991,9 +937,7 @@ extend_op (op, mode)
because these require CC_NOOVmode, which we handle explicitly. */ because these require CC_NOOVmode, which we handle explicitly. */
int int
cc_arithop (op, mode) cc_arithop (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) == AND if (GET_CODE (op) == AND
|| GET_CODE (op) == IOR || GET_CODE (op) == IOR
...@@ -1007,9 +951,7 @@ cc_arithop (op, mode) ...@@ -1007,9 +951,7 @@ cc_arithop (op, mode)
complement its second operand and set the condition codes explicitly. */ complement its second operand and set the condition codes explicitly. */
int int
cc_arithopn (op, mode) cc_arithopn (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
/* XOR is not here because combine canonicalizes (xor (not ...) ...) /* XOR is not here because combine canonicalizes (xor (not ...) ...)
and (xor ... (not ...)) to (not (xor ...)). */ and (xor ... (not ...)) to (not (xor ...)). */
...@@ -1022,9 +964,7 @@ cc_arithopn (op, mode) ...@@ -1022,9 +964,7 @@ cc_arithopn (op, mode)
most 3 address instructions. */ most 3 address instructions. */
int int
arith_operand (op, mode) arith_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
if (register_operand (op, mode)) if (register_operand (op, mode))
return 1; return 1;
...@@ -1036,9 +976,7 @@ arith_operand (op, mode) ...@@ -1036,9 +976,7 @@ arith_operand (op, mode)
/* Return true if OP is a constant 4096 */ /* Return true if OP is a constant 4096 */
int int
arith_4096_operand (op, mode) arith_4096_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
if (GET_CODE (op) != CONST_INT) if (GET_CODE (op) != CONST_INT)
return 0; return 0;
...@@ -1049,9 +987,7 @@ arith_4096_operand (op, mode) ...@@ -1049,9 +987,7 @@ arith_4096_operand (op, mode)
/* Return true if OP is suitable as second operand for add/sub */ /* Return true if OP is suitable as second operand for add/sub */
int int
arith_add_operand (op, mode) arith_add_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return arith_operand (op, mode) || arith_4096_operand (op, mode); return arith_operand (op, mode) || arith_4096_operand (op, mode);
} }
...@@ -1060,9 +996,7 @@ arith_add_operand (op, mode) ...@@ -1060,9 +996,7 @@ arith_add_operand (op, mode)
immediate field of OR and XOR instructions. Used for 64-bit immediate field of OR and XOR instructions. Used for 64-bit
constant formation patterns. */ constant formation patterns. */
int int
const64_operand (op, mode) const64_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return ((GET_CODE (op) == CONST_INT return ((GET_CODE (op) == CONST_INT
&& SPARC_SIMM13_P (INTVAL (op))) && SPARC_SIMM13_P (INTVAL (op)))
...@@ -1078,9 +1012,7 @@ const64_operand (op, mode) ...@@ -1078,9 +1012,7 @@ const64_operand (op, mode)
/* The same, but only for sethi instructions. */ /* The same, but only for sethi instructions. */
int int
const64_high_operand (op, mode) const64_high_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return ((GET_CODE (op) == CONST_INT return ((GET_CODE (op) == CONST_INT
&& (INTVAL (op) & ~(HOST_WIDE_INT)0x3ff) != 0 && (INTVAL (op) & ~(HOST_WIDE_INT)0x3ff) != 0
...@@ -1097,9 +1029,7 @@ const64_high_operand (op, mode) ...@@ -1097,9 +1029,7 @@ const64_high_operand (op, mode)
the movcc instructions. */ the movcc instructions. */
int int
arith11_operand (op, mode) arith11_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (register_operand (op, mode) return (register_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && SPARC_SIMM11_P (INTVAL (op)))); || (GET_CODE (op) == CONST_INT && SPARC_SIMM11_P (INTVAL (op))));
...@@ -1110,9 +1040,7 @@ arith11_operand (op, mode) ...@@ -1110,9 +1040,7 @@ arith11_operand (op, mode)
the movrcc instructions. */ the movrcc instructions. */
int int
arith10_operand (op, mode) arith10_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (register_operand (op, mode) return (register_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && SPARC_SIMM10_P (INTVAL (op)))); || (GET_CODE (op) == CONST_INT && SPARC_SIMM10_P (INTVAL (op))));
...@@ -1126,9 +1054,7 @@ arith10_operand (op, mode) ...@@ -1126,9 +1054,7 @@ arith10_operand (op, mode)
for most 3 address instructions. */ for most 3 address instructions. */
int int
arith_double_operand (op, mode) arith_double_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (register_operand (op, mode) return (register_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && SMALL_INT (op)) || (GET_CODE (op) == CONST_INT && SMALL_INT (op))
...@@ -1148,9 +1074,7 @@ arith_double_operand (op, mode) ...@@ -1148,9 +1074,7 @@ arith_double_operand (op, mode)
/* Return true if OP is a constant 4096 for DImode on ARCH64 */ /* Return true if OP is a constant 4096 for DImode on ARCH64 */
int int
arith_double_4096_operand (op, mode) arith_double_4096_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (TARGET_ARCH64 && return (TARGET_ARCH64 &&
((GET_CODE (op) == CONST_INT && INTVAL (op) == 4096) || ((GET_CODE (op) == CONST_INT && INTVAL (op) == 4096) ||
...@@ -1162,9 +1086,7 @@ arith_double_4096_operand (op, mode) ...@@ -1162,9 +1086,7 @@ arith_double_4096_operand (op, mode)
/* Return true if OP is suitable as second operand for add/sub in DImode */ /* Return true if OP is suitable as second operand for add/sub in DImode */
int int
arith_double_add_operand (op, mode) arith_double_add_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return arith_double_operand (op, mode) || arith_double_4096_operand (op, mode); return arith_double_operand (op, mode) || arith_double_4096_operand (op, mode);
} }
...@@ -1175,9 +1097,7 @@ arith_double_add_operand (op, mode) ...@@ -1175,9 +1097,7 @@ arith_double_add_operand (op, mode)
/* ??? Replace with arith11_operand? */ /* ??? Replace with arith11_operand? */
int int
arith11_double_operand (op, mode) arith11_double_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (register_operand (op, mode) return (register_operand (op, mode)
|| (GET_CODE (op) == CONST_DOUBLE || (GET_CODE (op) == CONST_DOUBLE
...@@ -1198,9 +1118,7 @@ arith11_double_operand (op, mode) ...@@ -1198,9 +1118,7 @@ arith11_double_operand (op, mode)
/* ??? Replace with arith10_operand? */ /* ??? Replace with arith10_operand? */
int int
arith10_double_operand (op, mode) arith10_double_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return (register_operand (op, mode) return (register_operand (op, mode)
|| (GET_CODE (op) == CONST_DOUBLE || (GET_CODE (op) == CONST_DOUBLE
...@@ -1220,17 +1138,13 @@ arith10_double_operand (op, mode) ...@@ -1220,17 +1138,13 @@ arith10_double_operand (op, mode)
which have a 13 bit immediate field. */ which have a 13 bit immediate field. */
int int
small_int (op, mode) small_int (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == CONST_INT && SMALL_INT (op)); return (GET_CODE (op) == CONST_INT && SMALL_INT (op));
} }
int int
small_int_or_double (op, mode) small_int_or_double (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return ((GET_CODE (op) == CONST_INT && SMALL_INT (op)) return ((GET_CODE (op) == CONST_INT && SMALL_INT (op))
|| (GET_CODE (op) == CONST_DOUBLE || (GET_CODE (op) == CONST_DOUBLE
...@@ -1243,9 +1157,7 @@ small_int_or_double (op, mode) ...@@ -1243,9 +1157,7 @@ small_int_or_double (op, mode)
interprets the extended result as an unsigned number. */ interprets the extended result as an unsigned number. */
int int
uns_small_int (op, mode) uns_small_int (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
#if HOST_BITS_PER_WIDE_INT > 32 #if HOST_BITS_PER_WIDE_INT > 32
/* All allowed constants will fit a CONST_INT. */ /* All allowed constants will fit a CONST_INT. */
...@@ -1262,18 +1174,14 @@ uns_small_int (op, mode) ...@@ -1262,18 +1174,14 @@ uns_small_int (op, mode)
} }
int int
uns_arith_operand (op, mode) uns_arith_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
return register_operand (op, mode) || uns_small_int (op, mode); return register_operand (op, mode) || uns_small_int (op, mode);
} }
/* Return truth value of statement that OP is a call-clobbered register. */ /* Return truth value of statement that OP is a call-clobbered register. */
int int
clobbered_register (op, mode) clobbered_register (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
rtx op;
enum machine_mode mode ATTRIBUTE_UNUSED;
{ {
return (GET_CODE (op) == REG && call_used_regs[REGNO (op)]); return (GET_CODE (op) == REG && call_used_regs[REGNO (op)]);
} }
...@@ -1281,9 +1189,7 @@ clobbered_register (op, mode) ...@@ -1281,9 +1189,7 @@ clobbered_register (op, mode)
/* Return 1 if OP is a valid operand for the source of a move insn. */ /* Return 1 if OP is a valid operand for the source of a move insn. */
int int
input_operand (op, mode) input_operand (rtx op, enum machine_mode mode)
rtx op;
enum machine_mode mode;
{ {
/* If both modes are non-void they must be the same. */ /* If both modes are non-void they must be the same. */
if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op)) if (mode != VOIDmode && GET_MODE (op) != VOIDmode && mode != GET_MODE (op))
...@@ -1365,9 +1271,7 @@ input_operand (op, mode) ...@@ -1365,9 +1271,7 @@ input_operand (op, mode)
/* We know it can't be done in one insn when we get here, /* We know it can't be done in one insn when we get here,
the movsi expander guarantees this. */ the movsi expander guarantees this. */
void void
sparc_emit_set_const32 (op0, op1) sparc_emit_set_const32 (rtx op0, rtx op1)
rtx op0;
rtx op1;
{ {
enum machine_mode mode = GET_MODE (op0); enum machine_mode mode = GET_MODE (op0);
rtx temp; rtx temp;
...@@ -1423,10 +1327,7 @@ sparc_emit_set_const32 (op0, op1) ...@@ -1423,10 +1327,7 @@ sparc_emit_set_const32 (op0, op1)
/* SPARC-v9 code-model support. */ /* SPARC-v9 code-model support. */
void void
sparc_emit_set_symbolic_const64 (op0, op1, temp1) sparc_emit_set_symbolic_const64 (rtx op0, rtx op1, rtx temp1)
rtx op0;
rtx op1;
rtx temp1;
{ {
rtx ti_temp1 = 0; rtx ti_temp1 = 0;
...@@ -1588,33 +1489,25 @@ static rtx gen_safe_XOR64 (rtx, HOST_WIDE_INT); ...@@ -1588,33 +1489,25 @@ static rtx gen_safe_XOR64 (rtx, HOST_WIDE_INT);
during CSE. We mask out the non-HIGH bits, and matches during CSE. We mask out the non-HIGH bits, and matches
a plain movdi, to alleviate this problem. */ a plain movdi, to alleviate this problem. */
static void static void
sparc_emit_set_safe_HIGH64 (dest, val) sparc_emit_set_safe_HIGH64 (rtx dest, HOST_WIDE_INT val)
rtx dest;
HOST_WIDE_INT val;
{ {
emit_insn (gen_rtx_SET (VOIDmode, dest, GEN_HIGHINT64 (val))); emit_insn (gen_rtx_SET (VOIDmode, dest, GEN_HIGHINT64 (val)));
} }
static rtx static rtx
gen_safe_SET64 (dest, val) gen_safe_SET64 (rtx dest, HOST_WIDE_INT val)
rtx dest;
HOST_WIDE_INT val;
{ {
return gen_rtx_SET (VOIDmode, dest, GEN_INT64 (val)); return gen_rtx_SET (VOIDmode, dest, GEN_INT64 (val));
} }
static rtx static rtx
gen_safe_OR64 (src, val) gen_safe_OR64 (rtx src, HOST_WIDE_INT val)
rtx src;
HOST_WIDE_INT val;
{ {
return gen_rtx_IOR (DImode, src, GEN_INT64 (val)); return gen_rtx_IOR (DImode, src, GEN_INT64 (val));
} }
static rtx static rtx
gen_safe_XOR64 (src, val) gen_safe_XOR64 (rtx src, HOST_WIDE_INT val)
rtx src;
HOST_WIDE_INT val;
{ {
return gen_rtx_XOR (DImode, src, GEN_INT64 (val)); return gen_rtx_XOR (DImode, src, GEN_INT64 (val));
} }
...@@ -1631,11 +1524,8 @@ static void sparc_emit_set_const64_quick1 (rtx, rtx, ...@@ -1631,11 +1524,8 @@ static void sparc_emit_set_const64_quick1 (rtx, rtx,
unsigned HOST_WIDE_INT, int); unsigned HOST_WIDE_INT, int);
static void static void
sparc_emit_set_const64_quick1 (op0, temp, low_bits, is_neg) sparc_emit_set_const64_quick1 (rtx op0, rtx temp,
rtx op0; unsigned HOST_WIDE_INT low_bits, int is_neg)
rtx temp;
unsigned HOST_WIDE_INT low_bits;
int is_neg;
{ {
unsigned HOST_WIDE_INT high_bits; unsigned HOST_WIDE_INT high_bits;
...@@ -1674,12 +1564,10 @@ static void sparc_emit_set_const64_quick2 (rtx, rtx, unsigned HOST_WIDE_INT, ...@@ -1674,12 +1564,10 @@ static void sparc_emit_set_const64_quick2 (rtx, rtx, unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int); unsigned HOST_WIDE_INT, int);
static void static void
sparc_emit_set_const64_quick2 (op0, temp, high_bits, low_immediate, shift_count) sparc_emit_set_const64_quick2 (rtx op0, rtx temp,
rtx op0; unsigned HOST_WIDE_INT high_bits,
rtx temp; unsigned HOST_WIDE_INT low_immediate,
unsigned HOST_WIDE_INT high_bits; int shift_count)
unsigned HOST_WIDE_INT low_immediate;
int shift_count;
{ {
rtx temp2 = op0; rtx temp2 = op0;
...@@ -1716,11 +1604,9 @@ static void sparc_emit_set_const64_longway (rtx, rtx, unsigned HOST_WIDE_INT, ...@@ -1716,11 +1604,9 @@ static void sparc_emit_set_const64_longway (rtx, rtx, unsigned HOST_WIDE_INT,
/* Full 64-bit constant decomposition. Even though this is the /* Full 64-bit constant decomposition. Even though this is the
'worst' case, we still optimize a few things away. */ 'worst' case, we still optimize a few things away. */
static void static void
sparc_emit_set_const64_longway (op0, temp, high_bits, low_bits) sparc_emit_set_const64_longway (rtx op0, rtx temp,
rtx op0; unsigned HOST_WIDE_INT high_bits,
rtx temp; unsigned HOST_WIDE_INT low_bits)
unsigned HOST_WIDE_INT high_bits;
unsigned HOST_WIDE_INT low_bits;
{ {
rtx sub_temp; rtx sub_temp;
...@@ -1823,9 +1709,9 @@ static void analyze_64bit_constant (unsigned HOST_WIDE_INT, ...@@ -1823,9 +1709,9 @@ static void analyze_64bit_constant (unsigned HOST_WIDE_INT,
int *, int *, int *); int *, int *, int *);
static void static void
analyze_64bit_constant (high_bits, low_bits, hbsp, lbsp, abbasp) analyze_64bit_constant (unsigned HOST_WIDE_INT high_bits,
unsigned HOST_WIDE_INT high_bits, low_bits; unsigned HOST_WIDE_INT low_bits,
int *hbsp, *lbsp, *abbasp; int *hbsp, int *lbsp, int *abbasp)
{ {
int lowest_bit_set, highest_bit_set, all_bits_between_are_set; int lowest_bit_set, highest_bit_set, all_bits_between_are_set;
int i; int i;
...@@ -1889,8 +1775,8 @@ analyze_64bit_constant (high_bits, low_bits, hbsp, lbsp, abbasp) ...@@ -1889,8 +1775,8 @@ analyze_64bit_constant (high_bits, low_bits, hbsp, lbsp, abbasp)
static int const64_is_2insns (unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT); static int const64_is_2insns (unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT);
static int static int
const64_is_2insns (high_bits, low_bits) const64_is_2insns (unsigned HOST_WIDE_INT high_bits,
unsigned HOST_WIDE_INT high_bits, low_bits; unsigned HOST_WIDE_INT low_bits)
{ {
int highest_bit_set, lowest_bit_set, all_bits_between_are_set; int highest_bit_set, lowest_bit_set, all_bits_between_are_set;
...@@ -1918,9 +1804,9 @@ static unsigned HOST_WIDE_INT create_simple_focus_bits (unsigned HOST_WIDE_INT, ...@@ -1918,9 +1804,9 @@ static unsigned HOST_WIDE_INT create_simple_focus_bits (unsigned HOST_WIDE_INT,
int, int); int, int);
static unsigned HOST_WIDE_INT static unsigned HOST_WIDE_INT
create_simple_focus_bits (high_bits, low_bits, lowest_bit_set, shift) create_simple_focus_bits (unsigned HOST_WIDE_INT high_bits,
unsigned HOST_WIDE_INT high_bits, low_bits; unsigned HOST_WIDE_INT low_bits,
int lowest_bit_set, shift; int lowest_bit_set, int shift)
{ {
HOST_WIDE_INT hi, lo; HOST_WIDE_INT hi, lo;
...@@ -1944,9 +1830,7 @@ create_simple_focus_bits (high_bits, low_bits, lowest_bit_set, shift) ...@@ -1944,9 +1830,7 @@ create_simple_focus_bits (high_bits, low_bits, lowest_bit_set, shift)
insn sequence possible. Detection of all the 1-insn cases insn sequence possible. Detection of all the 1-insn cases
has been done already. */ has been done already. */
void void
sparc_emit_set_const64 (op0, op1) sparc_emit_set_const64 (rtx op0, rtx op1)
rtx op0;
rtx op1;
{ {
unsigned HOST_WIDE_INT high_bits, low_bits; unsigned HOST_WIDE_INT high_bits, low_bits;
int lowest_bit_set, highest_bit_set; int lowest_bit_set, highest_bit_set;
...@@ -2224,10 +2108,7 @@ sparc_emit_set_const64 (op0, op1) ...@@ -2224,10 +2108,7 @@ sparc_emit_set_const64 (op0, op1)
processing is needed. */ processing is needed. */
enum machine_mode enum machine_mode
select_cc_mode (op, x, y) select_cc_mode (enum rtx_code op, rtx x, rtx y ATTRIBUTE_UNUSED)
enum rtx_code op;
rtx x;
rtx y ATTRIBUTE_UNUSED;
{ {
if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT) if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT)
{ {
...@@ -2276,9 +2157,7 @@ select_cc_mode (op, x, y) ...@@ -2276,9 +2157,7 @@ select_cc_mode (op, x, y)
return the rtx for the cc reg in the proper mode. */ return the rtx for the cc reg in the proper mode. */
rtx rtx
gen_compare_reg (code, x, y) gen_compare_reg (enum rtx_code code, rtx x, rtx y)
enum rtx_code code;
rtx x, y;
{ {
enum machine_mode mode = SELECT_CC_MODE (code, x, y); enum machine_mode mode = SELECT_CC_MODE (code, x, y);
rtx cc_reg; rtx cc_reg;
...@@ -2359,9 +2238,7 @@ gen_compare_reg (code, x, y) ...@@ -2359,9 +2238,7 @@ gen_compare_reg (code, x, y)
sparc_compare_op1. */ sparc_compare_op1. */
int int
gen_v9_scc (compare_code, operands) gen_v9_scc (enum rtx_code compare_code, register rtx *operands)
enum rtx_code compare_code;
register rtx *operands;
{ {
rtx temp, op0, op1; rtx temp, op0, op1;
...@@ -2449,9 +2326,7 @@ gen_v9_scc (compare_code, operands) ...@@ -2449,9 +2326,7 @@ gen_v9_scc (compare_code, operands)
This function exists to take advantage of the v9 brxx insns. */ This function exists to take advantage of the v9 brxx insns. */
void void
emit_v9_brxx_insn (code, op0, label) emit_v9_brxx_insn (enum rtx_code code, rtx op0, rtx label)
enum rtx_code code;
rtx op0, label;
{ {
emit_jump_insn (gen_rtx_SET (VOIDmode, emit_jump_insn (gen_rtx_SET (VOIDmode,
pc_rtx, pc_rtx,
...@@ -2467,9 +2342,7 @@ emit_v9_brxx_insn (code, op0, label) ...@@ -2467,9 +2342,7 @@ emit_v9_brxx_insn (code, op0, label)
low 64bit of the register and 0 otherwise. low 64bit of the register and 0 otherwise.
*/ */
rtx rtx
gen_df_reg (reg, low) gen_df_reg (rtx reg, int low)
rtx reg;
int low;
{ {
int regno = REGNO (reg); int regno = REGNO (reg);
...@@ -2483,10 +2356,7 @@ gen_df_reg (reg, low) ...@@ -2483,10 +2356,7 @@ gen_df_reg (reg, low)
assumed that no more than 3 operands are required. */ assumed that no more than 3 operands are required. */
static void static void
emit_soft_tfmode_libcall (func_name, nargs, operands) emit_soft_tfmode_libcall (const char *func_name, int nargs, rtx *operands)
const char *func_name;
int nargs;
rtx *operands;
{ {
rtx ret_slot = NULL, arg[3], func_sym; rtx ret_slot = NULL, arg[3], func_sym;
int i; int i;
...@@ -2571,9 +2441,7 @@ emit_soft_tfmode_libcall (func_name, nargs, operands) ...@@ -2571,9 +2441,7 @@ emit_soft_tfmode_libcall (func_name, nargs, operands)
/* Expand soft-float TFmode calls to sparc abi routines. */ /* Expand soft-float TFmode calls to sparc abi routines. */
static void static void
emit_soft_tfmode_binop (code, operands) emit_soft_tfmode_binop (enum rtx_code code, rtx *operands)
enum rtx_code code;
rtx *operands;
{ {
const char *func; const char *func;
...@@ -2599,9 +2467,7 @@ emit_soft_tfmode_binop (code, operands) ...@@ -2599,9 +2467,7 @@ emit_soft_tfmode_binop (code, operands)
} }
static void static void
emit_soft_tfmode_unop (code, operands) emit_soft_tfmode_unop (enum rtx_code code, rtx *operands)
enum rtx_code code;
rtx *operands;
{ {
const char *func; const char *func;
...@@ -2618,9 +2484,7 @@ emit_soft_tfmode_unop (code, operands) ...@@ -2618,9 +2484,7 @@ emit_soft_tfmode_unop (code, operands)
} }
static void static void
emit_soft_tfmode_cvt (code, operands) emit_soft_tfmode_cvt (enum rtx_code code, rtx *operands)
enum rtx_code code;
rtx *operands;
{ {
const char *func; const char *func;
...@@ -2721,9 +2585,7 @@ emit_soft_tfmode_cvt (code, operands) ...@@ -2721,9 +2585,7 @@ emit_soft_tfmode_cvt (code, operands)
registers. */ registers. */
static void static void
emit_hard_tfmode_operation (code, operands) emit_hard_tfmode_operation (enum rtx_code code, rtx *operands)
enum rtx_code code;
rtx *operands;
{ {
rtx op, dest; rtx op, dest;
...@@ -2752,9 +2614,7 @@ emit_hard_tfmode_operation (code, operands) ...@@ -2752,9 +2614,7 @@ emit_hard_tfmode_operation (code, operands)
} }
void void
emit_tfmode_binop (code, operands) emit_tfmode_binop (enum rtx_code code, rtx *operands)
enum rtx_code code;
rtx *operands;
{ {
if (TARGET_HARD_QUAD) if (TARGET_HARD_QUAD)
emit_hard_tfmode_operation (code, operands); emit_hard_tfmode_operation (code, operands);
...@@ -2763,9 +2623,7 @@ emit_tfmode_binop (code, operands) ...@@ -2763,9 +2623,7 @@ emit_tfmode_binop (code, operands)
} }
void void
emit_tfmode_unop (code, operands) emit_tfmode_unop (enum rtx_code code, rtx *operands)
enum rtx_code code;
rtx *operands;
{ {
if (TARGET_HARD_QUAD) if (TARGET_HARD_QUAD)
emit_hard_tfmode_operation (code, operands); emit_hard_tfmode_operation (code, operands);
...@@ -2774,9 +2632,7 @@ emit_tfmode_unop (code, operands) ...@@ -2774,9 +2632,7 @@ emit_tfmode_unop (code, operands)
} }
void void
emit_tfmode_cvt (code, operands) emit_tfmode_cvt (enum rtx_code code, rtx *operands)
enum rtx_code code;
rtx *operands;
{ {
if (TARGET_HARD_QUAD) if (TARGET_HARD_QUAD)
emit_hard_tfmode_operation (code, operands); emit_hard_tfmode_operation (code, operands);
...@@ -2787,7 +2643,7 @@ emit_tfmode_cvt (code, operands) ...@@ -2787,7 +2643,7 @@ emit_tfmode_cvt (code, operands)
/* Return nonzero if a return peephole merging return with /* Return nonzero if a return peephole merging return with
setting of output register is ok. */ setting of output register is ok. */
int int
leaf_return_peephole_ok () leaf_return_peephole_ok (void)
{ {
return (actual_fsize == 0); return (actual_fsize == 0);
} }
...@@ -2796,8 +2652,7 @@ leaf_return_peephole_ok () ...@@ -2796,8 +2652,7 @@ leaf_return_peephole_ok ()
nop into its delay slot. */ nop into its delay slot. */
int int
empty_delay_slot (insn) empty_delay_slot (rtx insn)
rtx insn;
{ {
rtx seq; rtx seq;
...@@ -2816,9 +2671,7 @@ empty_delay_slot (insn) ...@@ -2816,9 +2671,7 @@ empty_delay_slot (insn)
delay slot. SLOT is the slot we are trying to fill. */ delay slot. SLOT is the slot we are trying to fill. */
int int
eligible_for_epilogue_delay (trial, slot) eligible_for_epilogue_delay (rtx trial, int slot)
rtx trial;
int slot;
{ {
rtx pat, src; rtx pat, src;
...@@ -2944,8 +2797,7 @@ eligible_for_epilogue_delay (trial, slot) ...@@ -2944,8 +2797,7 @@ eligible_for_epilogue_delay (trial, slot)
delay slot. */ delay slot. */
int int
eligible_for_sibcall_delay (trial) eligible_for_sibcall_delay (rtx trial)
rtx trial;
{ {
rtx pat, src; rtx pat, src;
...@@ -3035,8 +2887,7 @@ eligible_for_sibcall_delay (trial) ...@@ -3035,8 +2887,7 @@ eligible_for_sibcall_delay (trial)
} }
static int static int
check_return_regs (x) check_return_regs (rtx x)
rtx x;
{ {
switch (GET_CODE (x)) switch (GET_CODE (x))
{ {
...@@ -3070,8 +2921,7 @@ check_return_regs (x) ...@@ -3070,8 +2921,7 @@ check_return_regs (x)
} }
int int
short_branch (uid1, uid2) short_branch (int uid1, int uid2)
int uid1, uid2;
{ {
int delta = INSN_ADDRESSES (uid1) - INSN_ADDRESSES (uid2); int delta = INSN_ADDRESSES (uid1) - INSN_ADDRESSES (uid2);
...@@ -3086,9 +2936,7 @@ short_branch (uid1, uid2) ...@@ -3086,9 +2936,7 @@ short_branch (uid1, uid2)
We assume REG is a reload reg, and therefore does We assume REG is a reload reg, and therefore does
not live past labels or calls or jumps. */ not live past labels or calls or jumps. */
int int
reg_unused_after (reg, insn) reg_unused_after (rtx reg, rtx insn)
rtx reg;
rtx insn;
{ {
enum rtx_code code, prev_code = UNKNOWN; enum rtx_code code, prev_code = UNKNOWN;
...@@ -3127,8 +2975,7 @@ static char get_pc_symbol_name[256]; ...@@ -3127,8 +2975,7 @@ static char get_pc_symbol_name[256];
/* Ensure that we are not using patterns that are not OK with PIC. */ /* Ensure that we are not using patterns that are not OK with PIC. */
int int
check_pic (i) check_pic (int i)
int i;
{ {
switch (flag_pic) switch (flag_pic)
{ {
...@@ -3151,8 +2998,7 @@ check_pic (i) ...@@ -3151,8 +2998,7 @@ check_pic (i)
reloaded while generating PIC code. */ reloaded while generating PIC code. */
int int
pic_address_needs_scratch (x) pic_address_needs_scratch (rtx x)
rtx x;
{ {
/* An address which is a symbolic plus a non SMALL_INT needs a temp reg. */ /* An address which is a symbolic plus a non SMALL_INT needs a temp reg. */
if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS
...@@ -3170,10 +3016,8 @@ pic_address_needs_scratch (x) ...@@ -3170,10 +3016,8 @@ pic_address_needs_scratch (x)
necessary. */ necessary. */
rtx rtx
legitimize_pic_address (orig, mode, reg) legitimize_pic_address (rtx orig, enum machine_mode mode ATTRIBUTE_UNUSED,
rtx orig; rtx reg)
enum machine_mode mode ATTRIBUTE_UNUSED;
rtx reg;
{ {
if (GET_CODE (orig) == SYMBOL_REF) if (GET_CODE (orig) == SYMBOL_REF)
{ {
...@@ -3276,7 +3120,7 @@ legitimize_pic_address (orig, mode, reg) ...@@ -3276,7 +3120,7 @@ legitimize_pic_address (orig, mode, reg)
/* Emit special PIC prologues. */ /* Emit special PIC prologues. */
void void
load_pic_register () load_pic_register (void)
{ {
/* Labels to get the PC in the prologue of this function. */ /* Labels to get the PC in the prologue of this function. */
int orig_flag_pic = flag_pic; int orig_flag_pic = flag_pic;
...@@ -3321,9 +3165,7 @@ load_pic_register () ...@@ -3321,9 +3165,7 @@ load_pic_register ()
least a DESIRED byte boundary. */ least a DESIRED byte boundary. */
int int
mem_min_alignment (mem, desired) mem_min_alignment (rtx mem, int desired)
rtx mem;
int desired;
{ {
rtx addr, base, offset; rtx addr, base, offset;
...@@ -3516,7 +3358,7 @@ int sparc_mode_class [NUM_MACHINE_MODES]; ...@@ -3516,7 +3358,7 @@ int sparc_mode_class [NUM_MACHINE_MODES];
enum reg_class sparc_regno_reg_class[FIRST_PSEUDO_REGISTER]; enum reg_class sparc_regno_reg_class[FIRST_PSEUDO_REGISTER];
static void static void
sparc_init_modes () sparc_init_modes (void)
{ {
int i; int i;
...@@ -3594,13 +3436,8 @@ sparc_init_modes () ...@@ -3594,13 +3436,8 @@ sparc_init_modes ()
v9 int regs as it simplifies the code. */ v9 int regs as it simplifies the code. */
static int static int
save_regs (file, low, high, base, offset, n_regs, real_offset) save_regs (FILE *file, int low, int high, const char *base,
FILE *file; int offset, int n_regs, int real_offset)
int low, high;
const char *base;
int offset;
int n_regs;
int real_offset;
{ {
int i; int i;
...@@ -3667,12 +3504,8 @@ save_regs (file, low, high, base, offset, n_regs, real_offset) ...@@ -3667,12 +3504,8 @@ save_regs (file, low, high, base, offset, n_regs, real_offset)
v9 int regs as it simplifies the code. */ v9 int regs as it simplifies the code. */
static int static int
restore_regs (file, low, high, base, offset, n_regs) restore_regs (FILE *file, int low, int high, const char *base,
FILE *file; int offset, int n_regs)
int low, high;
const char *base;
int offset;
int n_regs;
{ {
int i; int i;
...@@ -3712,9 +3545,7 @@ restore_regs (file, low, high, base, offset, n_regs) ...@@ -3712,9 +3545,7 @@ restore_regs (file, low, high, base, offset, n_regs)
during the reload pass and also by output_function_prologue(). */ during the reload pass and also by output_function_prologue(). */
int int
compute_frame_size (size, leaf_function) compute_frame_size (int size, int leaf_function)
int size;
int leaf_function;
{ {
int n_regs = 0, i; int n_regs = 0, i;
int outgoing_args_size = (current_function_outgoing_args_size int outgoing_args_size = (current_function_outgoing_args_size
...@@ -3772,10 +3603,7 @@ compute_frame_size (size, leaf_function) ...@@ -3772,10 +3603,7 @@ compute_frame_size (size, leaf_function)
/* ??? We may be able to use the set macro here too. */ /* ??? We may be able to use the set macro here too. */
static void static void
build_big_number (file, num, reg) build_big_number (FILE *file, int num, const char *reg)
FILE *file;
int num;
const char *reg;
{ {
if (num >= 0 || ! TARGET_ARCH64) if (num >= 0 || ! TARGET_ARCH64)
{ {
...@@ -3801,8 +3629,7 @@ build_big_number (file, num, reg) ...@@ -3801,8 +3629,7 @@ build_big_number (file, num, reg)
/* Output any necessary .register pseudo-ops. */ /* Output any necessary .register pseudo-ops. */
void void
sparc_output_scratch_registers (file) sparc_output_scratch_registers (FILE *file ATTRIBUTE_UNUSED)
FILE *file ATTRIBUTE_UNUSED;
{ {
#ifdef HAVE_AS_REGISTER_PSEUDO_OP #ifdef HAVE_AS_REGISTER_PSEUDO_OP
int i; int i;
...@@ -3842,9 +3669,7 @@ sparc_output_scratch_registers (file) ...@@ -3842,9 +3669,7 @@ sparc_output_scratch_registers (file)
to do this is made in regclass.c. */ to do this is made in regclass.c. */
static void static void
sparc_output_function_prologue (file, size) sparc_output_function_prologue (FILE *file, HOST_WIDE_INT size)
FILE *file;
HOST_WIDE_INT size;
{ {
if (TARGET_FLAT) if (TARGET_FLAT)
sparc_flat_function_prologue (file, size); sparc_flat_function_prologue (file, size);
...@@ -3856,10 +3681,8 @@ sparc_output_function_prologue (file, size) ...@@ -3856,10 +3681,8 @@ sparc_output_function_prologue (file, size)
/* Output code for the function prologue. */ /* Output code for the function prologue. */
static void static void
sparc_nonflat_function_prologue (file, size, leaf_function) sparc_nonflat_function_prologue (FILE *file, HOST_WIDE_INT size,
FILE *file; int leaf_function)
HOST_WIDE_INT size;
int leaf_function;
{ {
sparc_output_scratch_registers (file); sparc_output_scratch_registers (file);
...@@ -3974,9 +3797,7 @@ sparc_nonflat_function_prologue (file, size, leaf_function) ...@@ -3974,9 +3797,7 @@ sparc_nonflat_function_prologue (file, size, leaf_function)
/* Output code to restore any call saved registers. */ /* Output code to restore any call saved registers. */
static void static void
output_restore_regs (file, leaf_function) output_restore_regs (FILE *file, int leaf_function ATTRIBUTE_UNUSED)
FILE *file;
int leaf_function ATTRIBUTE_UNUSED;
{ {
int offset, n_regs; int offset, n_regs;
const char *base; const char *base;
...@@ -4007,9 +3828,7 @@ output_restore_regs (file, leaf_function) ...@@ -4007,9 +3828,7 @@ output_restore_regs (file, leaf_function)
before returning. */ before returning. */
static void static void
sparc_output_function_epilogue (file, size) sparc_output_function_epilogue (FILE *file, HOST_WIDE_INT size)
FILE *file;
HOST_WIDE_INT size;
{ {
if (TARGET_FLAT) if (TARGET_FLAT)
sparc_flat_function_epilogue (file, size); sparc_flat_function_epilogue (file, size);
...@@ -4021,10 +3840,9 @@ sparc_output_function_epilogue (file, size) ...@@ -4021,10 +3840,9 @@ sparc_output_function_epilogue (file, size)
/* Output code for the function epilogue. */ /* Output code for the function epilogue. */
static void static void
sparc_nonflat_function_epilogue (file, size, leaf_function) sparc_nonflat_function_epilogue (FILE *file,
FILE *file; HOST_WIDE_INT size ATTRIBUTE_UNUSED,
HOST_WIDE_INT size ATTRIBUTE_UNUSED; int leaf_function)
int leaf_function;
{ {
const char *ret; const char *ret;
...@@ -4161,8 +3979,7 @@ sparc_nonflat_function_epilogue (file, size, leaf_function) ...@@ -4161,8 +3979,7 @@ sparc_nonflat_function_epilogue (file, size, leaf_function)
/* Output a sibling call. */ /* Output a sibling call. */
const char * const char *
output_sibcall (insn, call_operand) output_sibcall (rtx insn, rtx call_operand)
rtx insn, call_operand;
{ {
int leaf_regs = current_function_uses_only_leaf_regs; int leaf_regs = current_function_uses_only_leaf_regs;
rtx operands[3]; rtx operands[3];
...@@ -4364,11 +4181,9 @@ output_sibcall (insn, call_operand) ...@@ -4364,11 +4181,9 @@ output_sibcall (insn, call_operand)
For a library call, FNTYPE is 0. */ For a library call, FNTYPE is 0. */
void void
init_cumulative_args (cum, fntype, libname, fndecl) init_cumulative_args (struct sparc_args *cum, tree fntype,
CUMULATIVE_ARGS *cum; rtx libname ATTRIBUTE_UNUSED,
tree fntype; tree fndecl ATTRIBUTE_UNUSED)
rtx libname ATTRIBUTE_UNUSED;
tree fndecl ATTRIBUTE_UNUSED;
{ {
cum->words = 0; cum->words = 0;
cum->prototype_p = fntype && TYPE_ARG_TYPES (fntype); cum->prototype_p = fntype && TYPE_ARG_TYPES (fntype);
...@@ -4391,14 +4206,9 @@ init_cumulative_args (cum, fntype, libname, fndecl) ...@@ -4391,14 +4206,9 @@ init_cumulative_args (cum, fntype, libname, fndecl)
*PPADDING records the amount of padding needed in words. */ *PPADDING records the amount of padding needed in words. */
static int static int
function_arg_slotno (cum, mode, type, named, incoming_p, pregno, ppadding) function_arg_slotno (const struct sparc_args *cum, enum machine_mode mode,
const CUMULATIVE_ARGS *cum; tree type, int named, int incoming_p,
enum machine_mode mode; int *pregno, int *ppadding)
tree type;
int named;
int incoming_p;
int *pregno;
int *ppadding;
{ {
int regbase = (incoming_p int regbase = (incoming_p
? SPARC_INCOMING_INT_ARG_FIRST ? SPARC_INCOMING_INT_ARG_FIRST
...@@ -4552,10 +4362,8 @@ static rtx function_arg_record_value (tree, enum machine_mode, int, int, int); ...@@ -4552,10 +4362,8 @@ static rtx function_arg_record_value (tree, enum machine_mode, int, int, int);
recursively and determine how many registers will be required. */ recursively and determine how many registers will be required. */
static void static void
function_arg_record_value_1 (type, startbitpos, parms) function_arg_record_value_1 (tree type, HOST_WIDE_INT startbitpos,
tree type; struct function_arg_record_value_parms *parms)
HOST_WIDE_INT startbitpos;
struct function_arg_record_value_parms *parms;
{ {
tree field; tree field;
...@@ -4639,9 +4447,8 @@ function_arg_record_value_1 (type, startbitpos, parms) ...@@ -4639,9 +4447,8 @@ function_arg_record_value_1 (type, startbitpos, parms)
structure between parms->intoffset and bitpos to integer registers. */ structure between parms->intoffset and bitpos to integer registers. */
static void static void
function_arg_record_value_3 (bitpos, parms) function_arg_record_value_3 (HOST_WIDE_INT bitpos,
HOST_WIDE_INT bitpos; struct function_arg_record_value_parms *parms)
struct function_arg_record_value_parms *parms;
{ {
enum machine_mode mode; enum machine_mode mode;
unsigned int regno; unsigned int regno;
...@@ -4697,10 +4504,8 @@ function_arg_record_value_3 (bitpos, parms) ...@@ -4697,10 +4504,8 @@ function_arg_record_value_3 (bitpos, parms)
to make that happen. */ to make that happen. */
static void static void
function_arg_record_value_2 (type, startbitpos, parms) function_arg_record_value_2 (tree type, HOST_WIDE_INT startbitpos,
tree type; struct function_arg_record_value_parms *parms)
HOST_WIDE_INT startbitpos;
struct function_arg_record_value_parms *parms;
{ {
tree field; tree field;
int packed_p = 0; int packed_p = 0;
...@@ -4792,10 +4597,8 @@ function_arg_record_value_2 (type, startbitpos, parms) ...@@ -4792,10 +4597,8 @@ function_arg_record_value_2 (type, startbitpos, parms)
REGBASE is the regno of the base register for the parameter array. */ REGBASE is the regno of the base register for the parameter array. */
static rtx static rtx
function_arg_record_value (type, mode, slotno, named, regbase) function_arg_record_value (tree type, enum machine_mode mode,
tree type; int slotno, int named, int regbase)
enum machine_mode mode;
int slotno, named, regbase;
{ {
HOST_WIDE_INT typesize = int_size_in_bytes (type); HOST_WIDE_INT typesize = int_size_in_bytes (type);
struct function_arg_record_value_parms parms; struct function_arg_record_value_parms parms;
...@@ -4897,12 +4700,8 @@ function_arg_record_value (type, mode, slotno, named, regbase) ...@@ -4897,12 +4700,8 @@ function_arg_record_value (type, mode, slotno, named, regbase)
INCOMING_P is zero for FUNCTION_ARG, nonzero for FUNCTION_INCOMING_ARG. */ INCOMING_P is zero for FUNCTION_ARG, nonzero for FUNCTION_INCOMING_ARG. */
rtx rtx
function_arg (cum, mode, type, named, incoming_p) function_arg (const struct sparc_args *cum, enum machine_mode mode,
const CUMULATIVE_ARGS *cum; tree type, int named, int incoming_p)
enum machine_mode mode;
tree type;
int named;
int incoming_p;
{ {
int regbase = (incoming_p int regbase = (incoming_p
? SPARC_INCOMING_INT_ARG_FIRST ? SPARC_INCOMING_INT_ARG_FIRST
...@@ -5033,11 +4832,8 @@ function_arg (cum, mode, type, named, incoming_p) ...@@ -5033,11 +4832,8 @@ function_arg (cum, mode, type, named, incoming_p)
mode] will be split between that reg and memory. */ mode] will be split between that reg and memory. */
int int
function_arg_partial_nregs (cum, mode, type, named) function_arg_partial_nregs (const struct sparc_args *cum,
const CUMULATIVE_ARGS *cum; enum machine_mode mode, tree type, int named)
enum machine_mode mode;
tree type;
int named;
{ {
int slotno, regno, padding; int slotno, regno, padding;
...@@ -5104,11 +4900,9 @@ function_arg_partial_nregs (cum, mode, type, named) ...@@ -5104,11 +4900,9 @@ function_arg_partial_nregs (cum, mode, type, named)
For Pascal, also pass arrays by reference. */ For Pascal, also pass arrays by reference. */
int int
function_arg_pass_by_reference (cum, mode, type, named) function_arg_pass_by_reference (const struct sparc_args *cum ATTRIBUTE_UNUSED,
const CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED; enum machine_mode mode, tree type,
enum machine_mode mode; int named ATTRIBUTE_UNUSED)
tree type;
int named ATTRIBUTE_UNUSED;
{ {
if (TARGET_ARCH32) if (TARGET_ARCH32)
{ {
...@@ -5132,11 +4926,8 @@ function_arg_pass_by_reference (cum, mode, type, named) ...@@ -5132,11 +4926,8 @@ function_arg_pass_by_reference (cum, mode, type, named)
TYPE is null for libcalls where that information may not be available. */ TYPE is null for libcalls where that information may not be available. */
void void
function_arg_advance (cum, mode, type, named) function_arg_advance (struct sparc_args *cum, enum machine_mode mode,
CUMULATIVE_ARGS *cum; tree type, int named)
enum machine_mode mode;
tree type;
int named;
{ {
int slotno, regno, padding; int slotno, regno, padding;
...@@ -5188,9 +4979,7 @@ function_arg_advance (cum, mode, type, named) ...@@ -5188,9 +4979,7 @@ function_arg_advance (cum, mode, type, named)
argument slot. */ argument slot. */
enum direction enum direction
function_arg_padding (mode, type) function_arg_padding (enum machine_mode mode, tree type)
enum machine_mode mode;
tree type;
{ {
if (TARGET_ARCH64 && type != 0 && AGGREGATE_TYPE_P (type)) if (TARGET_ARCH64 && type != 0 && AGGREGATE_TYPE_P (type))
return upward; return upward;
...@@ -5210,10 +4999,7 @@ function_arg_padding (mode, type) ...@@ -5210,10 +4999,7 @@ function_arg_padding (mode, type)
except that up to 32-bytes may be returned in registers. */ except that up to 32-bytes may be returned in registers. */
rtx rtx
function_value (type, mode, incoming_p) function_value (tree type, enum machine_mode mode, int incoming_p)
tree type;
enum machine_mode mode;
int incoming_p;
{ {
int regno; int regno;
int regbase = (incoming_p int regbase = (incoming_p
...@@ -5264,7 +5050,7 @@ function_value (type, mode, incoming_p) ...@@ -5264,7 +5050,7 @@ function_value (type, mode, incoming_p)
the first unnamed parameter. */ the first unnamed parameter. */
rtx rtx
sparc_builtin_saveregs () sparc_builtin_saveregs (void)
{ {
int first_reg = current_function_args_info.words; int first_reg = current_function_args_info.words;
rtx address; rtx address;
...@@ -5291,9 +5077,7 @@ sparc_builtin_saveregs () ...@@ -5291,9 +5077,7 @@ sparc_builtin_saveregs ()
/* Implement `va_start' for varargs and stdarg. */ /* Implement `va_start' for varargs and stdarg. */
void void
sparc_va_start (valist, nextarg) sparc_va_start (tree valist, rtx nextarg)
tree valist;
rtx nextarg;
{ {
nextarg = expand_builtin_saveregs (); nextarg = expand_builtin_saveregs ();
std_expand_builtin_va_start (valist, nextarg); std_expand_builtin_va_start (valist, nextarg);
...@@ -5302,8 +5086,7 @@ sparc_va_start (valist, nextarg) ...@@ -5302,8 +5086,7 @@ sparc_va_start (valist, nextarg)
/* Implement `va_arg'. */ /* Implement `va_arg'. */
rtx rtx
sparc_va_arg (valist, type) sparc_va_arg (tree valist, tree type)
tree valist, type;
{ {
HOST_WIDE_INT size, rsize, align; HOST_WIDE_INT size, rsize, align;
tree addr, incr; tree addr, incr;
...@@ -5427,11 +5210,8 @@ sparc_va_arg (valist, type) ...@@ -5427,11 +5210,8 @@ sparc_va_arg (valist, type)
INSN, if set, is the insn. */ INSN, if set, is the insn. */
char * char *
output_cbranch (op, dest, label, reversed, annul, noop, insn) output_cbranch (rtx op, rtx dest, int label, int reversed, int annul,
rtx op, dest; int noop, rtx insn)
int label;
int reversed, annul, noop;
rtx insn;
{ {
static char string[50]; static char string[50];
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
...@@ -5675,9 +5455,7 @@ output_cbranch (op, dest, label, reversed, annul, noop, insn) ...@@ -5675,9 +5455,7 @@ output_cbranch (op, dest, label, reversed, annul, noop, insn)
values as arguments instead of the TFmode registers themselves, values as arguments instead of the TFmode registers themselves,
that's why we cannot call emit_float_lib_cmp. */ that's why we cannot call emit_float_lib_cmp. */
void void
sparc_emit_float_lib_cmp (x, y, comparison) sparc_emit_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison)
rtx x, y;
enum rtx_code comparison;
{ {
const char *qpfunc; const char *qpfunc;
rtx slot0, slot1, result, tem, tem2; rtx slot0, slot1, result, tem, tem2;
...@@ -5814,8 +5592,7 @@ sparc_emit_float_lib_cmp (x, y, comparison) ...@@ -5814,8 +5592,7 @@ sparc_emit_float_lib_cmp (x, y, comparison)
optabs would emit if we didn't have TFmode patterns. */ optabs would emit if we didn't have TFmode patterns. */
void void
sparc_emit_floatunsdi (operands) sparc_emit_floatunsdi (rtx *operands)
rtx operands[2];
{ {
rtx neglab, donelab, i0, i1, f0, in, out; rtx neglab, donelab, i0, i1, f0, in, out;
enum machine_mode mode; enum machine_mode mode;
...@@ -5858,11 +5635,8 @@ sparc_emit_floatunsdi (operands) ...@@ -5858,11 +5635,8 @@ sparc_emit_floatunsdi (operands)
NOOP is nonzero if we have to follow this branch by a noop. */ NOOP is nonzero if we have to follow this branch by a noop. */
char * char *
output_v9branch (op, dest, reg, label, reversed, annul, noop, insn) output_v9branch (rtx op, rtx dest, int reg, int label, int reversed,
rtx op, dest; int annul, int noop, rtx insn)
int reg, label;
int reversed, annul, noop;
rtx insn;
{ {
static char string[50]; static char string[50];
enum rtx_code code = GET_CODE (op); enum rtx_code code = GET_CODE (op);
...@@ -6002,9 +5776,7 @@ output_v9branch (op, dest, reg, label, reversed, annul, noop, insn) ...@@ -6002,9 +5776,7 @@ output_v9branch (op, dest, reg, label, reversed, annul, noop, insn)
*/ */
static int static int
epilogue_renumber (where, test) epilogue_renumber (register rtx *where, int test)
register rtx *where;
int test;
{ {
register const char *fmt; register const char *fmt;
register int i; register int i;
...@@ -6088,7 +5860,7 @@ static const int *const reg_alloc_orders[] = { ...@@ -6088,7 +5860,7 @@ static const int *const reg_alloc_orders[] = {
reg_nonleaf_alloc_order}; reg_nonleaf_alloc_order};
void void
order_regs_for_local_alloc () order_regs_for_local_alloc (void)
{ {
static int last_order_nonleaf = 1; static int last_order_nonleaf = 1;
...@@ -6105,9 +5877,7 @@ order_regs_for_local_alloc () ...@@ -6105,9 +5877,7 @@ order_regs_for_local_alloc ()
mem<-->reg splits to be run. */ mem<-->reg splits to be run. */
int int
sparc_splitdi_legitimate (reg, mem) sparc_splitdi_legitimate (rtx reg, rtx mem)
rtx reg;
rtx mem;
{ {
/* Punt if we are here by mistake. */ /* Punt if we are here by mistake. */
if (! reload_completed) if (! reload_completed)
...@@ -6132,8 +5902,7 @@ sparc_splitdi_legitimate (reg, mem) ...@@ -6132,8 +5902,7 @@ sparc_splitdi_legitimate (reg, mem)
run after reload. */ run after reload. */
int int
sparc_absnegfloat_split_legitimate (x, y) sparc_absnegfloat_split_legitimate (rtx x, rtx y)
rtx x, y;
{ {
if (GET_CODE (x) != REG) if (GET_CODE (x) != REG)
return 0; return 0;
...@@ -6150,8 +5919,7 @@ sparc_absnegfloat_split_legitimate (x, y) ...@@ -6150,8 +5919,7 @@ sparc_absnegfloat_split_legitimate (x, y)
Note reg1 and reg2 *must* be hard registers. */ Note reg1 and reg2 *must* be hard registers. */
int int
registers_ok_for_ldd_peep (reg1, reg2) registers_ok_for_ldd_peep (rtx reg1, rtx reg2)
rtx reg1, reg2;
{ {
/* We might have been passed a SUBREG. */ /* We might have been passed a SUBREG. */
if (GET_CODE (reg1) != REG || GET_CODE (reg2) != REG) if (GET_CODE (reg1) != REG || GET_CODE (reg2) != REG)
...@@ -6199,8 +5967,7 @@ registers_ok_for_ldd_peep (reg1, reg2) ...@@ -6199,8 +5967,7 @@ registers_ok_for_ldd_peep (reg1, reg2)
NULL_RTX. */ NULL_RTX. */
int int
mems_ok_for_ldd_peep (mem1, mem2, dependent_reg_rtx) mems_ok_for_ldd_peep (rtx mem1, rtx mem2, rtx dependent_reg_rtx)
rtx mem1, mem2, dependent_reg_rtx;
{ {
rtx addr1, addr2; rtx addr1, addr2;
unsigned int reg1; unsigned int reg1;
...@@ -6274,8 +6041,7 @@ mems_ok_for_ldd_peep (mem1, mem2, dependent_reg_rtx) ...@@ -6274,8 +6041,7 @@ mems_ok_for_ldd_peep (mem1, mem2, dependent_reg_rtx)
ldd and std insns. */ ldd and std insns. */
int int
register_ok_for_ldd (reg) register_ok_for_ldd (rtx reg)
rtx reg;
{ {
/* We might have been passed a SUBREG. */ /* We might have been passed a SUBREG. */
if (GET_CODE (reg) != REG) if (GET_CODE (reg) != REG)
...@@ -6292,10 +6058,7 @@ register_ok_for_ldd (reg) ...@@ -6292,10 +6058,7 @@ register_ok_for_ldd (reg)
For `%' followed by punctuation, CODE is the punctuation and X is null. */ For `%' followed by punctuation, CODE is the punctuation and X is null. */
void void
print_operand (file, x, code) print_operand (FILE *file, rtx x, int code)
FILE *file;
rtx x;
int code;
{ {
switch (code) switch (code)
{ {
...@@ -6580,10 +6343,7 @@ print_operand (file, x, code) ...@@ -6580,10 +6343,7 @@ print_operand (file, x, code)
special handling for aligned DI-mode objects. */ special handling for aligned DI-mode objects. */
static bool static bool
sparc_assemble_integer (x, size, aligned_p) sparc_assemble_integer (rtx x, unsigned int size, int aligned_p)
rtx x;
unsigned int size;
int aligned_p;
{ {
/* ??? We only output .xword's for symbols and only then in environments /* ??? We only output .xword's for symbols and only then in environments
where the assembler can handle them. */ where the assembler can handle them. */
...@@ -6638,8 +6398,7 @@ sparc_assemble_integer (x, size, aligned_p) ...@@ -6638,8 +6398,7 @@ sparc_assemble_integer (x, size, aligned_p)
#endif #endif
unsigned long unsigned long
sparc_type_code (type) sparc_type_code (register tree type)
register tree type;
{ {
register unsigned long qualifiers = 0; register unsigned long qualifiers = 0;
register unsigned shift; register unsigned shift;
...@@ -6763,8 +6522,7 @@ sparc_type_code (type) ...@@ -6763,8 +6522,7 @@ sparc_type_code (type)
Emit enough FLUSH insns to synchronize the data and instruction caches. */ Emit enough FLUSH insns to synchronize the data and instruction caches. */
void void
sparc_initialize_trampoline (tramp, fnaddr, cxt) sparc_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
rtx tramp, fnaddr, cxt;
{ {
/* SPARC 32 bit trampoline: /* SPARC 32 bit trampoline:
...@@ -6825,8 +6583,7 @@ sparc_initialize_trampoline (tramp, fnaddr, cxt) ...@@ -6825,8 +6583,7 @@ sparc_initialize_trampoline (tramp, fnaddr, cxt)
we can read the PC without clobbering a register. */ we can read the PC without clobbering a register. */
void void
sparc64_initialize_trampoline (tramp, fnaddr, cxt) sparc64_initialize_trampoline (rtx tramp, rtx fnaddr, rtx cxt)
rtx tramp, fnaddr, cxt;
{ {
#ifdef TRANSFER_FROM_TRAMPOLINE #ifdef TRANSFER_FROM_TRAMPOLINE
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"), emit_library_call (gen_rtx (SYMBOL_REF, Pmode, "__enable_execute_stack"),
...@@ -6957,8 +6714,8 @@ struct sparc_frame_info zero_frame_info; ...@@ -6957,8 +6714,8 @@ struct sparc_frame_info zero_frame_info;
stack pointer. */ stack pointer. */
unsigned long unsigned long
sparc_flat_compute_frame_size (size) sparc_flat_compute_frame_size (int size)
int size; /* # of var. bytes allocated. */ /* # of var. bytes allocated. */
{ {
int regno; int regno;
unsigned long total_size; /* # bytes that the entire frame takes up. */ unsigned long total_size; /* # bytes that the entire frame takes up. */
...@@ -7076,16 +6833,11 @@ sparc_flat_compute_frame_size (size) ...@@ -7076,16 +6833,11 @@ sparc_flat_compute_frame_size (size)
DOUBLEWORD_OP is either "std" for save, "ldd" for restore. */ DOUBLEWORD_OP is either "std" for save, "ldd" for restore. */
void void
sparc_flat_save_restore (file, base_reg, offset, gmask, fmask, word_op, sparc_flat_save_restore (FILE *file, const char *base_reg,
doubleword_op, base_offset) unsigned int offset, long unsigned int gmask,
FILE *file; long unsigned int fmask, const char *word_op,
const char *base_reg; const char *doubleword_op,
unsigned int offset; long unsigned int base_offset)
unsigned long gmask;
unsigned long fmask;
const char *word_op;
const char *doubleword_op;
unsigned long base_offset;
{ {
int regno; int regno;
...@@ -7180,9 +6932,7 @@ sparc_flat_save_restore (file, base_reg, offset, gmask, fmask, word_op, ...@@ -7180,9 +6932,7 @@ sparc_flat_save_restore (file, base_reg, offset, gmask, fmask, word_op,
/* Set up the stack and frame (if desired) for the function. */ /* Set up the stack and frame (if desired) for the function. */
static void static void
sparc_flat_function_prologue (file, size) sparc_flat_function_prologue (FILE *file, HOST_WIDE_INT size)
FILE *file;
HOST_WIDE_INT size;
{ {
const char *sp_str = reg_names[STACK_POINTER_REGNUM]; const char *sp_str = reg_names[STACK_POINTER_REGNUM];
unsigned long gmask = current_frame_info.gmask; unsigned long gmask = current_frame_info.gmask;
...@@ -7368,9 +7118,7 @@ sparc_flat_function_prologue (file, size) ...@@ -7368,9 +7118,7 @@ sparc_flat_function_prologue (file, size)
and regs. */ and regs. */
static void static void
sparc_flat_function_epilogue (file, size) sparc_flat_function_epilogue (FILE *file, HOST_WIDE_INT size)
FILE *file;
HOST_WIDE_INT size;
{ {
rtx epilogue_delay = current_function_epilogue_delay_list; rtx epilogue_delay = current_function_epilogue_delay_list;
int noepilogue = FALSE; int noepilogue = FALSE;
...@@ -7515,7 +7263,7 @@ sparc_flat_function_epilogue (file, size) ...@@ -7515,7 +7263,7 @@ sparc_flat_function_epilogue (file, size)
or the only register saved is the return register. */ or the only register saved is the return register. */
int int
sparc_flat_epilogue_delay_slots () sparc_flat_epilogue_delay_slots (void)
{ {
if (!current_frame_info.initialized) if (!current_frame_info.initialized)
(void) sparc_flat_compute_frame_size (get_frame_size ()); (void) sparc_flat_compute_frame_size (get_frame_size ());
...@@ -7531,9 +7279,7 @@ sparc_flat_epilogue_delay_slots () ...@@ -7531,9 +7279,7 @@ sparc_flat_epilogue_delay_slots ()
pointer is OK. */ pointer is OK. */
int int
sparc_flat_eligible_for_epilogue_delay (trial, slot) sparc_flat_eligible_for_epilogue_delay (rtx trial, int slot ATTRIBUTE_UNUSED)
rtx trial;
int slot ATTRIBUTE_UNUSED;
{ {
rtx pat = PATTERN (trial); rtx pat = PATTERN (trial);
...@@ -7551,11 +7297,7 @@ sparc_flat_eligible_for_epilogue_delay (trial, slot) ...@@ -7551,11 +7297,7 @@ sparc_flat_eligible_for_epilogue_delay (trial, slot)
a dependency LINK or INSN on DEP_INSN. COST is the current cost. */ a dependency LINK or INSN on DEP_INSN. COST is the current cost. */
static int static int
supersparc_adjust_cost (insn, link, dep_insn, cost) supersparc_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
rtx insn;
rtx link;
rtx dep_insn;
int cost;
{ {
enum attr_type insn_type; enum attr_type insn_type;
...@@ -7616,11 +7358,7 @@ supersparc_adjust_cost (insn, link, dep_insn, cost) ...@@ -7616,11 +7358,7 @@ supersparc_adjust_cost (insn, link, dep_insn, cost)
} }
static int static int
hypersparc_adjust_cost (insn, link, dep_insn, cost) hypersparc_adjust_cost (rtx insn, rtx link, rtx dep_insn, int cost)
rtx insn;
rtx link;
rtx dep_insn;
int cost;
{ {
enum attr_type insn_type, dep_type; enum attr_type insn_type, dep_type;
rtx pat = PATTERN(insn); rtx pat = PATTERN(insn);
...@@ -7697,11 +7435,7 @@ hypersparc_adjust_cost (insn, link, dep_insn, cost) ...@@ -7697,11 +7435,7 @@ hypersparc_adjust_cost (insn, link, dep_insn, cost)
} }
static int static int
sparc_adjust_cost(insn, link, dep, cost) sparc_adjust_cost(rtx insn, rtx link, rtx dep, int cost)
rtx insn;
rtx link;
rtx dep;
int cost;
{ {
switch (sparc_cpu) switch (sparc_cpu)
{ {
...@@ -7719,15 +7453,14 @@ sparc_adjust_cost(insn, link, dep, cost) ...@@ -7719,15 +7453,14 @@ sparc_adjust_cost(insn, link, dep, cost)
} }
static void static void
sparc_sched_init (dump, sched_verbose, max_ready) sparc_sched_init (FILE *dump ATTRIBUTE_UNUSED,
FILE *dump ATTRIBUTE_UNUSED; int sched_verbose ATTRIBUTE_UNUSED,
int sched_verbose ATTRIBUTE_UNUSED; int max_ready ATTRIBUTE_UNUSED)
int max_ready ATTRIBUTE_UNUSED;
{ {
} }
static int static int
sparc_use_dfa_pipeline_interface () sparc_use_dfa_pipeline_interface (void)
{ {
if ((1 << sparc_cpu) & if ((1 << sparc_cpu) &
((1 << PROCESSOR_ULTRASPARC) | (1 << PROCESSOR_CYPRESS) | ((1 << PROCESSOR_ULTRASPARC) | (1 << PROCESSOR_CYPRESS) |
...@@ -7739,7 +7472,7 @@ sparc_use_dfa_pipeline_interface () ...@@ -7739,7 +7472,7 @@ sparc_use_dfa_pipeline_interface ()
} }
static int static int
sparc_use_sched_lookahead () sparc_use_sched_lookahead (void)
{ {
if (sparc_cpu == PROCESSOR_ULTRASPARC if (sparc_cpu == PROCESSOR_ULTRASPARC
|| sparc_cpu == PROCESSOR_ULTRASPARC3) || sparc_cpu == PROCESSOR_ULTRASPARC3)
...@@ -7752,7 +7485,7 @@ sparc_use_sched_lookahead () ...@@ -7752,7 +7485,7 @@ sparc_use_sched_lookahead ()
} }
static int static int
sparc_issue_rate () sparc_issue_rate (void)
{ {
switch (sparc_cpu) switch (sparc_cpu)
{ {
...@@ -7773,8 +7506,7 @@ sparc_issue_rate () ...@@ -7773,8 +7506,7 @@ sparc_issue_rate ()
} }
static int static int
set_extends (insn) set_extends (rtx insn)
rtx insn;
{ {
register rtx pat = PATTERN (insn); register rtx pat = PATTERN (insn);
...@@ -7841,9 +7573,7 @@ static GTY(()) rtx sparc_addr_diff_list; ...@@ -7841,9 +7573,7 @@ static GTY(()) rtx sparc_addr_diff_list;
static GTY(()) rtx sparc_addr_list; static GTY(()) rtx sparc_addr_list;
void void
sparc_defer_case_vector (lab, vec, diff) sparc_defer_case_vector (rtx lab, rtx vec, int diff)
rtx lab, vec;
int diff;
{ {
vec = gen_rtx_EXPR_LIST (VOIDmode, lab, vec); vec = gen_rtx_EXPR_LIST (VOIDmode, lab, vec);
if (diff) if (diff)
...@@ -7854,8 +7584,7 @@ sparc_defer_case_vector (lab, vec, diff) ...@@ -7854,8 +7584,7 @@ sparc_defer_case_vector (lab, vec, diff)
} }
static void static void
sparc_output_addr_vec (vec) sparc_output_addr_vec (rtx vec)
rtx vec;
{ {
rtx lab = XEXP (vec, 0), body = XEXP (vec, 1); rtx lab = XEXP (vec, 0), body = XEXP (vec, 1);
int idx, vlen = XVECLEN (body, 0); int idx, vlen = XVECLEN (body, 0);
...@@ -7883,8 +7612,7 @@ sparc_output_addr_vec (vec) ...@@ -7883,8 +7612,7 @@ sparc_output_addr_vec (vec)
} }
static void static void
sparc_output_addr_diff_vec (vec) sparc_output_addr_diff_vec (rtx vec)
rtx vec;
{ {
rtx lab = XEXP (vec, 0), body = XEXP (vec, 1); rtx lab = XEXP (vec, 0), body = XEXP (vec, 1);
rtx base = XEXP (XEXP (body, 0), 0); rtx base = XEXP (XEXP (body, 0), 0);
...@@ -7916,7 +7644,7 @@ sparc_output_addr_diff_vec (vec) ...@@ -7916,7 +7644,7 @@ sparc_output_addr_diff_vec (vec)
} }
static void static void
sparc_output_deferred_case_vectors () sparc_output_deferred_case_vectors (void)
{ {
rtx t; rtx t;
int align; int align;
...@@ -7944,8 +7672,7 @@ sparc_output_deferred_case_vectors () ...@@ -7944,8 +7672,7 @@ sparc_output_deferred_case_vectors ()
unknown. Return 1 if the high bits are zero, -1 if the register is unknown. Return 1 if the high bits are zero, -1 if the register is
sign extended. */ sign extended. */
int int
sparc_check_64 (x, insn) sparc_check_64 (rtx x, rtx insn)
rtx x, insn;
{ {
/* If a register is set only once it is safe to ignore insns this /* If a register is set only once it is safe to ignore insns this
code does not know how to handle. The loop will either recognize code does not know how to handle. The loop will either recognize
...@@ -8005,10 +7732,7 @@ sparc_check_64 (x, insn) ...@@ -8005,10 +7732,7 @@ sparc_check_64 (x, insn)
/* Returns assembly code to perform a DImode shift using /* Returns assembly code to perform a DImode shift using
a 64-bit global or out register on SPARC-V8+. */ a 64-bit global or out register on SPARC-V8+. */
char * char *
sparc_v8plus_shift (operands, insn, opcode) sparc_v8plus_shift (rtx *operands, rtx insn, const char *opcode)
rtx *operands;
rtx insn;
const char *opcode;
{ {
static char asm_code[60]; static char asm_code[60];
...@@ -8041,8 +7765,7 @@ sparc_v8plus_shift (operands, insn, opcode) ...@@ -8041,8 +7765,7 @@ sparc_v8plus_shift (operands, insn, opcode)
for profiling a function entry. */ for profiling a function entry. */
void void
sparc_profile_hook (labelno) sparc_profile_hook (int labelno)
int labelno;
{ {
char buf[32]; char buf[32];
rtx lab, fun; rtx lab, fun;
...@@ -8056,9 +7779,7 @@ sparc_profile_hook (labelno) ...@@ -8056,9 +7779,7 @@ sparc_profile_hook (labelno)
#ifdef OBJECT_FORMAT_ELF #ifdef OBJECT_FORMAT_ELF
static void static void
sparc_elf_asm_named_section (name, flags) sparc_elf_asm_named_section (const char *name, unsigned int flags)
const char *name;
unsigned int flags;
{ {
if (flags & SECTION_MERGE) if (flags & SECTION_MERGE)
{ {
...@@ -8100,9 +7821,7 @@ sparc_elf_asm_named_section (name, flags) ...@@ -8100,9 +7821,7 @@ sparc_elf_asm_named_section (name, flags)
void) and then nothing else happens. Such a sibling call would look void) and then nothing else happens. Such a sibling call would look
valid without the added check here. */ valid without the added check here. */
static bool static bool
sparc_function_ok_for_sibcall (decl, exp) sparc_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED)
tree decl;
tree exp ATTRIBUTE_UNUSED;
{ {
return (decl return (decl
&& ! TARGET_FLAT && ! TARGET_FLAT
...@@ -8114,10 +7833,7 @@ sparc_function_ok_for_sibcall (decl, exp) ...@@ -8114,10 +7833,7 @@ sparc_function_ok_for_sibcall (decl, exp)
pretending PIC always on), but that's what the old code did. */ pretending PIC always on), but that's what the old code did. */
static void static void
sparc_aout_select_section (t, reloc, align) sparc_aout_select_section (tree t, int reloc, unsigned HOST_WIDE_INT align)
tree t;
int reloc;
unsigned HOST_WIDE_INT align;
{ {
default_select_section (t, reloc | SUNOS4_SHARED_LIBRARIES, align); default_select_section (t, reloc | SUNOS4_SHARED_LIBRARIES, align);
} }
...@@ -8126,10 +7842,8 @@ sparc_aout_select_section (t, reloc, align) ...@@ -8126,10 +7842,8 @@ sparc_aout_select_section (t, reloc, align)
that offers. */ that offers. */
static void static void
sparc_aout_select_rtx_section (mode, x, align) sparc_aout_select_rtx_section (enum machine_mode mode, rtx x,
enum machine_mode mode; unsigned HOST_WIDE_INT align)
rtx x;
unsigned HOST_WIDE_INT align;
{ {
if (align <= MAX_TEXT_ALIGN if (align <= MAX_TEXT_ALIGN
&& ! (flag_pic && (symbolic_operand (x, mode) && ! (flag_pic && (symbolic_operand (x, mode)
...@@ -8140,10 +7854,7 @@ sparc_aout_select_rtx_section (mode, x, align) ...@@ -8140,10 +7854,7 @@ sparc_aout_select_rtx_section (mode, x, align)
} }
int int
sparc_extra_constraint_check (op, c, strict) sparc_extra_constraint_check (rtx op, int c, int strict)
rtx op;
int c;
int strict;
{ {
int reload_ok_mem; int reload_ok_mem;
...@@ -8206,9 +7917,7 @@ sparc_extra_constraint_check (op, c, strict) ...@@ -8206,9 +7917,7 @@ sparc_extra_constraint_check (op, c, strict)
??? the latencies and then CSE will just use that. */ ??? the latencies and then CSE will just use that. */
static bool static bool
sparc_rtx_costs (x, code, outer_code, total) sparc_rtx_costs (rtx x, int code, int outer_code, int *total)
rtx x;
int code, outer_code, *total;
{ {
switch (code) switch (code)
{ {
...@@ -8576,12 +8285,10 @@ sparc_rtx_costs (x, code, outer_code, total) ...@@ -8576,12 +8285,10 @@ sparc_rtx_costs (x, code, outer_code, total)
Used for C++ multiple inheritance. */ Used for C++ multiple inheritance. */
static void static void
sparc_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function) sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
FILE *file; HOST_WIDE_INT delta,
tree thunk_fndecl ATTRIBUTE_UNUSED; HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED,
HOST_WIDE_INT delta; tree function)
HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED;
tree function;
{ {
rtx this, insn, funexp, delta_rtx, tmp; rtx this, insn, funexp, delta_rtx, tmp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment