cris-protos.h, cris.c: Convert to ISO C90 function declarations and definitions.
* config/cris/cris-protos.h, config/cris/cris.c: Convert to ISO C90 function declarations and definitions. From-SVN: r71972
This commit is contained in:
parent
3fc87ac147
commit
6640377c03
3 changed files with 111 additions and 185 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-10-01 Steven Bosscher <steven@gcc.gnu.org>
|
||||||
|
|
||||||
|
* config/cris/cris-protos.h, config/cris/cris.c: Convert to ISO
|
||||||
|
C90 function declarations and definitions.
|
||||||
|
|
||||||
2003-10-01 Nathanael Nerode <neroden@gcc.gnu.org>
|
2003-10-01 Nathanael Nerode <neroden@gcc.gnu.org>
|
||||||
|
|
||||||
* config.gcc (cris-*-linux*): Revert mistaken commit.
|
* config.gcc (cris-*-linux*): Revert mistaken commit.
|
||||||
|
|
|
@ -25,41 +25,40 @@ Boston, MA 02111-1307, USA. */
|
||||||
#define STDIO_INCLUDED
|
#define STDIO_INCLUDED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void cris_conditional_register_usage PARAMS ((void));
|
extern void cris_conditional_register_usage (void);
|
||||||
extern int cris_simple_epilogue PARAMS ((void));
|
extern int cris_simple_epilogue (void);
|
||||||
#ifdef RTX_CODE
|
#ifdef RTX_CODE
|
||||||
extern const char *cris_op_str PARAMS ((rtx));
|
extern const char *cris_op_str (rtx);
|
||||||
extern int cris_eligible_for_epilogue_delay PARAMS ((rtx));
|
extern int cris_eligible_for_epilogue_delay (rtx);
|
||||||
extern void cris_notice_update_cc PARAMS ((rtx, rtx));
|
extern void cris_notice_update_cc (rtx, rtx);
|
||||||
extern void cris_print_operand PARAMS ((FILE *, rtx, int));
|
extern void cris_print_operand (FILE *, rtx, int);
|
||||||
extern void cris_print_operand_address PARAMS ((FILE *, rtx));
|
extern void cris_print_operand_address (FILE *, rtx);
|
||||||
extern int cris_side_effect_mode_ok PARAMS ((enum rtx_code, rtx *, int, int,
|
extern int cris_side_effect_mode_ok (enum rtx_code, rtx *, int, int,
|
||||||
int, int, int));
|
int, int, int);
|
||||||
extern rtx cris_return_addr_rtx PARAMS ((int, rtx));
|
extern rtx cris_return_addr_rtx (int, rtx);
|
||||||
extern rtx cris_split_movdx PARAMS ((rtx *));
|
extern rtx cris_split_movdx (rtx *);
|
||||||
extern int cris_legitimate_pic_operand PARAMS ((rtx));
|
extern int cris_legitimate_pic_operand (rtx);
|
||||||
extern int cris_gotless_symbol PARAMS ((rtx));
|
extern int cris_gotless_symbol (rtx);
|
||||||
extern int cris_got_symbol PARAMS ((rtx));
|
extern int cris_got_symbol (rtx);
|
||||||
extern int cris_symbol PARAMS ((rtx));
|
extern int cris_symbol (rtx);
|
||||||
extern void cris_output_addr_const PARAMS ((FILE *, rtx));
|
extern void cris_output_addr_const (FILE *, rtx);
|
||||||
extern int cris_cfun_uses_pic_table PARAMS ((void));
|
extern int cris_cfun_uses_pic_table (void);
|
||||||
extern void cris_target_asm_named_section
|
extern void cris_target_asm_named_section (const char *, unsigned int);
|
||||||
PARAMS ((const char *, unsigned int));
|
|
||||||
|
|
||||||
# ifdef TREE_CODE
|
# ifdef TREE_CODE
|
||||||
extern rtx cris_expand_builtin_va_arg PARAMS ((tree, tree));
|
extern rtx cris_expand_builtin_va_arg (tree, tree);
|
||||||
# endif
|
# endif
|
||||||
#endif /* RTX_CODE */
|
#endif /* RTX_CODE */
|
||||||
|
|
||||||
extern void cris_pragma_expand_mul PARAMS ((struct cpp_reader *));
|
extern void cris_pragma_expand_mul (struct cpp_reader *);
|
||||||
|
|
||||||
/* Need one that returns an int; usable in expressions. */
|
/* Need one that returns an int; usable in expressions. */
|
||||||
extern int cris_fatal PARAMS ((char *));
|
extern int cris_fatal (char *);
|
||||||
|
|
||||||
extern void cris_override_options PARAMS ((void));
|
extern void cris_override_options (void);
|
||||||
|
|
||||||
extern int cris_initial_elimination_offset PARAMS ((int, int));
|
extern int cris_initial_elimination_offset (int, int);
|
||||||
|
|
||||||
extern void cris_init_expanders PARAMS ((void));
|
extern void cris_init_expanders (void);
|
||||||
|
|
||||||
extern int cris_delay_slots_for_epilogue PARAMS ((void));
|
extern int cris_delay_slots_for_epilogue (void);
|
||||||
|
|
|
@ -82,33 +82,31 @@ static char cris_output_insn_is_bound = 0;
|
||||||
static int cris_pic_sympart_only = 0;
|
static int cris_pic_sympart_only = 0;
|
||||||
|
|
||||||
/* Fix for reg_overlap_mentioned_p. */
|
/* Fix for reg_overlap_mentioned_p. */
|
||||||
static int cris_reg_overlap_mentioned_p PARAMS ((rtx, rtx));
|
static int cris_reg_overlap_mentioned_p (rtx, rtx);
|
||||||
|
|
||||||
static void cris_print_base PARAMS ((rtx, FILE *));
|
static void cris_print_base (rtx, FILE *);
|
||||||
|
|
||||||
static void cris_print_index PARAMS ((rtx, FILE *));
|
static void cris_print_index (rtx, FILE *);
|
||||||
|
|
||||||
static struct machine_function * cris_init_machine_status PARAMS ((void));
|
static struct machine_function * cris_init_machine_status (void);
|
||||||
|
|
||||||
static int cris_initial_frame_pointer_offset PARAMS ((void));
|
static int cris_initial_frame_pointer_offset (void);
|
||||||
|
|
||||||
static int saved_regs_mentioned PARAMS ((rtx));
|
static int saved_regs_mentioned (rtx);
|
||||||
|
|
||||||
static void cris_target_asm_function_prologue
|
static void cris_target_asm_function_prologue (FILE *, HOST_WIDE_INT);
|
||||||
PARAMS ((FILE *, HOST_WIDE_INT));
|
|
||||||
|
|
||||||
static void cris_target_asm_function_epilogue
|
static void cris_target_asm_function_epilogue (FILE *, HOST_WIDE_INT);
|
||||||
PARAMS ((FILE *, HOST_WIDE_INT));
|
|
||||||
|
|
||||||
static void cris_operand_lossage PARAMS ((const char *, rtx));
|
static void cris_operand_lossage (const char *, rtx);
|
||||||
|
|
||||||
static void cris_asm_output_mi_thunk
|
static void cris_asm_output_mi_thunk
|
||||||
PARAMS ((FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree));
|
(FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree);
|
||||||
|
|
||||||
static void cris_file_start PARAMS ((void));
|
static void cris_file_start (void);
|
||||||
|
|
||||||
static bool cris_rtx_costs PARAMS ((rtx, int, int, int *));
|
static bool cris_rtx_costs (rtx, int, int, int *);
|
||||||
static int cris_address_cost PARAMS ((rtx));
|
static int cris_address_cost (rtx);
|
||||||
|
|
||||||
/* The function cris_target_asm_function_epilogue puts the last insn to
|
/* The function cris_target_asm_function_epilogue puts the last insn to
|
||||||
output here. It always fits; there won't be a symbol operand. Used in
|
output here. It always fits; there won't be a symbol operand. Used in
|
||||||
|
@ -184,9 +182,7 @@ struct gcc_target targetm = TARGET_INITIALIZER;
|
||||||
c) a [r] or [r+] in SImode, or sign-extend from HI or QI. */
|
c) a [r] or [r+] in SImode, or sign-extend from HI or QI. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_bdap_operand (op, mode)
|
cris_bdap_operand (rtx op, enum machine_mode mode)
|
||||||
rtx op;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
register enum rtx_code code = GET_CODE (op);
|
register enum rtx_code code = GET_CODE (op);
|
||||||
|
|
||||||
|
@ -243,9 +239,7 @@ cris_bdap_operand (op, mode)
|
||||||
d) a [r] or [r+] in SImode, or sign-extend from HI or QI. */
|
d) a [r] or [r+] in SImode, or sign-extend from HI or QI. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_bdap_biap_operand (op, mode)
|
cris_bdap_biap_operand (rtx op, enum machine_mode mode)
|
||||||
rtx op;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
register enum rtx_code code = GET_CODE (op);
|
register enum rtx_code code = GET_CODE (op);
|
||||||
rtx reg;
|
rtx reg;
|
||||||
|
@ -290,9 +284,7 @@ cris_bdap_biap_operand (op, mode)
|
||||||
AND or UMIN. */
|
AND or UMIN. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_orthogonal_operator (x, mode)
|
cris_orthogonal_operator (rtx x, enum machine_mode mode)
|
||||||
rtx x;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
enum rtx_code code = GET_CODE (x);
|
enum rtx_code code = GET_CODE (x);
|
||||||
|
|
||||||
|
@ -308,9 +300,7 @@ cris_orthogonal_operator (x, mode)
|
||||||
UMIN. */
|
UMIN. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_commutative_orth_op (x, mode)
|
cris_commutative_orth_op (rtx x, enum machine_mode mode)
|
||||||
rtx x;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
enum rtx_code code = GET_CODE (x);
|
enum rtx_code code = GET_CODE (x);
|
||||||
|
|
||||||
|
@ -325,9 +315,7 @@ cris_commutative_orth_op (x, mode)
|
||||||
/* Check if MODE is same as mode for X, and X is PLUS or MINUS or UMIN. */
|
/* Check if MODE is same as mode for X, and X is PLUS or MINUS or UMIN. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_operand_extend_operator (x, mode)
|
cris_operand_extend_operator (rtx x, enum machine_mode mode)
|
||||||
rtx x;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
enum rtx_code code = GET_CODE (x);
|
enum rtx_code code = GET_CODE (x);
|
||||||
|
|
||||||
|
@ -341,9 +329,7 @@ cris_operand_extend_operator (x, mode)
|
||||||
/* Check if MODE is same as mode for X, and X is PLUS or MINUS. */
|
/* Check if MODE is same as mode for X, and X is PLUS or MINUS. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_additive_operand_extend_operator (x, mode)
|
cris_additive_operand_extend_operator (rtx x, enum machine_mode mode)
|
||||||
rtx x;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
enum rtx_code code = GET_CODE (x);
|
enum rtx_code code = GET_CODE (x);
|
||||||
|
|
||||||
|
@ -358,9 +344,7 @@ cris_additive_operand_extend_operator (x, mode)
|
||||||
ZERO_EXTEND. */
|
ZERO_EXTEND. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_extend_operator (x, mode)
|
cris_extend_operator (rtx x, enum machine_mode mode)
|
||||||
rtx x;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
enum rtx_code code = GET_CODE (x);
|
enum rtx_code code = GET_CODE (x);
|
||||||
|
|
||||||
|
@ -374,9 +358,7 @@ cris_extend_operator (x, mode)
|
||||||
/* Check to see if MODE is same as mode for X, and X is PLUS or BOUND. */
|
/* Check to see if MODE is same as mode for X, and X is PLUS or BOUND. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_plus_or_bound_operator (x, mode)
|
cris_plus_or_bound_operator (rtx x, enum machine_mode mode)
|
||||||
rtx x;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
enum rtx_code code = GET_CODE (x);
|
enum rtx_code code = GET_CODE (x);
|
||||||
|
|
||||||
|
@ -392,9 +374,7 @@ cris_plus_or_bound_operator (x, mode)
|
||||||
"movsi" expander. */
|
"movsi" expander. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_general_operand_or_symbol (op, mode)
|
cris_general_operand_or_symbol (rtx op, enum machine_mode mode)
|
||||||
rtx op;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
return general_operand (op, mode)
|
return general_operand (op, mode)
|
||||||
|| (CONSTANT_P (op) && cris_symbol (op));
|
|| (CONSTANT_P (op) && cris_symbol (op));
|
||||||
|
@ -405,9 +385,7 @@ cris_general_operand_or_symbol (op, mode)
|
||||||
"movsi" anonymous pattern for PIC symbols. */
|
"movsi" anonymous pattern for PIC symbols. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_general_operand_or_gotless_symbol (op, mode)
|
cris_general_operand_or_gotless_symbol (rtx op, enum machine_mode mode)
|
||||||
rtx op;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
return general_operand (op, mode)
|
return general_operand (op, mode)
|
||||||
|| (CONSTANT_P (op) && cris_gotless_symbol (op));
|
|| (CONSTANT_P (op) && cris_gotless_symbol (op));
|
||||||
|
@ -418,9 +396,7 @@ cris_general_operand_or_gotless_symbol (op, mode)
|
||||||
"call" and "call_value" anonymous patterns. */
|
"call" and "call_value" anonymous patterns. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_general_operand_or_plt_symbol (op, mode)
|
cris_general_operand_or_plt_symbol (rtx op, enum machine_mode mode)
|
||||||
rtx op;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
return general_operand (op, mode)
|
return general_operand (op, mode)
|
||||||
|| (GET_CODE (op) == CONST
|
|| (GET_CODE (op) == CONST
|
||||||
|
@ -435,9 +411,7 @@ cris_general_operand_or_plt_symbol (op, mode)
|
||||||
UNSPEC 0). */
|
UNSPEC 0). */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_mem_call_operand (op, mode)
|
cris_mem_call_operand (rtx op, enum machine_mode mode)
|
||||||
rtx op;
|
|
||||||
enum machine_mode mode;
|
|
||||||
{
|
{
|
||||||
rtx xmem;
|
rtx xmem;
|
||||||
|
|
||||||
|
@ -455,7 +429,7 @@ cris_mem_call_operand (op, mode)
|
||||||
/* The CONDITIONAL_REGISTER_USAGE worker. */
|
/* The CONDITIONAL_REGISTER_USAGE worker. */
|
||||||
|
|
||||||
void
|
void
|
||||||
cris_conditional_register_usage ()
|
cris_conditional_register_usage (void)
|
||||||
{
|
{
|
||||||
/* FIXME: This isn't nice. We should be able to use that register for
|
/* FIXME: This isn't nice. We should be able to use that register for
|
||||||
something else if the PIC table isn't needed. */
|
something else if the PIC table isn't needed. */
|
||||||
|
@ -468,7 +442,7 @@ cris_conditional_register_usage ()
|
||||||
since some generated files do not include function.h. */
|
since some generated files do not include function.h. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_cfun_uses_pic_table ()
|
cris_cfun_uses_pic_table (void)
|
||||||
{
|
{
|
||||||
return current_function_uses_pic_offset_table;
|
return current_function_uses_pic_offset_table;
|
||||||
}
|
}
|
||||||
|
@ -478,8 +452,7 @@ cris_cfun_uses_pic_table ()
|
||||||
define_insn. */
|
define_insn. */
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
cris_op_str (x)
|
cris_op_str (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
cris_output_insn_is_bound = 0;
|
cris_output_insn_is_bound = 0;
|
||||||
switch (GET_CODE (x))
|
switch (GET_CODE (x))
|
||||||
|
@ -547,9 +520,7 @@ cris_op_str (x)
|
||||||
categorization of the error. */
|
categorization of the error. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cris_operand_lossage (msgid, op)
|
cris_operand_lossage (const char *msgid, rtx op)
|
||||||
const char *msgid;
|
|
||||||
rtx op;
|
|
||||||
{
|
{
|
||||||
debug_rtx (op);
|
debug_rtx (op);
|
||||||
output_operand_lossage ("%s", msgid);
|
output_operand_lossage ("%s", msgid);
|
||||||
|
@ -558,9 +529,7 @@ cris_operand_lossage (msgid, op)
|
||||||
/* Print an index part of an address to file. */
|
/* Print an index part of an address to file. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cris_print_index (index, file)
|
cris_print_index (rtx index, FILE *file)
|
||||||
rtx index;
|
|
||||||
FILE * file;
|
|
||||||
{
|
{
|
||||||
rtx inner = XEXP (index, 0);
|
rtx inner = XEXP (index, 0);
|
||||||
|
|
||||||
|
@ -613,9 +582,7 @@ cris_print_index (index, file)
|
||||||
/* Print a base rtx of an address to file. */
|
/* Print a base rtx of an address to file. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cris_print_base (base, file)
|
cris_print_base (rtx base, FILE *file)
|
||||||
rtx base;
|
|
||||||
FILE *file;
|
|
||||||
{
|
{
|
||||||
if (REG_P (base))
|
if (REG_P (base))
|
||||||
fprintf (file, "$%s", reg_names[REGNO (base)]);
|
fprintf (file, "$%s", reg_names[REGNO (base)]);
|
||||||
|
@ -629,8 +596,7 @@ cris_print_base (base, file)
|
||||||
/* Usable as a guard in expressions. */
|
/* Usable as a guard in expressions. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_fatal (arg)
|
cris_fatal (char *arg)
|
||||||
char *arg;
|
|
||||||
{
|
{
|
||||||
internal_error (arg);
|
internal_error (arg);
|
||||||
|
|
||||||
|
@ -641,9 +607,7 @@ cris_fatal (arg)
|
||||||
/* Textual function prologue. */
|
/* Textual function prologue. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cris_target_asm_function_prologue (file, size)
|
cris_target_asm_function_prologue (FILE *file, HOST_WIDE_INT size)
|
||||||
FILE *file;
|
|
||||||
HOST_WIDE_INT size;
|
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
|
@ -926,8 +890,7 @@ cris_target_asm_function_prologue (file, size)
|
||||||
can be put in the epilogue. */
|
can be put in the epilogue. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
saved_regs_mentioned (x)
|
saved_regs_mentioned (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char *fmt;
|
const char *fmt;
|
||||||
|
@ -976,8 +939,7 @@ saved_regs_mentioned (x)
|
||||||
/* Figure out if the insn may be put in the epilogue. */
|
/* Figure out if the insn may be put in the epilogue. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_eligible_for_epilogue_delay (insn)
|
cris_eligible_for_epilogue_delay (rtx insn)
|
||||||
rtx insn;
|
|
||||||
{
|
{
|
||||||
/* First of all, it must be as slottable as for a delayed branch insn. */
|
/* First of all, it must be as slottable as for a delayed branch insn. */
|
||||||
if (get_attr_slottable (insn) != SLOTTABLE_YES)
|
if (get_attr_slottable (insn) != SLOTTABLE_YES)
|
||||||
|
@ -1008,7 +970,7 @@ cris_eligible_for_epilogue_delay (insn)
|
||||||
contains "ret", else 0. */
|
contains "ret", else 0. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_delay_slots_for_epilogue ()
|
cris_delay_slots_for_epilogue (void)
|
||||||
{
|
{
|
||||||
/* Check if we use a return insn, which we only do for leaf functions.
|
/* Check if we use a return insn, which we only do for leaf functions.
|
||||||
Else there is no slot to fill. */
|
Else there is no slot to fill. */
|
||||||
|
@ -1036,9 +998,7 @@ cris_delay_slots_for_epilogue ()
|
||||||
itself by storing the delay insn in save_last. */
|
itself by storing the delay insn in save_last. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cris_target_asm_function_epilogue (file, size)
|
cris_target_asm_function_epilogue (FILE *file, HOST_WIDE_INT size)
|
||||||
FILE *file;
|
|
||||||
HOST_WIDE_INT size;
|
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
int last_movem_reg = -1;
|
int last_movem_reg = -1;
|
||||||
|
@ -1299,10 +1259,7 @@ cris_target_asm_function_epilogue (file, size)
|
||||||
/* The PRINT_OPERAND worker. */
|
/* The PRINT_OPERAND worker. */
|
||||||
|
|
||||||
void
|
void
|
||||||
cris_print_operand (file, x, code)
|
cris_print_operand (FILE *file, rtx x, int code)
|
||||||
FILE *file;
|
|
||||||
rtx x;
|
|
||||||
int code;
|
|
||||||
{
|
{
|
||||||
rtx operand = x;
|
rtx operand = x;
|
||||||
|
|
||||||
|
@ -1622,9 +1579,7 @@ cris_print_operand (file, x, code)
|
||||||
/* The PRINT_OPERAND_ADDRESS worker. */
|
/* The PRINT_OPERAND_ADDRESS worker. */
|
||||||
|
|
||||||
void
|
void
|
||||||
cris_print_operand_address (file, x)
|
cris_print_operand_address (FILE *file, rtx x)
|
||||||
FILE *file;
|
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
/* All these were inside MEM:s so output indirection characters. */
|
/* All these were inside MEM:s so output indirection characters. */
|
||||||
putc ('[', file);
|
putc ('[', file);
|
||||||
|
@ -1674,9 +1629,7 @@ cris_print_operand_address (file, x)
|
||||||
initial-value machinery. */
|
initial-value machinery. */
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
cris_return_addr_rtx (count, frameaddr)
|
cris_return_addr_rtx (int count, rtx frameaddr ATTRIBUTE_UNUSED)
|
||||||
int count;
|
|
||||||
rtx frameaddr ATTRIBUTE_UNUSED;
|
|
||||||
{
|
{
|
||||||
cfun->machine->needs_return_address_on_stack = 1;
|
cfun->machine->needs_return_address_on_stack = 1;
|
||||||
|
|
||||||
|
@ -1692,7 +1645,7 @@ cris_return_addr_rtx (count, frameaddr)
|
||||||
handles FP -> SP elimination offset. */
|
handles FP -> SP elimination offset. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cris_initial_frame_pointer_offset ()
|
cris_initial_frame_pointer_offset (void)
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
|
|
||||||
|
@ -1737,9 +1690,7 @@ cris_initial_frame_pointer_offset ()
|
||||||
and imaginary arg pointer. */
|
and imaginary arg pointer. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_initial_elimination_offset (fromreg, toreg)
|
cris_initial_elimination_offset (int fromreg, int toreg)
|
||||||
int fromreg;
|
|
||||||
int toreg;
|
|
||||||
{
|
{
|
||||||
int fp_sp_offset
|
int fp_sp_offset
|
||||||
= cris_initial_frame_pointer_offset ();
|
= cris_initial_frame_pointer_offset ();
|
||||||
|
@ -1783,9 +1734,7 @@ cris_initial_elimination_offset (fromreg, toreg)
|
||||||
check-cc-attribute methods. */
|
check-cc-attribute methods. */
|
||||||
|
|
||||||
void
|
void
|
||||||
cris_notice_update_cc (exp, insn)
|
cris_notice_update_cc (rtx exp, rtx insn)
|
||||||
rtx exp;
|
|
||||||
rtx insn;
|
|
||||||
{
|
{
|
||||||
/* Check if user specified "-mcc-init" as a bug-workaround. FIXME:
|
/* Check if user specified "-mcc-init" as a bug-workaround. FIXME:
|
||||||
TARGET_CCINIT does not work; we must set CC_REVERSED as below.
|
TARGET_CCINIT does not work; we must set CC_REVERSED as below.
|
||||||
|
@ -2072,7 +2021,7 @@ cris_notice_update_cc (exp, insn)
|
||||||
many registers must be saved, so return 0 then. */
|
many registers must be saved, so return 0 then. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_simple_epilogue ()
|
cris_simple_epilogue (void)
|
||||||
{
|
{
|
||||||
int regno;
|
int regno;
|
||||||
int reglimit = STACK_POINTER_REGNUM;
|
int reglimit = STACK_POINTER_REGNUM;
|
||||||
|
@ -2115,10 +2064,7 @@ cris_simple_epilogue ()
|
||||||
scanned. In either case, *TOTAL contains the cost result. */
|
scanned. In either case, *TOTAL contains the cost result. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
cris_rtx_costs (x, code, outer_code, total)
|
cris_rtx_costs (rtx x, int code, int outer_code, int *total)
|
||||||
rtx x;
|
|
||||||
int code, outer_code;
|
|
||||||
int *total;
|
|
||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
@ -2224,8 +2170,7 @@ cris_rtx_costs (x, code, outer_code, total)
|
||||||
/* The ADDRESS_COST worker. */
|
/* The ADDRESS_COST worker. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cris_address_cost (x)
|
cris_address_cost (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
/* The metric to use for the cost-macros is unclear.
|
/* The metric to use for the cost-macros is unclear.
|
||||||
The metric used here is (the number of cycles needed) / 2,
|
The metric used here is (the number of cycles needed) / 2,
|
||||||
|
@ -2307,10 +2252,9 @@ cris_address_cost (x)
|
||||||
whose mode we must consider. */
|
whose mode we must consider. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_side_effect_mode_ok (code, ops, lreg, rreg, rval, multop, other_op)
|
cris_side_effect_mode_ok (enum rtx_code code, rtx *ops,
|
||||||
enum rtx_code code;
|
int lreg, int rreg, int rval,
|
||||||
rtx *ops;
|
int multop, int other_op)
|
||||||
int lreg, rreg, rval, multop, other_op;
|
|
||||||
{
|
{
|
||||||
/* Find what value to multiply with, for rx =ry + rz * n. */
|
/* Find what value to multiply with, for rx =ry + rz * n. */
|
||||||
int mult = multop < 0 ? 1 : INTVAL (ops[multop]);
|
int mult = multop < 0 ? 1 : INTVAL (ops[multop]);
|
||||||
|
@ -2424,8 +2368,7 @@ cris_side_effect_mode_ok (code, ops, lreg, rreg, rval, multop, other_op)
|
||||||
anyway. */
|
anyway. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
cris_reg_overlap_mentioned_p (x, in)
|
cris_reg_overlap_mentioned_p (rtx x, rtx in)
|
||||||
rtx x, in;
|
|
||||||
{
|
{
|
||||||
/* The function reg_overlap_mentioned now handles when X is
|
/* The function reg_overlap_mentioned now handles when X is
|
||||||
strict_low_part, but not when IN is a STRICT_LOW_PART. */
|
strict_low_part, but not when IN is a STRICT_LOW_PART. */
|
||||||
|
@ -2439,9 +2382,7 @@ cris_reg_overlap_mentioned_p (x, in)
|
||||||
We just dispatch to the functions for ELF and a.out. */
|
We just dispatch to the functions for ELF and a.out. */
|
||||||
|
|
||||||
void
|
void
|
||||||
cris_target_asm_named_section (name, flags)
|
cris_target_asm_named_section (const char *name, unsigned int flags)
|
||||||
const char *name;
|
|
||||||
unsigned int flags;
|
|
||||||
{
|
{
|
||||||
if (! TARGET_ELF)
|
if (! TARGET_ELF)
|
||||||
default_no_named_section (name, flags);
|
default_no_named_section (name, flags);
|
||||||
|
@ -2452,8 +2393,7 @@ cris_target_asm_named_section (name, flags)
|
||||||
/* The LEGITIMATE_PIC_OPERAND_P worker. */
|
/* The LEGITIMATE_PIC_OPERAND_P worker. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_legitimate_pic_operand (x)
|
cris_legitimate_pic_operand (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
/* The PIC representation of a symbol with a GOT entry will be (for
|
/* The PIC representation of a symbol with a GOT entry will be (for
|
||||||
example; relocations differ):
|
example; relocations differ):
|
||||||
|
@ -2469,8 +2409,7 @@ cris_legitimate_pic_operand (x)
|
||||||
CONSTANT_P. */
|
CONSTANT_P. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_symbol (x)
|
cris_symbol (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
switch (GET_CODE (x))
|
switch (GET_CODE (x))
|
||||||
{
|
{
|
||||||
|
@ -2508,8 +2447,7 @@ cris_symbol (x)
|
||||||
see something that would need one. */
|
see something that would need one. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_gotless_symbol (x)
|
cris_gotless_symbol (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_CHECKING
|
#ifdef ENABLE_CHECKING
|
||||||
if (!flag_pic)
|
if (!flag_pic)
|
||||||
|
@ -2569,8 +2507,7 @@ cris_gotless_symbol (x)
|
||||||
CONSTANT_P, and the symbol needs a GOT entry. */
|
CONSTANT_P, and the symbol needs a GOT entry. */
|
||||||
|
|
||||||
int
|
int
|
||||||
cris_got_symbol (x)
|
cris_got_symbol (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_CHECKING
|
#ifdef ENABLE_CHECKING
|
||||||
if (!flag_pic)
|
if (!flag_pic)
|
||||||
|
@ -2616,7 +2553,7 @@ cris_got_symbol (x)
|
||||||
As is the norm, this also parses -mfoo=bar type parameters. */
|
As is the norm, this also parses -mfoo=bar type parameters. */
|
||||||
|
|
||||||
void
|
void
|
||||||
cris_override_options ()
|
cris_override_options (void)
|
||||||
{
|
{
|
||||||
if (cris_max_stackframe_str)
|
if (cris_max_stackframe_str)
|
||||||
{
|
{
|
||||||
|
@ -2733,12 +2670,11 @@ cris_override_options ()
|
||||||
/* The TARGET_ASM_OUTPUT_MI_THUNK worker. */
|
/* The TARGET_ASM_OUTPUT_MI_THUNK worker. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cris_asm_output_mi_thunk (stream, thunkdecl, delta, vcall_offset, funcdecl)
|
cris_asm_output_mi_thunk (FILE *stream,
|
||||||
FILE *stream;
|
tree thunkdecl ATTRIBUTE_UNUSED,
|
||||||
tree thunkdecl ATTRIBUTE_UNUSED;
|
HOST_WIDE_INT delta,
|
||||||
HOST_WIDE_INT delta;
|
HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED,
|
||||||
HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED;
|
tree funcdecl)
|
||||||
tree funcdecl;
|
|
||||||
{
|
{
|
||||||
if (delta > 0)
|
if (delta > 0)
|
||||||
fprintf (stream, "\tadd%s " HOST_WIDE_INT_PRINT_DEC ",$%s\n",
|
fprintf (stream, "\tadd%s " HOST_WIDE_INT_PRINT_DEC ",$%s\n",
|
||||||
|
@ -2774,7 +2710,7 @@ cris_asm_output_mi_thunk (stream, thunkdecl, delta, vcall_offset, funcdecl)
|
||||||
|
|
||||||
We want a .file directive only if TARGET_ELF. */
|
We want a .file directive only if TARGET_ELF. */
|
||||||
static void
|
static void
|
||||||
cris_file_start ()
|
cris_file_start (void)
|
||||||
{
|
{
|
||||||
/* These expressions can vary at run time, so we cannot put
|
/* These expressions can vary at run time, so we cannot put
|
||||||
them into TARGET_INITIALIZER. */
|
them into TARGET_INITIALIZER. */
|
||||||
|
@ -2791,9 +2727,7 @@ cris_file_start ()
|
||||||
pass-by-reference, then perform an indirection. */
|
pass-by-reference, then perform an indirection. */
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
cris_expand_builtin_va_arg (valist, type)
|
cris_expand_builtin_va_arg (tree valist, tree type)
|
||||||
tree valist;
|
|
||||||
tree type;
|
|
||||||
{
|
{
|
||||||
tree addr_tree, t;
|
tree addr_tree, t;
|
||||||
rtx addr;
|
rtx addr;
|
||||||
|
@ -2870,7 +2804,7 @@ cris_expand_builtin_va_arg (valist, type)
|
||||||
mark functions. */
|
mark functions. */
|
||||||
|
|
||||||
void
|
void
|
||||||
cris_init_expanders ()
|
cris_init_expanders (void)
|
||||||
{
|
{
|
||||||
/* Nothing here at the moment. */
|
/* Nothing here at the moment. */
|
||||||
}
|
}
|
||||||
|
@ -2878,7 +2812,7 @@ cris_init_expanders ()
|
||||||
/* Zero initialization is OK for all current fields. */
|
/* Zero initialization is OK for all current fields. */
|
||||||
|
|
||||||
static struct machine_function *
|
static struct machine_function *
|
||||||
cris_init_machine_status ()
|
cris_init_machine_status (void)
|
||||||
{
|
{
|
||||||
return ggc_alloc_cleared (sizeof (struct machine_function));
|
return ggc_alloc_cleared (sizeof (struct machine_function));
|
||||||
}
|
}
|
||||||
|
@ -2887,8 +2821,7 @@ cris_init_machine_status ()
|
||||||
Originally a copy of gen_split_move_double in m32r.c. */
|
Originally a copy of gen_split_move_double in m32r.c. */
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
cris_split_movdx (operands)
|
cris_split_movdx (rtx *operands)
|
||||||
rtx *operands;
|
|
||||||
{
|
{
|
||||||
enum machine_mode mode = GET_MODE (operands[0]);
|
enum machine_mode mode = GET_MODE (operands[0]);
|
||||||
rtx dest = operands[0];
|
rtx dest = operands[0];
|
||||||
|
@ -3047,9 +2980,7 @@ cris_split_movdx (operands)
|
||||||
one for CODE_LABEL?). */
|
one for CODE_LABEL?). */
|
||||||
|
|
||||||
void
|
void
|
||||||
cris_output_addr_const (file, x)
|
cris_output_addr_const (FILE *file, rtx x)
|
||||||
FILE *file;
|
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
int is_plt = 0;
|
int is_plt = 0;
|
||||||
|
|
||||||
|
@ -3221,49 +3152,42 @@ restart:
|
||||||
debugger. They might collide with gcc functions or system functions,
|
debugger. They might collide with gcc functions or system functions,
|
||||||
so only emit them when '#if 1' above. */
|
so only emit them when '#if 1' above. */
|
||||||
|
|
||||||
enum rtx_code Get_code PARAMS ((rtx));
|
enum rtx_code Get_code (rtx);
|
||||||
|
|
||||||
enum rtx_code
|
enum rtx_code
|
||||||
Get_code (x)
|
Get_code (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
return GET_CODE (x);
|
return GET_CODE (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Get_mode PARAMS ((rtx));
|
const char *Get_mode (rtx);
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
Get_mode (x)
|
Get_mode (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
return GET_MODE_NAME (GET_MODE (x));
|
return GET_MODE_NAME (GET_MODE (x));
|
||||||
}
|
}
|
||||||
|
|
||||||
rtx Xexp PARAMS ((rtx, int));
|
rtx Xexp (rtx, int);
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
Xexp (x, n)
|
Xexp (rtx x, int n)
|
||||||
rtx x;
|
|
||||||
int n;
|
|
||||||
{
|
{
|
||||||
return XEXP (x, n);
|
return XEXP (x, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtx Xvecexp PARAMS ((rtx, int, int));
|
rtx Xvecexp (rtx, int, int);
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
Xvecexp (x, n, m)
|
Xvecexp (rtx x, int n, int m)
|
||||||
rtx x;
|
|
||||||
int n;
|
|
||||||
{
|
{
|
||||||
return XVECEXP (x, n, m);
|
return XVECEXP (x, n, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Get_rtx_len PARAMS ((rtx));
|
int Get_rtx_len (rtx);
|
||||||
|
|
||||||
int
|
int
|
||||||
Get_rtx_len (x)
|
Get_rtx_len (rtx x)
|
||||||
rtx x;
|
|
||||||
{
|
{
|
||||||
return GET_RTX_LENGTH (GET_CODE (x));
|
return GET_RTX_LENGTH (GET_CODE (x));
|
||||||
}
|
}
|
||||||
|
@ -3271,20 +3195,18 @@ Get_rtx_len (x)
|
||||||
/* Use upper-case to distinguish from local variables that are sometimes
|
/* Use upper-case to distinguish from local variables that are sometimes
|
||||||
called next_insn and prev_insn. */
|
called next_insn and prev_insn. */
|
||||||
|
|
||||||
rtx Next_insn PARAMS ((rtx));
|
rtx Next_insn (rtx);
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
Next_insn (insn)
|
Next_insn (rtx insn)
|
||||||
rtx insn;
|
|
||||||
{
|
{
|
||||||
return NEXT_INSN (insn);
|
return NEXT_INSN (insn);
|
||||||
}
|
}
|
||||||
|
|
||||||
rtx Prev_insn PARAMS ((rtx));
|
rtx Prev_insn (rtx);
|
||||||
|
|
||||||
rtx
|
rtx
|
||||||
Prev_insn (insn)
|
Prev_insn (rtx insn)
|
||||||
rtx insn;
|
|
||||||
{
|
{
|
||||||
return PREV_INSN (insn);
|
return PREV_INSN (insn);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue