aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2009-06-25 06:16:11 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2009-06-25 06:16:11 +0000
commit5a82ecd9994682d76eba3c2c6460b3566fc5654c (patch)
treeeb40ba24b9ba6cd915e72178183c60d3f3dd4700 /gcc/config/arc
parentb4589acca420c16a7d67c77b8e36afa9a0a8d8ce (diff)
downloadgcc-5a82ecd9994682d76eba3c2c6460b3566fc5654c.zip
gcc-5a82ecd9994682d76eba3c2c6460b3566fc5654c.tar.gz
gcc-5a82ecd9994682d76eba3c2c6460b3566fc5654c.tar.bz2
arc.c: Include "df.h".
* 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. From-SVN: r148927
Diffstat (limited to 'gcc/config/arc')
-rw-r--r--gcc/config/arc/arc.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 221dea1..66709c7 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "expr.h"
#include "recog.h"
#include "toplev.h"
+#include "df.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
@@ -78,7 +79,6 @@ static bool arc_handle_option (size_t, const char *, int);
static void record_cc_ref (rtx);
static void arc_init_reg_tables (void);
static int get_arc_condition_code (rtx);
-EXPORTED_CONST struct attribute_spec arc_attribute_table[];
static tree arc_handle_interrupt_attribute (tree *, tree, tree, int, bool *);
static bool arc_assemble_integer (rtx, unsigned int, int);
static void arc_output_function_prologue (FILE *, HOST_WIDE_INT);
@@ -95,6 +95,15 @@ static bool arc_return_in_memory (const_tree, const_tree);
static bool arc_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
const_tree, bool);
+/* ARC specific attributs. */
+
+static const struct attribute_spec arc_attribute_table[] =
+{
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ { "interrupt", 1, 1, true, false, false, arc_handle_interrupt_attribute },
+ { NULL, 0, 0, false, false, false, NULL }
+};
+
/* Initialize the GCC target structure. */
#undef TARGET_ASM_ALIGNED_HI_OP
#define TARGET_ASM_ALIGNED_HI_OP "\t.hword\t"
@@ -364,13 +373,6 @@ arc_init_reg_tables (void)
interrupt - for interrupt functions
*/
-const struct attribute_spec arc_attribute_table[] =
-{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt", 1, 1, true, false, false, arc_handle_interrupt_attribute },
- { NULL, 0, 0, false, false, false, NULL }
-};
-
/* Handle an "interrupt" attribute; arguments as in
struct attribute_spec.handler. */
static tree
@@ -897,7 +899,7 @@ arc_address_cost (rtx addr, bool speed ATTRIBUTE_UNUSED)
switch (GET_CODE (plus1))
{
case CONST_INT :
- return SMALL_INT (plus1) ? 1 : 2;
+ return SMALL_INT (INTVAL (plus1)) ? 1 : 2;
case CONST :
case SYMBOL_REF :
case LABEL_REF :
@@ -1502,9 +1504,10 @@ output_shift (rtx *operands)
}
else
{
- int n = INTVAL (operands[2]);
+ int n;
/* If the count is negative, make it 0. */
+ n = INTVAL (operands[2]);
if (n < 0)
n = 0;
/* If the count is too big, truncate it.