summaryrefslogtreecommitdiff
path: root/gcc/config/m32r
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/m32r
parentb4589acca420c16a7d67c77b8e36afa9a0a8d8ce (diff)
downloadgcc-5a82ecd9994682d76eba3c2c6460b3566fc5654c.tar.gz
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/m32r')
-rw-r--r--gcc/config/m32r/m32r-protos.h5
-rw-r--r--gcc/config/m32r/m32r.c26
-rw-r--r--gcc/config/m32r/m32r.h4
-rw-r--r--gcc/config/m32r/m32r.md4
4 files changed, 17 insertions, 22 deletions
diff --git a/gcc/config/m32r/m32r-protos.h b/gcc/config/m32r/m32r-protos.h
index 04533b9b49e..2b7d09afeb5 100644
--- a/gcc/config/m32r/m32r-protos.h
+++ b/gcc/config/m32r/m32r-protos.h
@@ -1,5 +1,5 @@
/* Prototypes for m32r.c functions used in the md file & elsewhere.
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -29,10 +29,7 @@ extern void m32r_expand_prologue (void);
extern void m32r_expand_epilogue (void);
extern int direct_return (void);
extern void m32r_load_pic_register (void);
-
-#ifdef TREE_CODE
extern enum m32r_function_type m32r_compute_function_type (tree);
-#endif /* TREE_CODE */
#ifdef RTX_CODE
extern int easy_di_const (rtx);
diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c
index 3ee6b6bb5fc..372ede596c0 100644
--- a/gcc/config/m32r/m32r.c
+++ b/gcc/config/m32r/m32r.c
@@ -38,6 +38,7 @@
#include "toplev.h"
#include "ggc.h"
#include "integrate.h"
+#include "df.h"
#include "tm_p.h"
#include "target.h"
#include "target-def.h"
@@ -65,7 +66,6 @@ static bool m32r_handle_option (size_t, const char *, int);
static void init_reg_tables (void);
static void block_move_call (rtx, rtx, rtx);
static int m32r_is_insn (rtx);
-EXPORTED_CONST struct attribute_spec m32r_attribute_table[];
static rtx m32r_legitimize_address (rtx, rtx, enum machine_mode);
static tree m32r_handle_model_attribute (tree *, tree, tree, int, bool *);
static void m32r_output_function_prologue (FILE *, HOST_WIDE_INT);
@@ -88,6 +88,16 @@ static bool m32r_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode,
static int m32r_arg_partial_bytes (CUMULATIVE_ARGS *, enum machine_mode,
tree, bool);
+/* M32R specific attributes. */
+
+static const struct attribute_spec m32r_attribute_table[] =
+{
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
+ { "interrupt", 0, 0, true, false, false, NULL },
+ { "model", 1, 1, true, false, false, m32r_handle_model_attribute },
+ { NULL, 0, 0, false, false, false, NULL }
+};
+
/* Initialize the GCC target structure. */
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE m32r_attribute_table
@@ -342,15 +352,6 @@ init_idents (void)
}
}
-const struct attribute_spec m32r_attribute_table[] =
-{
- /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler } */
- { "interrupt", 0, 0, true, false, false, NULL },
- { "model", 1, 1, true, false, false, m32r_handle_model_attribute },
- { NULL, 0, 0, false, false, false, NULL }
-};
-
-
/* Handle an "model" attribute; arguments as in
struct attribute_spec.handler. */
static tree
@@ -1632,8 +1633,7 @@ pop (int regno)
x = emit_insn (gen_movsi_pop (gen_rtx_REG (Pmode, regno),
stack_pointer_rtx));
- REG_NOTES (x)
- = gen_rtx_EXPR_LIST (REG_INC, stack_pointer_rtx, 0);
+ add_reg_note (x, REG_INC, stack_pointer_rtx);
}
/* Expand the m32r epilogue as a series of insns. */
@@ -2338,7 +2338,7 @@ block_move_call (rtx dest_reg, rtx src_reg, rtx bytes_rtx)
&& GET_MODE (bytes_rtx) != Pmode)
bytes_rtx = convert_to_mode (Pmode, bytes_rtx, 1);
- emit_library_call (m32r_function_symbol ("memcpy"), 0,
+ emit_library_call (m32r_function_symbol ("memcpy"), LCT_NORMAL,
VOIDmode, 3, dest_reg, Pmode, src_reg, Pmode,
convert_to_mode (TYPE_MODE (sizetype), bytes_rtx,
TYPE_UNSIGNED (sizetype)),
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index 61c322048d9..d06452d46ca 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler, Renesas M32R cpu.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -1034,7 +1034,7 @@ L2: .word STATIC
gen_int_mode (m32r_cache_flush_trap, SImode))); \
else if (m32r_cache_flush_func && m32r_cache_flush_func[0]) \
emit_library_call (m32r_function_symbol (m32r_cache_flush_func), \
- 0, VOIDmode, 3, TRAMP, Pmode, \
+ LCT_NORMAL, VOIDmode, 3, TRAMP, Pmode, \
gen_int_mode (TRAMPOLINE_SIZE, SImode), SImode, \
GEN_INT (3), SImode); \
} \
diff --git a/gcc/config/m32r/m32r.md b/gcc/config/m32r/m32r.md
index ec0d61f294c..0719357350e 100644
--- a/gcc/config/m32r/m32r.md
+++ b/gcc/config/m32r/m32r.md
@@ -1,6 +1,6 @@
;; Machine description of the Renesas M32R cpu for GNU C compiler
;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2005,
-; 2007, 2008 Free Software Foundation, Inc.
+; 2007, 2008, 2009 Free Software Foundation, Inc.
;; This file is part of GCC.
@@ -371,8 +371,6 @@
{
switch (GET_CODE (operands[1]))
{
- HOST_WIDE_INT value;
-
default:
break;