summaryrefslogtreecommitdiff
path: root/gcc/config/mcore
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-25 06:16:11 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-25 06:16:11 +0000
commitef51d1e38226322386a53fba14beed1437c24116 (patch)
treeeb40ba24b9ba6cd915e72178183c60d3f3dd4700 /gcc/config/mcore
parent5b9c0169d5930962453da957c65121a3b4a0938f (diff)
downloadgcc-ef51d1e38226322386a53fba14beed1437c24116.tar.gz
* config/arc/arc.c: Include "df.h".
(arc_attribute_table): Make static. Move higher in file. (arc_address_cost): Call SMALL_INT on INTVAL, not rtx. (output_shift): Initialize n later to avoid warning. * config/arm/arm.c (arm_attribute_table): Make static. Move higher in file. * config/avr/avr.c (avr_attribute_table): Make static. Move higher in file. (reg_class_tab): Change array type from int to enum reg_class. (avr_jump_mode): Change GET_MODE to GET_CODE when checking for LABEL_REF. (out_tsthi, ashlhi3_out): Don't use AS2 with "or" or "and". (lshrhi3_out): Likewise. (class_likely_spilled_p): Change return type to bool. (avr_rtx_costs): Use local code variable with enum type. * config/avr/avr.md (movmemhi): Use add_reg_note. (andhi3, andsi3): Don't use AS2 with "and". (iorhi3, iorsi3): Don't use AS2 with "or". * config/avr/avr-protos.h (class_likely_spilled_p): Update declaration. * config/crx/crx.c: Include "df.h". (crx_attribute_table): Make static. * config/m32r/m32r.c: Include "df.h". (m32r_attribute_table): Make static. Move higher in file. (pop): Use add_reg_note. (block_move_call): Change 0 to LCT_NORMAL in function call. * config/m32r/m32r.md (movsi_insn): Remove unused local value. * config/m32r/m32r.h (INITIALIZE_TRAMPOLINE): Likewise. * config/m32r/m32r-protos.h (m32r_compute_function_type): Always declare, not just when TREE_CODE is defined. * config/m68hc11/m68hc11.c: Include "expr.h". (m68hc11_attribute_table): Make static. Move higher in file. (m68hc11_small_indexed_indirect_p): Change 0 to VOIDmode in function call. (m68hc11_register_indirect_p): Likewise. (m68hc11_function_arg_padding): Change return type to enum direction. (emit_move_after_reload): Use add_reg_note. (m68hc11_emit_logical): Change code parameter to enum rtx_code. (m68hc11_split_logical): Likewise. (m68hc11_rtx_costs): Add local code_and outer_code variables with enum type. * config/m68hc11/predicates.md (reg_or_some_mem_operand): Change 0 to VOIDmode in function call. * config/m68hc11/m68hc11-protos.h: Don't check TREE_CODE to see if tree is defined. (m68hc11_split_logical): Update declaration. (m68hc11_function_arg_padding): Update declaration. * config/mcore/mcore.c (regno_reg_class): Change form array of int to array of enum reg_class. (mcore_attribute_table): Make static. Move higher in file. (mcore_rtx_costs): Add cast to enum type. * config/mcore/mcore.h (regno_reg_class): Update declaration. (GO_IF_LEGITIMATE_INDEX): Add cast to avoid warning. * config/sh/sh.c (sh_attribute_table): Make static. Move higher in file. * config/sh/predicates.md (trapping_target_operand): Rename and to and_expr. * config/sparc/sparc.c (sparc_attribute_table): Make static. Move higher in file. * config/spu/spu.c (spu_attribute_table): Make static. Move higher in file. * config/v850/v850.c (v850_attribute_table): Make static. Move higher in file. (v850_rtx_costs): Use local code with enum type. (expand_epilogue): Add cast. * config/v850/v850-c.c (ghs_pragma_section): Initialize repeat. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148927 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mcore')
-rw-r--r--gcc/config/mcore/mcore.c25
-rw-r--r--gcc/config/mcore/mcore.h7
2 files changed, 17 insertions, 15 deletions
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index d03a2839179..3b0adef1074 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -59,7 +59,7 @@ long mcore_current_compilation_timestamp = 0;
/* Provides the class number of the smallest class containing
reg number. */
-const int regno_reg_class[FIRST_PSEUDO_REGISTER] =
+const enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER] =
{
GENERAL_REGS, ONLYR1_REGS, LRW_REGS, LRW_REGS,
LRW_REGS, LRW_REGS, LRW_REGS, LRW_REGS,
@@ -127,7 +127,6 @@ static void mcore_mark_dllexport (tree);
static void mcore_mark_dllimport (tree);
static int mcore_dllexport_p (tree);
static int mcore_dllimport_p (tree);
-EXPORTED_CONST struct attribute_spec mcore_attribute_table[];
static tree mcore_handle_naked_attribute (tree *, tree, tree, int, bool *);
#ifdef OBJECT_FORMAT_ELF
static void mcore_asm_named_section (const char *,
@@ -147,6 +146,17 @@ static int mcore_arg_partial_bytes (CUMULATIVE_ARGS *,
tree, bool);
+/* MCore specific attributes. */
+
+static const struct attribute_spec mcore_attribute_table[] =
+{
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ { "dllexport", 0, 0, true, false, false, NULL },
+ { "dllimport", 0, 0, true, false, false, NULL },
+ { "naked", 0, 0, true, false, false, mcore_handle_naked_attribute },
+ { NULL, 0, 0, false, false, false, NULL }
+};
+
/* Initialize the GCC target structure. */
#undef TARGET_ASM_EXTERNAL_LIBCALL
#define TARGET_ASM_EXTERNAL_LIBCALL mcore_external_libcall
@@ -481,7 +491,7 @@ mcore_rtx_costs (rtx x, int code, int outer_code, int * total,
switch (code)
{
case CONST_INT:
- *total = mcore_const_costs (x, outer_code);
+ *total = mcore_const_costs (x, (enum rtx_code) outer_code);
return true;
case CONST:
case LABEL_REF:
@@ -2991,15 +3001,6 @@ mcore_strip_name_encoding (const char * str)
dllimport - for importing a function/variable from a dll
naked - do not create a function prologue/epilogue. */
-const struct attribute_spec mcore_attribute_table[] =
-{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "dllexport", 0, 0, true, false, false, NULL },
- { "dllimport", 0, 0, true, false, false, NULL },
- { "naked", 0, 0, true, false, false, mcore_handle_naked_attribute },
- { NULL, 0, 0, false, false, false, NULL }
-};
-
/* Handle a "naked" attribute; arguments as in
struct attribute_spec.handler. */
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index bbdc24811b8..9b33a1aba07 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -1,7 +1,7 @@
/* Definitions of target machine for GNU compiler,
for Motorola M*CORE Processor.
Copyright (C) 1993, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
- 2008 Free Software Foundation, Inc.
+ 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -408,7 +408,7 @@ enum reg_class
reg number REGNO. This could be a conditional expression
or could index an array. */
-extern const int regno_reg_class[FIRST_PSEUDO_REGISTER];
+extern const enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
#define REGNO_REG_CLASS(REGNO) regno_reg_class[REGNO]
/* When defined, the compiler allows registers explicitly used in the
@@ -754,7 +754,8 @@ extern const enum reg_class reg_class_from_letter[];
{ \
if (GET_MODE_SIZE (MODE) >= 4 \
&& (((unsigned HOST_WIDE_INT) INTVAL (OP)) % 4) == 0 \
- && ((unsigned HOST_WIDE_INT) INTVAL (OP)) <= 64 - GET_MODE_SIZE (MODE)) \
+ && ((unsigned HOST_WIDE_INT) INTVAL (OP)) \
+ <= (unsigned HOST_WIDE_INT) 64 - GET_MODE_SIZE (MODE)) \
goto LABEL; \
if (GET_MODE_SIZE (MODE) == 2 \
&& (((unsigned HOST_WIDE_INT) INTVAL (OP)) % 2) == 0 \