summaryrefslogtreecommitdiff
path: root/gcc/config/mep
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-11 19:11:44 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-11 19:11:44 +0000
commit7290d950cf53afc2929f18e142d15151788b2087 (patch)
treed3c5a27fdbc823c3b12b224f3ce343a40c01d045 /gcc/config/mep
parent9bc9b0a9f0fdda8baf9ebe369c2c34cc5fc46d92 (diff)
downloadgcc-7290d950cf53afc2929f18e142d15151788b2087.tar.gz
PR target/44749
* config/mep/mep-protos.h (mep_legitimize_reload_address): Always declare. Change type of argument four to type int. (mep_secondary_input_reload_class): Returns enum reg_class. (mep_secondary_output_reload_class): Likewise. (mep_function_value): Change types of arguments to cont_tree. * config/mep/mep.c (mep_legitimize_reload_address): Change type of argument four to type int. (mep_secondary_input_reload_class): Returns enum reg_class. (mep_secondary_output_reload_class): Likewise. (mep_function_value): Change types of arguments to cont_tree. * config/mep/mep.h (REGNO_REG_CLASS): Cast return value of mep_regno_reg_class to enum reg_class. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166614 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mep')
-rw-r--r--gcc/config/mep/mep-protos.h10
-rw-r--r--gcc/config/mep/mep.c14
-rw-r--r--gcc/config/mep/mep.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/gcc/config/mep/mep-protos.h b/gcc/config/mep/mep-protos.h
index c8a0b9b3523..857e6f21d59 100644
--- a/gcc/config/mep/mep-protos.h
+++ b/gcc/config/mep/mep-protos.h
@@ -35,9 +35,7 @@ extern bool mep_vliw_jmp_match (rtx);
extern bool mep_multi_slot (rtx);
extern bool mep_legitimate_address (enum machine_mode, rtx, int);
extern int mep_legitimize_address (rtx *, rtx, enum machine_mode);
-#ifdef MAX_RELOADS
-extern int mep_legitimize_reload_address (rtx *, enum machine_mode, int, enum reload_type, int);
-#endif
+extern int mep_legitimize_reload_address (rtx *, enum machine_mode, int, /*enum reload_type*/ int, int);
extern int mep_core_address_length (rtx, int);
extern int mep_cop_address_length (rtx, int);
extern bool mep_expand_mov (rtx *, enum machine_mode);
@@ -51,8 +49,8 @@ extern bool mep_legitimate_constant_p (rtx);
extern const char *mep_emit_cbranch (rtx *, int);
extern void mep_expand_call (rtx *, int);
extern rtx mep_find_base_term (rtx);
-extern int mep_secondary_input_reload_class (enum reg_class, enum machine_mode, rtx);
-extern int mep_secondary_output_reload_class (enum reg_class, enum machine_mode, rtx);
+extern enum reg_class mep_secondary_input_reload_class (enum reg_class, enum machine_mode, rtx);
+extern enum reg_class mep_secondary_output_reload_class (enum reg_class, enum machine_mode, rtx);
extern bool mep_secondary_memory_needed (enum reg_class, enum reg_class,
enum machine_mode);
extern void mep_expand_reload (rtx *, enum machine_mode);
@@ -76,7 +74,7 @@ extern void mep_print_operand (FILE *, rtx, int);
extern void mep_final_prescan_insn (rtx, rtx *, int);
extern void mep_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
extern bool mep_return_in_memory (const_tree, const_tree);
-extern rtx mep_function_value (tree, tree);
+extern rtx mep_function_value (const_tree, const_tree);
extern rtx mep_libcall_value (enum machine_mode);
extern void mep_asm_output_opcode (FILE *, const char *);
extern void mep_note_pragma_disinterrupt (const char *);
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 62877d4754c..49954dba77e 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -1270,9 +1270,11 @@ mep_legitimate_address (enum machine_mode mode, rtx x, int strict)
int
mep_legitimize_reload_address (rtx *x, enum machine_mode mode, int opnum,
- enum reload_type type,
+ int type_i,
int ind_levels ATTRIBUTE_UNUSED)
{
+ enum reload_type type = (enum reload_type) type_i;
+
if (GET_CODE (*x) == PLUS
&& GET_CODE (XEXP (*x, 0)) == MEM
&& GET_CODE (XEXP (*x, 1)) == REG)
@@ -2097,7 +2099,7 @@ mep_secondary_copro_reload_class (enum reg_class rclass, rtx x)
/* Copying X to register in RCLASS. */
-int
+enum reg_class
mep_secondary_input_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x)
@@ -2118,12 +2120,12 @@ mep_secondary_input_reload_class (enum reg_class rclass,
#if DEBUG_RELOAD
fprintf (stderr, " - requires %s\n", reg_class_names[rv]);
#endif
- return rv;
+ return (enum reg_class) rv;
}
/* Copying register in RCLASS to X. */
-int
+enum reg_class
mep_secondary_output_reload_class (enum reg_class rclass,
enum machine_mode mode ATTRIBUTE_UNUSED,
rtx x)
@@ -2145,7 +2147,7 @@ mep_secondary_output_reload_class (enum reg_class rclass,
fprintf (stderr, " - requires %s\n", reg_class_names[rv]);
#endif
- return rv;
+ return (enum reg_class) rv;
}
/* Implement SECONDARY_MEMORY_NEEDED. */
@@ -3804,7 +3806,7 @@ mep_narrow_volatile_bitfield (void)
/* Implement FUNCTION_VALUE. All values are returned in $0. */
rtx
-mep_function_value (tree type, tree func ATTRIBUTE_UNUSED)
+mep_function_value (const_tree type, const_tree func ATTRIBUTE_UNUSED)
{
if (TARGET_IVC2 && VECTOR_TYPE_P (type))
return gen_rtx_REG (TYPE_MODE (type), 48);
diff --git a/gcc/config/mep/mep.h b/gcc/config/mep/mep.h
index 49b7f38b7d0..48d05b68d81 100644
--- a/gcc/config/mep/mep.h
+++ b/gcc/config/mep/mep.h
@@ -396,7 +396,7 @@ enum reg_class
{ 0xffffffff, 0xffffffff, 0xffffffff, 0x0001ffff }, /* ALL_REGS */ \
}
-#define REGNO_REG_CLASS(REGNO) mep_regno_reg_class (REGNO)
+#define REGNO_REG_CLASS(REGNO) (enum reg_class) mep_regno_reg_class (REGNO)
#define IRA_COVER_CLASSES { GENERAL_REGS, CONTROL_REGS, CR_REGS, CCR_REGS, LIM_REG_CLASSES }