This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH RFA: Avoid new -Wc++-compat warnings
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Sat, 18 Apr 2009 23:27:11 -0700
- Subject: PATCH RFA: Avoid new -Wc++-compat warnings
This large but fairly mechanical patch fixes all the warnings introduce
by the changes to -Wc++-compat I proposed in
http://gcc.gnu.org/ml/gcc-patches/2009-04/msg01459.html
This patch requires approval from the Java and Fortran front-end
maintainers.
Besides the mechanical things, this patch fixes what appear to be bugs
in dse.c:replace_inc_dec and arm.c:adjacent_mem_locations.
This e-mail includes a minor patch to c-omp.c which should have been
included with the aforementioned patch.
Bootstrapped and tested on i686-pc-linux-gnu in conjunction with the
aforementioned path.
OK for mainline?
Ian
gcc/ChangeLog:
2009-04-18 Ian Lance Taylor <iant@google.com>
Fix enum conversions which are invalid in C++:
* auto-inc-dec.c (attempt_change): Change 0 to SET in function
call.
* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
call.
* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
call.
(dbxout_parms): Likewise.
* df-core.c (df_set_flags): Change changeable_flags parameter to
int.
(df_clear_flags): Likewise.
* df-problems.c (df_rd_bb_local_compute_process_def): Change
top_flag parameter to int.
(df_chain_create_bb_process_use): Likewise.
(df_chain_add_problem): Change chain_flags parameter to unsigned
int. Remove cast.
* df-scan.c (df_ref_create): Change ref_flags parameter to int.
(df_ref_create_structure, df_def_record_1): Likewise.
(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
(df_notes_rescan): Change 0 to VOIDmode in function call.
(df_get_call_refs, df_insn_refs_collect): Likewise.
(df_bb_regs_collect): Likewise.
(df_entry_block_defs_collect): Likewise.
(df_exit_block_uses_collect): Likewise.
* df.h: Update declarations.
* double-int.c (double_int_divmod): Add cast to enum type.
* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
(based_loc_descr): Likewise.
(loc_descriptor_from_tree_1): Change first_op and second_op to
enum dwarf_location_atom. Add cast to enum type.
* expmed.c (init_expmed): Change 0 to SET in function call.
* expr.c (init_expr_target): Change 0 to VOIDmode in function
call.
(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
(do_store_flag): Likewise.
* fixed-value.h (struct fixed_value): Change mode to enum
machine_mode.
* function.c (assign_parms): Change 0 to VOIDmode in function
call.
* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
function call.
(insert_insn_decl, insert_decl, insert_state): Likewise.
(automata_list_finish): Likewise.
* genrecog.c (process_define_predicate): Add cast to enum type.
* gensupport.c (init_predicate_table): Add cast to enum type.
* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
function call.
(gimple_build_call_1, gimple_build_label): Likewise.
(gimple_build_goto, gimple_build_asm_1): Likewise.
(gimple_build_switch_1, gimple_build_cdt): Likewise.
* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
call.
(enum fallback): Rename from enum fallback_t.
(fallback_t): Typedef as int.
* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
GSI_SAME_STMT in function call.
* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
enum type.
(setup_reg_class_relations): Likewise.
(setup_reg_class_nregs): Change cl to int. Add casts to enum
type.
(setup_prohibited_class_mode_regs): Add cast to enum type.
(setup_prohibited_mode_move_regs): Likewise.
* ira-costs.c (record_reg_classes): Change rclass to enum
reg_class.
(record_address_regs): Change i to enum reg_class.
* lists.c (alloc_EXPR_LIST): Add cast to enum type.
* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
(GET_MODE_2XWIDER_MODE): Likewise.
(GET_CLASS_NARROWEST_MODE): Likewise.
* omp-low.c (expand_omp_for): Add cast to enum type.
* optabs.c (debug_optab_libfuncs): Add casts to enum type.
* opts.c (enable_warning_as_error): Change kind to diagostic_t.
* postreload.c (reload_cse_simplify_operands): Change rclass local
to enum reg_class.
* predict.c (combine_predictions_for_insn): Change best_predictor
and predictor to enum br_predictor.
(combine_predictions_for_bb): Likewise.
(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
use SET_PREDICT_EXPR_OUTCOME.
* real.c (real_arithmetic): Change icode to code in function
call.
* reginfo.c (init_move_cost): Add casts to enum type.
(init_reg_sets_1, init_fake_stack_mems): Likewise.
* regmove.c (regclass_compatible_p): Change class0 and class1 to
enum reg_class.
* reload.c (find_valid_class): Add casts to enum type.
(push_reload): Change 0 to NO_REGS in function call.
(find_reloads): Change this_alternative to array of enum
reg_class. Remove some now-unnecessary casts.
(make_memloc): Change 0 to VOIDmode in function call.
* reload1.c (reload): Change 0 to VOIDmode in function call.
(eliminate_regs_1, elimination_effects): Likewise.
(eliminate_regs_in_insn): Likewise.
(emit_input_reload_insns): Add cast to enum type.
(delete_output_reload): Change 0 to VOIDmode in function call.
* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
to enum type in function call.
* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
(SET_PREDICT_EXPR_OUTCOME): Define.
* tree-dump.c (get_dump_file_info): Change phase parameter to
int.
(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
(dump_initialized_p, dump_flag_name, dump_end): Likewise.
(dump_function): Likewise.
* tree-dump.h: Update declarations.
* tree-pass.h: Update declarations.
* varasm.c (assemble_integer): Change mclass to enum mode_class.
* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
enum type.
(arm_rtx_costs_1): Correct parenthesization.
(arm_rtx_costs): Add casts to enum type.
(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
(vfp_emit_fstmd): Use add_rg_note.
(emit_multi_reg_push, emit_sfm): Likewise.
(thumb_set_frame_pointer): Likewise.
(arm_expand_prologue): Likewise.
(arm_regno_class): Change return type to enum reg_class.
(thumb1_expand_prologue): Use add_reg_note.
* config/arm/arm-protos.h (arm_regno_class): Update declaration.
* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
in function call.
* config/arm/gentune.sh: Add cast to enum type.
* config/arm/arm-tune.md: Rebuild.
* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
(ix86_split_fp_branch, predict_jump): Likewise.
(ix86_expand_multi_arg_builtin): Change sub_code from enum
insn_code to enum rtx_code.
(ix86_builtin_vectorized_function): Add cast to enum type.
* config/i386/i386.md (truncdfsf2): Change slot to enum
ix86_stack_slot.
(truncxf<mode>2, isinf<mode>2): Likewise.
* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
enum type.
* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
(insert_bundle_state): Change 1 to INSERT in function call.
(ia64_add_bundle_selector_before): Likewise.
* config/ia64/ia64.md (cpu attr): Add cast to enum type.
(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
(restore_stack_nonlocal): Likewise.
* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
function call.
* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
function call.
(mips_rtx_costs): Likewise.
(mips_override_options): Add casts to enum type.
* config/mips/mips.md (cpu attribute): Add cast to enum type.
* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
in function call.
* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
(store_reg, set_reg_plus_d): Likewise.
(hppa_expand_prologue, hppa_profile_hook): Likewise.
* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
cast to enum type.
(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
function call.
(emit_unlikely_jump): Use add_reg_note.
(rs6000_emit_allocate_stack): Likewise.
(rs6000_frame_related, rs6000_emit_prologue): Likewise.
(output_toc): Change 1 to INSERT in function call.
(output_profile_hook): Change 0 to LCT_NORMAL in function call.
(rs6000_initialize_trampoline): Likewise.
(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
function call.
* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
(s390_expand_setmem, s390_expand_cmpmem): Likewise.
(save_gprs): Use add_reg_note.
(s390_emit_prologue): Likewise.
(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
call.
* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
(sparc_fold_builtin): Add cast to enum type.
* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
enum insn_code.
(spu_expand_prologue): Use add_reg_note.
(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
call.
gcc/fortran/ChangeLog:
2009-04-18 Ian Lance Taylor <iant@google.com>
* module.c (import_iso_c_binding_module): Add casts to enum type.
* trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
tree_code.
(gfc_conv_intrinsic_anyall): Likewise.
(gfc_conv_intrinsic_arith): Likewise.
(gfc_conv_intrinsic_minmaxloc): Likewise.
(gfc_conv_intrinsic_minmaxval): Likewise.
(gfc_conv_intrinsic_bitop): Likewise.
(gfc_conv_intrinsic_singlebitop): Likewise.
(gfc_conv_intrinsic_strcmp): Likewise.
gcc/java/ChangeLog:
2009-04-18 Ian Lance Taylor <iant@google.com>
* verify-impl.c (verify_instructions_0): Add cast to enum type.
Index: tree-dump.c
===================================================================
--- tree-dump.c (revision 146298)
+++ tree-dump.c (working copy)
@@ -1,5 +1,5 @@
/* Tree-dumping functionality for intermediate representation.
- Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com>
@@ -855,11 +855,11 @@ dump_register (const char *suffix, const
/* Return the dump_file_info for the given phase. */
struct dump_file_info *
-get_dump_file_info (enum tree_dump_index phase)
+get_dump_file_info (int phase)
{
if (phase < TDI_end)
return &dump_files[phase];
- else if (phase - TDI_end >= extra_dump_files_in_use)
+ else if ((size_t) (phase - TDI_end) >= extra_dump_files_in_use)
return NULL;
else
return extra_dump_files + (phase - TDI_end);
@@ -870,7 +870,7 @@ get_dump_file_info (enum tree_dump_index
If the dump is not enabled, returns NULL. */
char *
-get_dump_file_name (enum tree_dump_index phase)
+get_dump_file_name (int phase)
{
char dump_id[10];
struct dump_file_info *dfi;
@@ -907,7 +907,7 @@ get_dump_file_name (enum tree_dump_index
Multiple calls will reopen and append to the dump file. */
FILE *
-dump_begin (enum tree_dump_index phase, int *flag_ptr)
+dump_begin (int phase, int *flag_ptr)
{
char *name;
struct dump_file_info *dfi;
@@ -935,7 +935,7 @@ dump_begin (enum tree_dump_index phase,
TDI_tree_all, return nonzero if any dump is enabled. */
int
-dump_enabled_p (enum tree_dump_index phase)
+dump_enabled_p (int phase)
{
if (phase == TDI_tree_all)
{
@@ -958,7 +958,7 @@ dump_enabled_p (enum tree_dump_index pha
/* Returns nonzero if tree dump PHASE has been initialized. */
int
-dump_initialized_p (enum tree_dump_index phase)
+dump_initialized_p (int phase)
{
struct dump_file_info *dfi = get_dump_file_info (phase);
return dfi->state > 0;
@@ -967,7 +967,7 @@ dump_initialized_p (enum tree_dump_index
/* Returns the switch name of PHASE. */
const char *
-dump_flag_name (enum tree_dump_index phase)
+dump_flag_name (int phase)
{
struct dump_file_info *dfi = get_dump_file_info (phase);
return dfi->swtch;
@@ -977,7 +977,7 @@ dump_flag_name (enum tree_dump_index pha
dump_begin. */
void
-dump_end (enum tree_dump_index phase ATTRIBUTE_UNUSED, FILE *stream)
+dump_end (int phase ATTRIBUTE_UNUSED, FILE *stream)
{
fclose (stream);
}
@@ -1098,7 +1098,7 @@ dump_switch_p (const char *arg)
/* Dump FUNCTION_DECL FN as tree dump PHASE. */
void
-dump_function (enum tree_dump_index phase, tree fn)
+dump_function (int phase, tree fn)
{
FILE *stream;
int flags;
@@ -1116,5 +1116,3 @@ enable_rtl_dump_file (void)
{
return dump_enable_all (TDF_RTL | TDF_DETAILS | TDF_BLOCKS) > 0;
}
-
-
Index: tree-dump.h
===================================================================
--- tree-dump.h (revision 146298)
+++ tree-dump.h (working copy)
@@ -1,5 +1,5 @@
/* Tree-dumping functionality for intermediate representation.
- Copyright (C) 1999, 2000, 2003, 2004, 2005, 2007, 2008
+ Copyright (C) 1999, 2000, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Written by Mark Mitchell <mark@codesourcery.com>
@@ -89,7 +89,7 @@ extern void dump_string_field (dump_info
extern void dump_stmt (dump_info_p, const_tree);
extern void queue_and_dump_index (dump_info_p, const char *, const_tree, int);
extern void queue_and_dump_type (dump_info_p, const_tree);
-extern void dump_function (enum tree_dump_index, tree);
+extern void dump_function (int, tree);
extern void dump_function_to_file (tree, FILE *, int);
extern void debug_function (tree, int);
extern int dump_flag (dump_info_p, int, const_tree);
Index: machmode.h
===================================================================
--- machmode.h (revision 146298)
+++ machmode.h (working copy)
@@ -1,6 +1,6 @@
/* Machine mode definitions for GCC; included by rtl.h and tree.h.
Copyright (C) 1991, 1993, 1994, 1996, 1998, 1999, 2000, 2001, 2003,
- 2007, 2008 Free Software Foundation, Inc.
+ 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -41,7 +41,7 @@ enum mode_class { MODE_CLASSES, MAX_MODE
(integer, floating, complex, etc.) */
extern const unsigned char mode_class[NUM_MACHINE_MODES];
-#define GET_MODE_CLASS(MODE) mode_class[MODE]
+#define GET_MODE_CLASS(MODE) ((enum mode_class) mode_class[MODE])
/* Nonzero if MODE is an integral mode. */
#define INTEGRAL_MODE_P(MODE) \
@@ -219,10 +219,10 @@ extern const unsigned char mode_nunits[N
/* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI). */
extern const unsigned char mode_wider[NUM_MACHINE_MODES];
-#define GET_MODE_WIDER_MODE(MODE) mode_wider[MODE]
+#define GET_MODE_WIDER_MODE(MODE) ((enum machine_mode) mode_wider[MODE])
extern const unsigned char mode_2xwider[NUM_MACHINE_MODES];
-#define GET_MODE_2XWIDER_MODE(MODE) mode_2xwider[MODE]
+#define GET_MODE_2XWIDER_MODE(MODE) ((enum machine_mode) mode_2xwider[MODE])
/* Return the mode for data of a given size SIZE and mode class CLASS.
If LIMIT is nonzero, then don't use modes bigger than MAX_FIXED_MODE_SIZE.
@@ -257,7 +257,8 @@ extern unsigned get_mode_alignment (enum
/* For each class, get the narrowest mode in that class. */
extern const unsigned char class_narrowest_mode[MAX_MODE_CLASS];
-#define GET_CLASS_NARROWEST_MODE(CLASS) class_narrowest_mode[CLASS]
+#define GET_CLASS_NARROWEST_MODE(CLASS) \
+ ((enum machine_mode) class_narrowest_mode[CLASS])
/* Define the integer modes whose sizes are BITS_PER_UNIT and BITS_PER_WORD
and the mode whose class is Pmode and whose size is POINTER_SIZE. */
Index: genrecog.c
===================================================================
--- genrecog.c (revision 146298)
+++ genrecog.c (working copy)
@@ -1,6 +1,6 @@
/* Generate code from machine description to recognize rtl as insns.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -378,7 +378,7 @@ process_define_predicate (rtx desc)
for (i = 0; i < NUM_RTX_CODE; i++)
if (codes[i] != N)
- add_predicate_code (pred, i);
+ add_predicate_code (pred, (enum rtx_code) i);
add_predicate (pred);
}
Index: java/verify-impl.c
===================================================================
--- java/verify-impl.c (revision 146298)
+++ java/verify-impl.c (working copy)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008
+/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009
Free Software Foundation
This file is part of libgcj.
@@ -3025,13 +3025,15 @@ verify_instructions_0 (void)
case op_newarray:
{
int atype = get_byte ();
+ vfy_jclass k;
type t;
/* We intentionally have chosen constants to make this
valid. */
if (atype < boolean_type || atype > long_type)
verify_fail_pc ("type not primitive", vfr->start_PC);
pop_type (int_type);
- init_type_from_class (&t, construct_primitive_array_type (atype));
+ k = construct_primitive_array_type ((type_val) atype);
+ init_type_from_class (&t, k);
push_type_t (t);
}
break;
Index: optabs.c
===================================================================
--- optabs.c (revision 146298)
+++ optabs.c (working copy)
@@ -1,6 +1,6 @@
/* Expand the basic unary and binary arithmetic operations, for GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -6688,7 +6688,7 @@ debug_optab_libfuncs (void)
rtx l;
o = &optab_table[i];
- l = optab_libfunc (o, j);
+ l = optab_libfunc (o, (enum machine_mode) j);
if (l)
{
gcc_assert (GET_CODE (l) == SYMBOL_REF);
@@ -6708,7 +6708,8 @@ debug_optab_libfuncs (void)
rtx l;
o = &convert_optab_table[i];
- l = convert_optab_libfunc (o, j, k);
+ l = convert_optab_libfunc (o, (enum machine_mode) j,
+ (enum machine_mode) k);
if (l)
{
gcc_assert (GET_CODE (l) == SYMBOL_REF);
Index: postreload.c
===================================================================
--- postreload.c (revision 146298)
+++ postreload.c (working copy)
@@ -1,6 +1,6 @@
/* Perform simple optimizations to clean up the result of reload.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -519,7 +519,7 @@ reload_cse_simplify_operands (rtx insn,
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
{
- int rclass = (int) NO_REGS;
+ enum reg_class rclass = NO_REGS;
if (! TEST_HARD_REG_BIT (equiv_regs[i], regno))
continue;
@@ -580,7 +580,7 @@ reload_cse_simplify_operands (rtx insn,
op_alt_regno[i][j] = regno;
}
j++;
- rclass = (int) NO_REGS;
+ rclass = NO_REGS;
break;
}
p += CONSTRAINT_LEN (c, p);
@@ -1610,4 +1610,3 @@ struct rtl_opt_pass pass_postreload_cse
TODO_dump_func /* todo_flags_finish */
}
};
-
Index: tree.h
===================================================================
--- tree.h (revision 146298)
+++ tree.h (working copy)
@@ -1124,7 +1124,9 @@ extern void omp_clause_range_check_faile
(CASE_LABEL_EXPR_CHECK (NODE)->base.addressable_flag)
#define PREDICT_EXPR_OUTCOME(NODE) \
- (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag)
+ ((enum prediction) (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag))
+#define SET_PREDICT_EXPR_OUTCOME(NODE, OUTCOME) \
+ (PREDICT_EXPR_CHECK(NODE)->base.addressable_flag = (int) OUTCOME)
#define PREDICT_EXPR_PREDICTOR(NODE) \
((enum br_predictor)tree_low_cst (TREE_OPERAND (PREDICT_EXPR_CHECK (NODE), 0), 0))
Index: reload.c
===================================================================
--- reload.c (revision 146298)
+++ reload.c (working copy)
@@ -685,7 +685,7 @@ find_valid_class (enum machine_mode oute
if (bad || !good)
continue;
- cost = REGISTER_MOVE_COST (outer, rclass, dest_class);
+ cost = REGISTER_MOVE_COST (outer, (enum reg_class) rclass, dest_class);
if ((reg_class_size[rclass] > best_size
&& (best_cost < 0 || best_cost >= cost))
@@ -693,7 +693,8 @@ find_valid_class (enum machine_mode oute
{
best_class = rclass;
best_size = reg_class_size[rclass];
- best_cost = REGISTER_MOVE_COST (outer, rclass, dest_class);
+ best_cost = REGISTER_MOVE_COST (outer, (enum reg_class) rclass,
+ dest_class);
}
}
@@ -1516,7 +1517,7 @@ push_reload (rtx in, rtx out, rtx *inloc
value for the incoming operand (same as outgoing one). */
if (rld[i].reg_rtx == out
&& (REG_P (in) || CONSTANT_P (in))
- && 0 != find_equiv_reg (in, this_insn, 0, REGNO (out),
+ && 0 != find_equiv_reg (in, this_insn, NO_REGS, REGNO (out),
static_reload_reg_p, i, inmode))
rld[i].in = out;
}
@@ -2565,7 +2566,7 @@ find_reloads (rtx insn, int replace, int
enum reload_usage { RELOAD_READ, RELOAD_READ_WRITE, RELOAD_WRITE } modified[MAX_RECOG_OPERANDS];
int no_input_reloads = 0, no_output_reloads = 0;
int n_alternatives;
- int this_alternative[MAX_RECOG_OPERANDS];
+ enum reg_class this_alternative[MAX_RECOG_OPERANDS];
char this_alternative_match_win[MAX_RECOG_OPERANDS];
char this_alternative_win[MAX_RECOG_OPERANDS];
char this_alternative_offmemok[MAX_RECOG_OPERANDS];
@@ -3059,7 +3060,7 @@ find_reloads (rtx insn, int replace, int
force_reload = 1;
}
- this_alternative[i] = (int) NO_REGS;
+ this_alternative[i] = NO_REGS;
this_alternative_win[i] = 0;
this_alternative_match_win[i] = 0;
this_alternative_offmemok[i] = 0;
@@ -3146,7 +3147,7 @@ find_reloads (rtx insn, int replace, int
this combination, because we can't reload it. */
if (this_alternative_offmemok[m]
&& MEM_P (recog_data.operand[m])
- && this_alternative[m] == (int) NO_REGS
+ && this_alternative[m] == NO_REGS
&& ! this_alternative_win[m])
bad = 1;
@@ -3162,7 +3163,7 @@ find_reloads (rtx insn, int replace, int
if (this_alternative_win[m])
losers++;
this_alternative_win[m] = 0;
- if (this_alternative[m] == (int) NO_REGS)
+ if (this_alternative[m] == NO_REGS)
bad = 1;
/* But count the pair only once in the total badness of
this alternative, if the pair can be a dummy reload.
@@ -3211,8 +3212,8 @@ find_reloads (rtx insn, int replace, int
case 'p':
/* All necessary reloads for an address_operand
were handled in find_reloads_address. */
- this_alternative[i]
- = (int) base_reg_class (VOIDmode, ADDRESS, SCRATCH);
+ this_alternative[i] = base_reg_class (VOIDmode, ADDRESS,
+ SCRATCH);
win = 1;
badop = 0;
break;
@@ -3371,7 +3372,7 @@ find_reloads (rtx insn, int replace, int
case 'r':
this_alternative[i]
- = (int) reg_class_subunion[this_alternative[i]][(int) GENERAL_REGS];
+ = reg_class_subunion[this_alternative[i]][(int) GENERAL_REGS];
goto reg;
default:
@@ -3417,8 +3418,9 @@ find_reloads (rtx insn, int replace, int
/* If we didn't already win, we can reload
the address into a base register. */
- this_alternative[i]
- = (int) base_reg_class (VOIDmode, ADDRESS, SCRATCH);
+ this_alternative[i] = base_reg_class (VOIDmode,
+ ADDRESS,
+ SCRATCH);
badop = 0;
break;
}
@@ -3430,9 +3432,9 @@ find_reloads (rtx insn, int replace, int
}
this_alternative[i]
- = (int) (reg_class_subunion
- [this_alternative[i]]
- [(int) REG_CLASS_FROM_CONSTRAINT (c, p)]);
+ = (reg_class_subunion
+ [this_alternative[i]]
+ [(int) REG_CLASS_FROM_CONSTRAINT (c, p)]);
reg:
if (GET_MODE (operand) == BLKmode)
break;
@@ -3449,7 +3451,7 @@ find_reloads (rtx insn, int replace, int
/* If this operand could be handled with a reg,
and some reg is allowed, then this operand can be handled. */
- if (winreg && this_alternative[i] != (int) NO_REGS)
+ if (winreg && this_alternative[i] != NO_REGS)
badop = 0;
/* Record which operands fit this alternative. */
@@ -3468,7 +3470,7 @@ find_reloads (rtx insn, int replace, int
bad = 1;
/* Alternative loses if it has no regs for a reg operand. */
if (REG_P (operand)
- && this_alternative[i] == (int) NO_REGS
+ && this_alternative[i] == NO_REGS
&& this_alternative_matches[i] < 0)
bad = 1;
@@ -3481,14 +3483,13 @@ find_reloads (rtx insn, int replace, int
precisely the same as in the code below that calls
force_const_mem. */
if (CONST_POOL_OK_P (operand)
- && ((PREFERRED_RELOAD_CLASS (operand,
- (enum reg_class) this_alternative[i])
+ && ((PREFERRED_RELOAD_CLASS (operand, this_alternative[i])
== NO_REGS)
|| no_input_reloads)
&& operand_mode[i] != VOIDmode)
{
const_to_mem = 1;
- if (this_alternative[i] != (int) NO_REGS)
+ if (this_alternative[i] != NO_REGS)
losers++;
}
@@ -3508,19 +3509,17 @@ find_reloads (rtx insn, int replace, int
LIMIT_RELOAD_CLASS, but we don't check that
here. */
- if (! CONSTANT_P (operand)
- && (enum reg_class) this_alternative[i] != NO_REGS)
+ if (! CONSTANT_P (operand) && this_alternative[i] != NO_REGS)
{
- if (PREFERRED_RELOAD_CLASS
- (operand, (enum reg_class) this_alternative[i])
+ if (PREFERRED_RELOAD_CLASS (operand, this_alternative[i])
== NO_REGS)
reject = 600;
#ifdef PREFERRED_OUTPUT_RELOAD_CLASS
if (operand_type[i] == RELOAD_FOR_OUTPUT
- && PREFERRED_OUTPUT_RELOAD_CLASS
- (operand, (enum reg_class) this_alternative[i])
- == NO_REGS)
+ && (PREFERRED_OUTPUT_RELOAD_CLASS (operand,
+ this_alternative[i])
+ == NO_REGS))
reject = 600;
#endif
}
@@ -3568,7 +3567,7 @@ find_reloads (rtx insn, int replace, int
because we might otherwise exhaust the class. */
if (! win && ! did_match
- && this_alternative[i] != (int) NO_REGS
+ && this_alternative[i] != NO_REGS
&& GET_MODE_SIZE (operand_mode[i]) <= UNITS_PER_WORD
&& reg_class_size [(int) preferred_class[i]] > 0
&& ! SMALL_REGISTER_CLASS_P (preferred_class[i]))
@@ -3582,7 +3581,7 @@ find_reloads (rtx insn, int replace, int
common case anyway. */
if (reg_class_subset_p (preferred_class[i],
this_alternative[i]))
- this_alternative[i] = (int) preferred_class[i];
+ this_alternative[i] = preferred_class[i];
else
reject += (2 + 2 * pref_or_nothing[i]);
}
@@ -4767,7 +4766,8 @@ make_memloc (rtx ad, int regno)
/* We must rerun eliminate_regs, in case the elimination
offsets have changed. */
rtx tem
- = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], 0, NULL_RTX), 0);
+ = XEXP (eliminate_regs (reg_equiv_memory_loc[regno], VOIDmode, NULL_RTX),
+ 0);
/* If TEM might contain a pseudo, we must copy it to avoid
modifying it when we do the substitution for the reload. */
Index: tree-pass.h
===================================================================
--- tree-pass.h (revision 146298)
+++ tree-pass.h (working copy)
@@ -77,14 +77,14 @@ enum tree_dump_index
a gimple stmt. */
/* In tree-dump.c */
-extern char *get_dump_file_name (enum tree_dump_index);
-extern int dump_enabled_p (enum tree_dump_index);
-extern int dump_initialized_p (enum tree_dump_index);
-extern FILE *dump_begin (enum tree_dump_index, int *);
-extern void dump_end (enum tree_dump_index, FILE *);
+extern char *get_dump_file_name (int);
+extern int dump_enabled_p (int);
+extern int dump_initialized_p (int);
+extern FILE *dump_begin (int, int *);
+extern void dump_end (int, FILE *);
extern void dump_node (const_tree, int, FILE *);
extern int dump_switch_p (const char *);
-extern const char *dump_flag_name (enum tree_dump_index);
+extern const char *dump_flag_name (int);
/* Global variables used to communicate with passes. */
extern FILE *dump_file;
@@ -92,7 +92,7 @@ extern int dump_flags;
extern const char *dump_file_name;
/* Return the dump_file_info for the given phase. */
-extern struct dump_file_info *get_dump_file_info (enum tree_dump_index);
+extern struct dump_file_info *get_dump_file_info (int);
/* Describe one pass; this is the common part shared across different pass
types. */
Index: lists.c
===================================================================
--- lists.c (revision 146298)
+++ lists.c (working copy)
@@ -1,6 +1,7 @@
/* List management for the GCC expander.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 1999, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of GCC.
@@ -140,7 +141,7 @@ alloc_EXPR_LIST (int kind, rtx val, rtx
PUT_REG_NOTE_KIND (r, kind);
}
else
- r = gen_rtx_EXPR_LIST (kind, val, next);
+ r = gen_rtx_EXPR_LIST ((enum machine_mode) kind, val, next);
return r;
}
Index: gensupport.c
===================================================================
--- gensupport.c (revision 146298)
+++ gensupport.c (working copy)
@@ -1,5 +1,5 @@
/* Support routines for the various generation passes.
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -1404,7 +1404,7 @@ init_predicate_table (void)
if (std_preds[i].allows_const_p)
for (j = 0; j < NUM_RTX_CODE; j++)
if (GET_RTX_CLASS (j) == RTX_CONST_OBJ)
- add_predicate_code (pred, j);
+ add_predicate_code (pred, (enum rtx_code) j);
add_predicate (pred);
}
Index: omp-low.c
===================================================================
--- omp-low.c (revision 146298)
+++ omp-low.c (working copy)
@@ -4561,7 +4561,8 @@ expand_omp_for (struct omp_region *regio
next_ix += BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT
- BUILT_IN_GOMP_LOOP_STATIC_NEXT;
}
- expand_omp_for_generic (region, &fd, start_ix, next_ix);
+ expand_omp_for_generic (region, &fd, (enum built_in_function) start_ix,
+ (enum built_in_function) next_ix);
}
update_ssa (TODO_update_ssa_only_virtuals);
Index: genautomata.c
===================================================================
--- genautomata.c (revision 146298)
+++ genautomata.c (working copy)
@@ -1796,7 +1796,7 @@ insert_automaton_decl (decl_t automaton_
{
void **entry_ptr;
- entry_ptr = htab_find_slot (automaton_decl_table, automaton_decl, 1);
+ entry_ptr = htab_find_slot (automaton_decl_table, automaton_decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) automaton_decl;
return (decl_t) *entry_ptr;
@@ -1895,7 +1895,7 @@ insert_insn_decl (decl_t insn_decl)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (insn_decl_table, insn_decl, 1);
+ entry_ptr = htab_find_slot (insn_decl_table, insn_decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) insn_decl;
return (decl_t) *entry_ptr;
@@ -1996,7 +1996,7 @@ insert_decl (decl_t decl)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (decl_table, decl, 1);
+ entry_ptr = htab_find_slot (decl_table, decl, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) decl;
return (decl_t) *entry_ptr;
@@ -3748,7 +3748,7 @@ insert_state (state_t state)
{
void **entry_ptr;
- entry_ptr = htab_find_slot (state_table, (void *) state, 1);
+ entry_ptr = htab_find_slot (state_table, (void *) state, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) state;
return (state_t) *entry_ptr;
@@ -4104,7 +4104,7 @@ automata_list_finish (void)
if (current_automata_list == NULL)
return NULL;
entry_ptr = htab_find_slot (automata_list_table,
- (void *) current_automata_list, 1);
+ (void *) current_automata_list, INSERT);
if (*entry_ptr == NULL)
*entry_ptr = (void *) current_automata_list;
else
Index: auto-inc-dec.c
===================================================================
--- auto-inc-dec.c (revision 146298)
+++ auto-inc-dec.c (working copy)
@@ -520,10 +520,10 @@ attempt_change (rtx new_addr, rtx inc_re
PUT_MODE (mem_tmp, mode);
XEXP (mem_tmp, 0) = new_addr;
- old_cost = rtx_cost (mem, 0, speed)
- + rtx_cost (PATTERN (inc_insn.insn), 0, speed);
- new_cost = rtx_cost (mem_tmp, 0, speed);
-
+ old_cost = (rtx_cost (mem, SET, speed)
+ + rtx_cost (PATTERN (inc_insn.insn), SET, speed));
+ new_cost = rtx_cost (mem_tmp, SET, speed);
+
/* The first item of business is to see if this is profitable. */
if (old_cost < new_cost)
{
@@ -1559,4 +1559,3 @@ struct rtl_opt_pass pass_inc_dec =
TODO_df_finish, /* todo_flags_finish */
}
};
-
Index: reorg.c
===================================================================
--- reorg.c (revision 146298)
+++ reorg.c (working copy)
@@ -318,7 +318,10 @@ insn_sets_resource_p (rtx insn, struct r
struct resources insn_sets;
CLEAR_RESOURCE (&insn_sets);
- mark_set_resources (insn, &insn_sets, 0, include_delayed_effects);
+ mark_set_resources (insn, &insn_sets, 0,
+ (include_delayed_effects
+ ? MARK_SRC_DEST_CALL
+ : MARK_SRC_DEST));
return resource_conflicts_p (&insn_sets, res);
}
Index: real.c
===================================================================
--- real.c (revision 146298)
+++ real.c (working copy)
@@ -1000,7 +1000,7 @@ real_arithmetic (REAL_VALUE_TYPE *r, int
enum tree_code code = icode;
if (op0->decimal || (op1 && op1->decimal))
- return decimal_real_arithmetic (r, icode, op0, op1);
+ return decimal_real_arithmetic (r, code, op0, op1);
switch (code)
{
Index: df-scan.c
===================================================================
--- df-scan.c (revision 146298)
+++ df-scan.c (working copy)
@@ -100,24 +100,24 @@ static struct df_mw_hardreg * df_null_mw
static void df_ref_record (enum df_ref_class, struct df_collection_rec *,
rtx, rtx *,
basic_block, struct df_insn_info *,
- enum df_ref_type, enum df_ref_flags,
+ enum df_ref_type, int ref_flags,
int, int, enum machine_mode);
static void df_def_record_1 (struct df_collection_rec *, rtx,
basic_block, struct df_insn_info *,
- enum df_ref_flags);
+ int ref_flags);
static void df_defs_record (struct df_collection_rec *, rtx,
basic_block, struct df_insn_info *,
- enum df_ref_flags);
+ int ref_flags);
static void df_uses_record (enum df_ref_class, struct df_collection_rec *,
rtx *, enum df_ref_type,
basic_block, struct df_insn_info *,
- enum df_ref_flags,
+ int ref_flags,
int, int, enum machine_mode);
static df_ref df_ref_create_structure (enum df_ref_class,
struct df_collection_rec *, rtx, rtx *,
basic_block, struct df_insn_info *,
- enum df_ref_type, enum df_ref_flags,
+ enum df_ref_type, int ref_flags,
int, int, enum machine_mode);
static void df_insn_refs_collect (struct df_collection_rec*,
@@ -708,7 +708,7 @@ df_ref
df_ref_create (rtx reg, rtx *loc, rtx insn,
basic_block bb,
enum df_ref_type ref_type,
- enum df_ref_flags ref_flags,
+ int ref_flags,
int width, int offset, enum machine_mode mode)
{
df_ref ref;
@@ -2146,7 +2146,7 @@ df_notes_rescan (rtx insn)
case REG_EQUAL:
df_uses_record (DF_REF_REGULAR, &collection_rec,
&XEXP (note, 0), DF_REF_REG_USE,
- bb, insn_info, DF_REF_IN_NOTE, -1, -1, 0);
+ bb, insn_info, DF_REF_IN_NOTE, -1, -1, VOIDmode);
default:
break;
}
@@ -2691,7 +2691,7 @@ df_ref_create_structure (enum df_ref_cla
rtx reg, rtx *loc,
basic_block bb, struct df_insn_info *info,
enum df_ref_type ref_type,
- enum df_ref_flags ref_flags,
+ int ref_flags,
int width, int offset, enum machine_mode mode)
{
df_ref this_ref = NULL;
@@ -2789,7 +2789,7 @@ df_ref_record (enum df_ref_class cl,
rtx reg, rtx *loc,
basic_block bb, struct df_insn_info *insn_info,
enum df_ref_type ref_type,
- enum df_ref_flags ref_flags,
+ int ref_flags,
int width, int offset, enum machine_mode mode)
{
unsigned int regno;
@@ -2878,7 +2878,7 @@ df_read_modify_subreg_p (rtx x)
static void
df_def_record_1 (struct df_collection_rec *collection_rec,
rtx x, basic_block bb, struct df_insn_info *insn_info,
- enum df_ref_flags flags)
+ int flags)
{
rtx *loc;
rtx dst;
@@ -2971,7 +2971,7 @@ df_def_record_1 (struct df_collection_re
static void
df_defs_record (struct df_collection_rec *collection_rec,
rtx x, basic_block bb, struct df_insn_info *insn_info,
- enum df_ref_flags flags)
+ int flags)
{
RTX_CODE code = GET_CODE (x);
@@ -3009,7 +3009,7 @@ static void
df_uses_record (enum df_ref_class cl, struct df_collection_rec *collection_rec,
rtx *loc, enum df_ref_type ref_type,
basic_block bb, struct df_insn_info *insn_info,
- enum df_ref_flags flags,
+ int flags,
int width, int offset, enum machine_mode mode)
{
RTX_CODE code;
@@ -3322,7 +3322,7 @@ static void
df_get_call_refs (struct df_collection_rec * collection_rec,
basic_block bb,
struct df_insn_info *insn_info,
- enum df_ref_flags flags)
+ int flags)
{
rtx note;
bitmap_iterator bi;
@@ -3347,7 +3347,8 @@ df_get_call_refs (struct df_collection_r
{
if (GET_CODE (XEXP (note, 0)) == USE)
df_uses_record (DF_REF_REGULAR, collection_rec, &XEXP (XEXP (note, 0), 0),
- DF_REF_REG_USE, bb, insn_info, flags, -1, -1, 0);
+ DF_REF_REG_USE, bb, insn_info, flags, -1, -1,
+ VOIDmode);
else if (GET_CODE (XEXP (note, 0)) == CLOBBER)
{
if (REG_P (XEXP (XEXP (note, 0), 0)))
@@ -3359,7 +3360,8 @@ df_get_call_refs (struct df_collection_r
}
else
df_uses_record (DF_REF_REGULAR, collection_rec, &XEXP (note, 0),
- DF_REF_REG_USE, bb, insn_info, flags, -1, -1, 0);
+ DF_REF_REG_USE, bb, insn_info, flags, -1, -1,
+ VOIDmode);
}
}
@@ -3367,7 +3369,7 @@ df_get_call_refs (struct df_collection_r
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[STACK_POINTER_REGNUM],
NULL, bb, insn_info, DF_REF_REG_USE,
DF_REF_CALL_STACK_USAGE | flags,
- -1, -1, 0);
+ -1, -1, VOIDmode);
/* Calls may also reference any of the global registers,
so they are recorded as used. */
@@ -3375,9 +3377,11 @@ df_get_call_refs (struct df_collection_r
if (global_regs[i])
{
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
- NULL, bb, insn_info, DF_REF_REG_USE, flags, -1, -1, 0);
+ NULL, bb, insn_info, DF_REF_REG_USE, flags, -1, -1,
+ VOIDmode);
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
- NULL, bb, insn_info, DF_REF_REG_DEF, flags, -1, -1, 0);
+ NULL, bb, insn_info, DF_REF_REG_DEF, flags, -1, -1,
+ VOIDmode);
}
is_sibling_call = SIBLING_CALL_P (insn_info->insn);
@@ -3392,7 +3396,7 @@ df_get_call_refs (struct df_collection_r
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[ui],
NULL, bb, insn_info, DF_REF_REG_DEF,
DF_REF_MAY_CLOBBER | flags,
- -1, -1, 0);
+ -1, -1, VOIDmode);
}
BITMAP_FREE (defs_generated);
@@ -3430,19 +3434,19 @@ df_insn_refs_collect (struct df_collecti
case REG_EQUAL:
df_uses_record (DF_REF_REGULAR, collection_rec,
&XEXP (note, 0), DF_REF_REG_USE,
- bb, insn_info, DF_REF_IN_NOTE, -1, -1, 0);
+ bb, insn_info, DF_REF_IN_NOTE, -1, -1, VOIDmode);
break;
case REG_NON_LOCAL_GOTO:
/* The frame ptr is used by a non-local goto. */
df_ref_record (DF_REF_BASE, collection_rec,
regno_reg_rtx[FRAME_POINTER_REGNUM],
NULL, bb, insn_info,
- DF_REF_REG_USE, 0, -1, -1, 0);
+ DF_REF_REG_USE, 0, -1, -1, VOIDmode);
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
df_ref_record (DF_REF_BASE, collection_rec,
regno_reg_rtx[HARD_FRAME_POINTER_REGNUM],
NULL, bb, insn_info,
- DF_REF_REG_USE, 0, -1, -1, 0);
+ DF_REF_REG_USE, 0, -1, -1, VOIDmode);
#endif
break;
default:
@@ -3457,7 +3461,7 @@ df_insn_refs_collect (struct df_collecti
/* Record the register uses. */
df_uses_record (DF_REF_REGULAR, collection_rec,
&PATTERN (insn_info->insn), DF_REF_REG_USE, bb, insn_info, 0,
- -1, -1, 0);
+ -1, -1, VOIDmode);
/* DF_REF_CONDITIONAL needs corresponding USES. */
if (is_cond_exec)
@@ -3540,7 +3544,8 @@ df_bb_refs_collect (struct df_collection
if (regno == INVALID_REGNUM)
break;
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[regno], NULL,
- bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP, -1, -1, 0);
+ bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP, -1, -1,
+ VOIDmode);
}
}
#endif
@@ -3549,7 +3554,7 @@ df_bb_refs_collect (struct df_collection
non-local goto. */
if (bb->flags & BB_NON_LOCAL_GOTO_TARGET)
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, hard_frame_pointer_rtx, NULL,
- bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP, -1, -1, 0);
+ bb, NULL, DF_REF_REG_DEF, DF_REF_AT_TOP, -1, -1, VOIDmode);
/* Add the artificial uses. */
if (bb->index >= NUM_FIXED_BLOCKS)
@@ -3563,7 +3568,7 @@ df_bb_refs_collect (struct df_collection
EXECUTE_IF_SET_IN_BITMAP (au, 0, regno, bi)
{
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[regno], NULL,
- bb, NULL, DF_REF_REG_USE, 0, -1, -1, 0);
+ bb, NULL, DF_REF_REG_USE, 0, -1, -1, VOIDmode);
}
}
@@ -3864,7 +3869,8 @@ df_entry_block_defs_collect (struct df_c
EXECUTE_IF_SET_IN_BITMAP (entry_block_defs, 0, i, bi)
{
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[i], NULL,
- ENTRY_BLOCK_PTR, NULL, DF_REF_REG_DEF, 0, -1, -1, 0);
+ ENTRY_BLOCK_PTR, NULL, DF_REF_REG_DEF, 0, -1, -1,
+ VOIDmode);
}
df_canonize_collection_rec (collection_rec);
@@ -4025,7 +4031,7 @@ df_exit_block_uses_collect (struct df_co
EXECUTE_IF_SET_IN_BITMAP (exit_block_uses, 0, i, bi)
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[i], NULL,
- EXIT_BLOCK_PTR, NULL, DF_REF_REG_USE, 0, -1, -1, 0);
+ EXIT_BLOCK_PTR, NULL, DF_REF_REG_USE, 0, -1, -1, VOIDmode);
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
/* It is deliberate that this is not put in the exit block uses but
@@ -4035,7 +4041,7 @@ df_exit_block_uses_collect (struct df_co
&& bb_has_eh_pred (EXIT_BLOCK_PTR)
&& fixed_regs[ARG_POINTER_REGNUM])
df_ref_record (DF_REF_ARTIFICIAL, collection_rec, regno_reg_rtx[ARG_POINTER_REGNUM], NULL,
- EXIT_BLOCK_PTR, NULL, DF_REF_REG_USE, 0, -1, -1, 0);
+ EXIT_BLOCK_PTR, NULL, DF_REF_REG_USE, 0, -1, -1, VOIDmode);
#endif
df_canonize_collection_rec (collection_rec);
Index: cp/pt.c
===================================================================
--- cp/pt.c (revision 146298)
+++ cp/pt.c (working copy)
@@ -13131,7 +13131,9 @@ unify_pack_expansion (tree tparms, tree
match. */
if (resolve_overloaded_unification
- (tparms, targs, parm, arg, strict, sub_strict)
+ (tparms, targs, parm, arg,
+ (unification_kind_t) strict,
+ sub_strict)
!= 0)
return 1;
skip_arg_p = true;
@@ -13150,8 +13152,8 @@ unify_pack_expansion (tree tparms, tree
if (!subr)
arg_strict |=
- maybe_adjust_types_for_deduction (strict, &parm, &arg,
- arg_expr);
+ maybe_adjust_types_for_deduction ((unification_kind_t) strict,
+ &parm, &arg, arg_expr);
}
if (!skip_arg_p)
Index: cp/parser.c
===================================================================
--- cp/parser.c (revision 146298)
+++ cp/parser.c (working copy)
@@ -21043,7 +21043,7 @@ static void
cp_parser_omp_flush (cp_parser *parser, cp_token *pragma_tok)
{
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN))
- (void) cp_parser_omp_var_list (parser, 0, NULL);
+ (void) cp_parser_omp_var_list (parser, OMP_CLAUSE_ERROR, NULL);
cp_parser_require_pragma_eol (parser, pragma_tok);
finish_omp_flush ();
@@ -21884,7 +21884,7 @@ cp_parser_omp_threadprivate (cp_parser *
{
tree vars;
- vars = cp_parser_omp_var_list (parser, 0, NULL);
+ vars = cp_parser_omp_var_list (parser, OMP_CLAUSE_ERROR, NULL);
cp_parser_require_pragma_eol (parser, pragma_tok);
finish_omp_threadprivate (vars);
Index: cp/cp-tree.h
===================================================================
--- cp/cp-tree.h (revision 146298)
+++ cp/cp-tree.h (working copy)
@@ -3592,7 +3592,7 @@ enum tsubst_flags {
typedef int tsubst_flags_t;
/* The kind of checking we can do looking in a class hierarchy. */
-typedef enum base_access {
+enum base_access {
ba_any = 0, /* Do not check access, allow an ambiguous base,
prefer a non-virtual base */
ba_unique = 1 << 0, /* Must be a unique base. */
@@ -3600,7 +3600,11 @@ typedef enum base_access {
ba_check = ba_unique | ba_check_bit,
ba_ignore_scope = 1 << 2, /* Ignore access allowed by local scope. */
ba_quiet = 1 << 3 /* Do not issue error messages. */
-} base_access;
+};
+
+/* This type is used for parameters and variables which hold
+ combinations of the flags in enum base_access. */
+typedef int base_access;
/* The various kinds of access check during parsing. */
typedef enum deferring_kind {
Index: double-int.c
===================================================================
--- double-int.c (revision 146298)
+++ double-int.c (working copy)
@@ -1,5 +1,5 @@
/* Operations with long integers.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -211,8 +211,9 @@ double_int_divmod (double_int a, double_
{
double_int ret;
- div_and_round_double (code, uns, a.low, a.high, b.low, b.high,
- &ret.low, &ret.high, &mod->low, &mod->high);
+ div_and_round_double ((enum tree_code) code, uns, a.low, a.high,
+ b.low, b.high, &ret.low, &ret.high,
+ &mod->low, &mod->high);
return ret;
}
Index: dbxout.c
===================================================================
--- dbxout.c (revision 146298)
+++ dbxout.c (working copy)
@@ -1,6 +1,6 @@
/* Output dbx-format symbol table information from GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -2811,7 +2811,7 @@ dbxout_symbol (tree decl, int local ATTR
if (!decl_rtl)
DBXOUT_DECR_NESTING_AND_RETURN (0);
- decl_rtl = eliminate_regs (decl_rtl, 0, NULL_RTX);
+ decl_rtl = eliminate_regs (decl_rtl, VOIDmode, NULL_RTX);
#ifdef LEAF_REG_REMAP
if (current_function_uses_only_leaf_regs)
leaf_renumber_regs_insn (decl_rtl);
@@ -3316,8 +3316,9 @@ dbxout_parms (tree parms)
/* Perform any necessary register eliminations on the parameter's rtl,
so that the debugging output will be accurate. */
DECL_INCOMING_RTL (parms)
- = eliminate_regs (DECL_INCOMING_RTL (parms), 0, NULL_RTX);
- SET_DECL_RTL (parms, eliminate_regs (DECL_RTL (parms), 0, NULL_RTX));
+ = eliminate_regs (DECL_INCOMING_RTL (parms), VOIDmode, NULL_RTX);
+ SET_DECL_RTL (parms,
+ eliminate_regs (DECL_RTL (parms), VOIDmode, NULL_RTX));
#ifdef LEAF_REG_REMAP
if (current_function_uses_only_leaf_regs)
{
Index: df-core.c
===================================================================
--- df-core.c (revision 146298)
+++ df-core.c (working copy)
@@ -475,7 +475,7 @@ df_add_problem (struct df_problem *probl
returned. If a flag is not allowed to be changed this will fail if
checking is enabled. */
enum df_changeable_flags
-df_set_flags (enum df_changeable_flags changeable_flags)
+df_set_flags (int changeable_flags)
{
enum df_changeable_flags old_flags = df->changeable_flags;
df->changeable_flags |= changeable_flags;
@@ -487,7 +487,7 @@ df_set_flags (enum df_changeable_flags c
returned. If a flag is not allowed to be changed this will fail if
checking is enabled. */
enum df_changeable_flags
-df_clear_flags (enum df_changeable_flags changeable_flags)
+df_clear_flags (int changeable_flags)
{
enum df_changeable_flags old_flags = df->changeable_flags;
df->changeable_flags &= ~changeable_flags;
Index: cse.c
===================================================================
--- cse.c (revision 146298)
+++ cse.c (working copy)
@@ -1,6 +1,6 @@
/* Common subexpression elimination for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -2329,14 +2329,14 @@ hash_rtx_cb (const_rtx x, enum machine_m
goto repeat;
}
- hash += hash_rtx_cb (XEXP (x, i), 0, do_not_record_p,
+ hash += hash_rtx_cb (XEXP (x, i), VOIDmode, do_not_record_p,
hash_arg_in_memory_p,
have_reg_qty, cb);
break;
case 'E':
for (j = 0; j < XVECLEN (x, i); j++)
- hash += hash_rtx_cb (XVECEXP (x, i, j), 0, do_not_record_p,
+ hash += hash_rtx_cb (XVECEXP (x, i, j), VOIDmode, do_not_record_p,
hash_arg_in_memory_p,
have_reg_qty, cb);
break;
@@ -6997,4 +6997,3 @@ struct rtl_opt_pass pass_cse2 =
TODO_verify_flow /* todo_flags_finish */
}
};
-
Index: gimple-low.c
===================================================================
--- gimple-low.c (revision 146298)
+++ gimple-low.c (working copy)
@@ -829,7 +829,7 @@ lower_builtin_setjmp (gimple_stmt_iterat
/* Build 'goto CONT_LABEL' and insert. */
g = gimple_build_goto (cont_label);
- gsi_insert_before (gsi, g, TSI_SAME_STMT);
+ gsi_insert_before (gsi, g, GSI_SAME_STMT);
/* Build 'NEXT_LABEL:' and insert. */
g = gimple_build_label (next_label);
Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 146298)
+++ dwarf2out.c (working copy)
@@ -3866,12 +3866,13 @@ new_reg_loc_descr (unsigned int reg, un
if (offset)
{
if (reg <= 31)
- return new_loc_descr (DW_OP_breg0 + reg, offset, 0);
+ return new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + reg),
+ offset, 0);
else
return new_loc_descr (DW_OP_bregx, reg, offset);
}
else if (reg <= 31)
- return new_loc_descr (DW_OP_reg0 + reg, 0, 0);
+ return new_loc_descr ((enum dwarf_location_atom) (DW_OP_reg0 + reg), 0, 0);
else
return new_loc_descr (DW_OP_regx, reg, 0);
}
@@ -9866,7 +9867,8 @@ based_loc_descr (rtx reg, HOST_WIDE_INT
regno = dbx_reg_number (reg);
if (regno <= 31)
- result = new_loc_descr (DW_OP_breg0 + regno, offset, 0);
+ result = new_loc_descr ((enum dwarf_location_atom) (DW_OP_breg0 + regno),
+ offset, 0);
else
result = new_loc_descr (DW_OP_bregx, regno, offset);
@@ -10394,8 +10396,8 @@ loc_descriptor_from_tree_1 (tree loc, in
if (DECL_THREAD_LOCAL_P (loc))
{
rtx rtl;
- unsigned first_op;
- unsigned second_op;
+ enum dwarf_location_atom first_op;
+ enum dwarf_location_atom second_op;
if (targetm.have_tls)
{
@@ -10409,7 +10411,7 @@ loc_descriptor_from_tree_1 (tree loc, in
module. */
if (DECL_EXTERNAL (loc) && !targetm.binds_local_p (loc))
return 0;
- first_op = INTERNAL_DW_OP_tls_addr;
+ first_op = (enum dwarf_location_atom) INTERNAL_DW_OP_tls_addr;
second_op = DW_OP_GNU_push_tls_address;
}
else
Index: expr.c
===================================================================
--- expr.c (revision 146298)
+++ expr.c (working copy)
@@ -1,6 +1,6 @@
/* Convert tree expression to rtl instructions, for GNU compiler.
Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -267,7 +267,7 @@ init_expr_target (void)
reg = gen_rtx_REG (VOIDmode, -1);
insn = rtx_alloc (INSN);
- pat = gen_rtx_SET (0, NULL_RTX, NULL_RTX);
+ pat = gen_rtx_SET (VOIDmode, NULL_RTX, NULL_RTX);
PATTERN (insn) = pat;
for (mode = VOIDmode; (int) mode < NUM_MACHINE_MODES;
@@ -8474,7 +8474,7 @@ expand_expr_real_1 (tree exp, rtx target
|| mode != ptr_mode)
{
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
if (op0 == const0_rtx)
return op1;
if (op1 == const0_rtx)
@@ -8646,11 +8646,11 @@ expand_expr_real_1 (tree exp, rtx target
if (TYPE_UNSIGNED (TREE_TYPE (TREE_OPERAND (subexp0, 0))))
expand_operands (TREE_OPERAND (subexp0, 0),
TREE_OPERAND (subexp1, 0),
- NULL_RTX, &op0, &op1, 0);
+ NULL_RTX, &op0, &op1, EXPAND_NORMAL);
else
expand_operands (TREE_OPERAND (subexp0, 0),
TREE_OPERAND (subexp1, 0),
- NULL_RTX, &op1, &op0, 0);
+ NULL_RTX, &op1, &op0, EXPAND_NORMAL);
goto binop3;
}
@@ -8727,7 +8727,7 @@ expand_expr_real_1 (tree exp, rtx target
}
}
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return REDUCE_BIT_FIELD (expand_mult (mode, op0, op1, target, unsignedp));
case TRUNC_DIV_EXPR:
@@ -8747,7 +8747,7 @@ expand_expr_real_1 (tree exp, rtx target
then if the divisor is constant can optimize the case
where some terms of the dividend have coeffs divisible by it. */
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return expand_divmod (0, code, mode, op0, op1, target, unsignedp);
case RDIV_EXPR:
@@ -8760,7 +8760,7 @@ expand_expr_real_1 (tree exp, rtx target
if (modifier == EXPAND_STACK_PARM)
target = 0;
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
return expand_divmod (1, code, mode, op0, op1, target, unsignedp);
case FIXED_CONVERT_EXPR:
@@ -8837,7 +8837,7 @@ expand_expr_real_1 (tree exp, rtx target
&& REGNO (target) < FIRST_PSEUDO_REGISTER))
target = gen_reg_rtx (mode);
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- target, &op0, &op1, 0);
+ target, &op0, &op1, EXPAND_NORMAL);
/* First try to do it with a special MIN or MAX instruction.
If that does not win, use a conditional jump to select the proper
@@ -9345,7 +9345,7 @@ expand_expr_real_1 (tree exp, rtx target
tree oprnd0 = TREE_OPERAND (exp, 0);
tree oprnd1 = TREE_OPERAND (exp, 1);
- expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, 0);
+ expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL);
target = expand_widen_pattern_expr (exp, op0, NULL_RTX, op1,
target, unsignedp);
return target;
@@ -9366,7 +9366,7 @@ expand_expr_real_1 (tree exp, rtx target
case VEC_EXTRACT_ODD_EXPR:
{
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- NULL_RTX, &op0, &op1, 0);
+ NULL_RTX, &op0, &op1, EXPAND_NORMAL);
this_optab = optab_for_tree_code (code, type, optab_default);
temp = expand_binop (mode, this_optab, op0, op1, target, unsignedp,
OPTAB_WIDEN);
@@ -9378,7 +9378,7 @@ expand_expr_real_1 (tree exp, rtx target
case VEC_INTERLEAVE_LOW_EXPR:
{
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- NULL_RTX, &op0, &op1, 0);
+ NULL_RTX, &op0, &op1, EXPAND_NORMAL);
this_optab = optab_for_tree_code (code, type, optab_default);
temp = expand_binop (mode, this_optab, op0, op1, target, unsignedp,
OPTAB_WIDEN);
@@ -9426,7 +9426,7 @@ expand_expr_real_1 (tree exp, rtx target
tree oprnd0 = TREE_OPERAND (exp, 0);
tree oprnd1 = TREE_OPERAND (exp, 1);
- expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, 0);
+ expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL);
target = expand_widen_pattern_expr (exp, op0, op1, NULL_RTX,
target, unsignedp);
gcc_assert (target);
@@ -9467,7 +9467,7 @@ expand_expr_real_1 (tree exp, rtx target
/* Here to do an ordinary binary operator. */
binop:
expand_operands (TREE_OPERAND (exp, 0), TREE_OPERAND (exp, 1),
- subtarget, &op0, &op1, 0);
+ subtarget, &op0, &op1, EXPAND_NORMAL);
binop2:
this_optab = optab_for_tree_code (code, type, optab_default);
binop3:
@@ -9846,7 +9846,7 @@ do_store_flag (tree exp, rtx target, enu
|| GET_MODE (subtarget) != operand_mode)
subtarget = 0;
- expand_operands (arg0, arg1, subtarget, &op0, &op1, 0);
+ expand_operands (arg0, arg1, subtarget, &op0, &op1, EXPAND_NORMAL);
if (target == 0)
target = gen_reg_rtx (mode);
Index: opts.c
===================================================================
--- opts.c (revision 146298)
+++ opts.c (working copy)
@@ -2323,7 +2323,7 @@ enable_warning_as_error (const char *arg
}
else
{
- int kind = value ? DK_ERROR : DK_WARNING;
+ diagnostic_t kind = value ? DK_ERROR : DK_WARNING;
diagnostic_classify_diagnostic (global_dc, option_index, kind);
/* -Werror=foo implies -Wfoo. */
Index: predict.c
===================================================================
--- predict.c (revision 146298)
+++ predict.c (working copy)
@@ -1,5 +1,5 @@
/* Branch prediction routines for the GNU compiler.
- Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -654,7 +654,7 @@ combine_predictions_for_insn (rtx insn,
rtx *pnote;
rtx note;
int best_probability = PROB_EVEN;
- int best_predictor = END_PREDICTORS;
+ enum br_predictor best_predictor = END_PREDICTORS;
int combined_probability = REG_BR_PROB_BASE / 2;
int d;
bool first_match = false;
@@ -677,7 +677,7 @@ combine_predictions_for_insn (rtx insn,
for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
if (REG_NOTE_KIND (note) == REG_BR_PRED)
{
- int predictor = INTVAL (XEXP (XEXP (note, 0), 0));
+ enum br_predictor predictor = INTVAL (XEXP (XEXP (note, 0), 0));
int probability = INTVAL (XEXP (XEXP (note, 0), 1));
found = true;
@@ -723,6 +723,6 @@ combine_predictions_for_insn (rtx insn,
{
if (REG_NOTE_KIND (*pnote) == REG_BR_PRED)
{
- int predictor = INTVAL (XEXP (XEXP (*pnote, 0), 0));
+ enum br_predictor predictor = INTVAL (XEXP (XEXP (*pnote, 0), 0));
int probability = INTVAL (XEXP (XEXP (*pnote, 0), 1));
dump_prediction (dump_file, predictor, probability, bb,
!first_match || best_predictor == predictor);
*pnote = XEXP (*pnote, 1);
}
@@ -765,7 +766,7 @@ static void
combine_predictions_for_bb (basic_block bb)
{
int best_probability = PROB_EVEN;
- int best_predictor = END_PREDICTORS;
+ enum br_predictor best_predictor = END_PREDICTORS;
int combined_probability = REG_BR_PROB_BASE / 2;
int d;
bool first_match = false;
@@ -813,7 +814,7 @@ combine_predictions_for_bb (basic_block
by predictor with smallest index. */
for (pred = (struct edge_prediction *) *preds; pred; pred = pred->ep_next)
{
- int predictor = pred->ep_predictor;
+ enum br_predictor predictor = pred->ep_predictor;
int probability = pred->ep_probability;
if (pred->ep_edge != first)
@@ -888,7 +889,7 @@ combine_predictions_for_bb (basic_block
{
for (pred = (struct edge_prediction *) *preds; pred; pred = pred->ep_next)
{
- int predictor = pred->ep_predictor;
+ enum br_predictor predictor = pred->ep_predictor;
int probability = pred->ep_probability;
if (pred->ep_edge != EDGE_SUCC (bb, 0))
@@ -2185,7 +2186,7 @@ build_predict_expr (enum br_predictor pr
{
tree t = build1 (PREDICT_EXPR, void_type_node,
build_int_cst (NULL, predictor));
- PREDICT_EXPR_OUTCOME (t) = taken;
+ SET_PREDICT_EXPR_OUTCOME (t, taken);
return t;
}
Index: dbgcnt.c
===================================================================
--- dbgcnt.c (revision 146298)
+++ dbgcnt.c (working copy)
@@ -1,5 +1,5 @@
/* Debug counter for debugging support
- Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -88,7 +88,7 @@ dbg_cnt_set_limit_by_name (const char *n
if (i < 0)
return false;
- dbg_cnt_set_limit_by_index (i, value);
+ dbg_cnt_set_limit_by_index ((enum debug_counter) i, value);
return true;
}
Index: dse.c
===================================================================
--- dse.c (revision 146298)
+++ dse.c (working copy)
@@ -826,7 +826,7 @@ replace_inc_dec (rtx *r, void *d)
case POST_INC:
{
rtx r1 = XEXP (x, 0);
- rtx c = gen_int_mode (Pmode, data->size);
+ rtx c = gen_int_mode (data->size, Pmode);
emit_insn_before (gen_rtx_SET (Pmode, r1,
gen_rtx_PLUS (Pmode, r1, c)),
data->insn);
@@ -837,7 +837,7 @@ replace_inc_dec (rtx *r, void *d)
case POST_DEC:
{
rtx r1 = XEXP (x, 0);
- rtx c = gen_int_mode (Pmode, -data->size);
+ rtx c = gen_int_mode (-data->size, Pmode);
emit_insn_before (gen_rtx_SET (Pmode, r1,
gen_rtx_PLUS (Pmode, r1, c)),
data->insn);
Index: fortran/module.c
===================================================================
--- fortran/module.c (revision 146298)
+++ fortran/module.c (working copy)
@@ -4994,7 +4994,9 @@ import_iso_c_binding_module (void)
continue;
}
- generate_isocbinding_symbol (iso_c_module_name, i, u->local_name);
+ generate_isocbinding_symbol (iso_c_module_name,
+ (iso_c_binding_symbol) i,
+ u->local_name);
}
}
else
@@ -5011,7 +5013,9 @@ import_iso_c_binding_module (void)
break;
}
}
- generate_isocbinding_symbol (iso_c_module_name, i, local_name);
+ generate_isocbinding_symbol (iso_c_module_name,
+ (iso_c_binding_symbol) i,
+ local_name);
}
for (u = gfc_rename_list; u; u = u->next)
Index: fortran/trans-intrinsic.c
===================================================================
--- fortran/trans-intrinsic.c (revision 146298)
+++ fortran/trans-intrinsic.c (working copy)
@@ -1489,7 +1489,7 @@ gfc_conv_intrinsic_ttynam (gfc_se * se,
/* TODO: Mismatching types can occur when specific names are used.
These should be handled during resolution. */
static void
-gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree tmp;
tree mvar;
@@ -1725,7 +1725,7 @@ gfc_conv_intrinsic_funcall (gfc_se * se,
}
*/
static void
-gfc_conv_intrinsic_anyall (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_anyall (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree resvar;
stmtblock_t block;
@@ -1880,7 +1880,7 @@ gfc_conv_intrinsic_count (gfc_se * se, g
/* Inline implementation of the sum and product intrinsics. */
static void
-gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_arith (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree resvar;
tree type;
@@ -2107,7 +2107,7 @@ gfc_conv_intrinsic_dot_product (gfc_se *
static void
-gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
stmtblock_t body;
stmtblock_t block;
@@ -2312,7 +2312,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * s
}
static void
-gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree limit;
tree type;
@@ -2484,7 +2484,7 @@ gfc_conv_intrinsic_btest (gfc_se * se, g
/* Generate code to perform the specified operation. */
static void
-gfc_conv_intrinsic_bitop (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_bitop (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree args[2];
@@ -2509,7 +2509,7 @@ gfc_conv_intrinsic_singlebitop (gfc_se *
tree args[2];
tree type;
tree tmp;
- int op;
+ enum tree_code op;
gfc_conv_intrinsic_function_args (se, expr, args, 2);
type = TREE_TYPE (args[0]);
@@ -3584,7 +3584,7 @@ gfc_conv_intrinsic_sizeof (gfc_se *se, g
/* Intrinsic string comparison functions. */
static void
-gfc_conv_intrinsic_strcmp (gfc_se * se, gfc_expr * expr, int op)
+gfc_conv_intrinsic_strcmp (gfc_se * se, gfc_expr * expr, enum tree_code op)
{
tree args[4];
Index: regmove.c
===================================================================
--- regmove.c (revision 146298)
+++ regmove.c (working copy)
@@ -58,13 +58,12 @@ struct match {
};
static int find_matches (rtx, struct match *);
-static int regclass_compatible_p (int, int);
static int fixup_match_2 (rtx, rtx, rtx, rtx);
/* Return nonzero if registers with CLASS1 and CLASS2 can be merged without
causing too much register allocation problems. */
static int
-regclass_compatible_p (int class0, int class1)
+regclass_compatible_p (enum reg_class class0, enum reg_class class1)
{
return (class0 == class1
|| (reg_class_subset_p (class0, class1)
@@ -1353,4 +1352,3 @@ struct rtl_opt_pass pass_regmove =
TODO_ggc_collect /* todo_flags_finish */
}
};
-
Index: function.c
===================================================================
--- function.c (revision 146298)
+++ function.c (working copy)
@@ -3249,7 +3249,7 @@ assign_parms (tree fndecl)
= (all.stack_args_size.var == 0 ? GEN_INT (-all.stack_args_size.constant)
: expand_expr (size_diffop (all.stack_args_size.var,
size_int (-all.stack_args_size.constant)),
- NULL_RTX, VOIDmode, 0));
+ NULL_RTX, VOIDmode, EXPAND_NORMAL));
#else
crtl->args.arg_offset_rtx = ARGS_SIZE_RTX (all.stack_args_size);
#endif
Index: df.h
===================================================================
--- df.h (revision 146298)
+++ df.h (working copy)
@@ -879,8 +879,8 @@ extern struct df *df;
/* Functions defined in df-core.c. */
extern void df_add_problem (struct df_problem *);
-extern enum df_changeable_flags df_set_flags (enum df_changeable_flags);
-extern enum df_changeable_flags df_clear_flags (enum df_changeable_flags);
+extern enum df_changeable_flags df_set_flags (int);
+extern enum df_changeable_flags df_clear_flags (int);
extern void df_set_blocks (bitmap);
extern void df_remove_problem (struct dataflow *);
extern void df_finish_pass (bool);
@@ -945,7 +945,7 @@ extern void df_lr_verify_transfer_functi
extern void df_live_verify_transfer_functions (void);
extern void df_live_add_problem (void);
extern void df_live_set_all_dirty (void);
-extern void df_chain_add_problem (enum df_chain_flags);
+extern void df_chain_add_problem (unsigned int);
extern void df_byte_lr_add_problem (void);
extern int df_byte_lr_get_regno_start (unsigned int);
extern int df_byte_lr_get_regno_len (unsigned int);
@@ -972,7 +972,7 @@ extern void df_grow_reg_info (void);
extern void df_grow_insn_info (void);
extern void df_scan_blocks (void);
extern df_ref df_ref_create (rtx, rtx *, rtx,basic_block,
- enum df_ref_type, enum df_ref_flags,
+ enum df_ref_type, int ref_flags,
int, int, enum machine_mode);
extern void df_ref_remove (df_ref);
extern struct df_insn_info * df_insn_create_insn_record (rtx);
Index: calls.c
===================================================================
--- calls.c (revision 146298)
+++ calls.c (working copy)
@@ -4233,7 +4233,8 @@ store_one_arg (struct arg_data *arg, rtx
- int_size_in_bytes (TREE_TYPE (pval))
+ partial);
size_rtx = expand_expr (size_in_bytes (TREE_TYPE (pval)),
- NULL_RTX, TYPE_MODE (sizetype), 0);
+ NULL_RTX, TYPE_MODE (sizetype),
+ EXPAND_NORMAL);
}
parm_align = arg->locate.boundary;
Index: expmed.c
===================================================================
--- expmed.c (revision 146298)
+++ expmed.c (working copy)
@@ -208,7 +208,7 @@ init_expmed (void)
for (speed = 0; speed < 2; speed++)
{
crtl->maybe_hot_insn_p = speed;
- zero_cost[speed] = rtx_cost (const0_rtx, 0, speed);
+ zero_cost[speed] = rtx_cost (const0_rtx, SET, speed);
for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
mode != VOIDmode;
Index: c-omp.c
===================================================================
--- c-omp.c (revision 146298)
+++ c-omp.c (working copy)
@@ -142,7 +142,7 @@ c_finish_omp_atomic (enum tree_code code
/* There are lots of warnings, errors, and conversions that need to happen
in the course of interpreting a statement. Use the normal mechanisms
to do this, and then take it apart again. */
- x = build_modify_expr (input_location, lhs, code, rhs);
+ x = build_modify_expr (input_location, lhs, code, rhs, NULL_TREE);
if (x == error_mark_node)
return error_mark_node;
gcc_assert (TREE_CODE (x) == MODIFY_EXPR);
@@ -260,7 +260,7 @@ c_finish_omp_for (location_t locus, tree
fail = true;
}
- init = build_modify_expr (elocus, decl, NOP_EXPR, init);
+ init = build_modify_expr (elocus, decl, NOP_EXPR, init, NULL_TREE);
}
gcc_assert (TREE_CODE (init) == MODIFY_EXPR);
gcc_assert (TREE_OPERAND (init, 0) == decl);
Index: varasm.c
===================================================================
--- varasm.c (revision 146298)
+++ varasm.c (working copy)
@@ -2637,7 +2637,7 @@ assemble_integer (rtx x, unsigned int si
enum machine_mode omode, imode;
unsigned int subalign;
unsigned int subsize, i;
- unsigned char mclass;
+ enum mode_class mclass;
subsize = size > UNITS_PER_WORD? UNITS_PER_WORD : 1;
subalign = MIN (align, subsize * BITS_PER_UNIT);
Index: ira.c
===================================================================
--- ira.c (revision 146298)
+++ ira.c (working copy)
@@ -515,8 +515,10 @@ setup_class_subset_and_memory_move_costs
if (cl != (int) NO_REGS)
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
{
- ira_memory_move_cost[mode][cl][0] = MEMORY_MOVE_COST (mode, cl, 0);
- ira_memory_move_cost[mode][cl][1] = MEMORY_MOVE_COST (mode, cl, 1);
+ ira_memory_move_cost[mode][cl][0] =
+ MEMORY_MOVE_COST (mode, (enum reg_class) cl, 0);
+ ira_memory_move_cost[mode][cl][1] =
+ MEMORY_MOVE_COST (mode, (enum reg_class) cl, 1);
/* Costs for NO_REGS are used in cost calculation on the
1st pass when the preferred register classes are not
known yet. In this case we take the best scenario. */
@@ -981,8 +983,8 @@ setup_reg_class_relations (void)
if (cl3 == LIM_REG_CLASSES)
break;
if (reg_class_subset_p (ira_reg_class_intersect[cl1][cl2],
- cl3))
- ira_reg_class_intersect[cl1][cl2] = cl3;
+ (enum reg_class) cl3))
+ ira_reg_class_intersect[cl1][cl2] = (enum reg_class) cl3;
}
ira_reg_class_union[cl1][cl2] = reg_class_subunion[cl1][cl2];
continue;
@@ -1133,14 +1135,14 @@ int ira_max_nregs;
static void
setup_reg_class_nregs (void)
{
- int m;
- enum reg_class cl;
+ int cl, m;
ira_max_nregs = -1;
for (cl = 0; cl < N_REG_CLASSES; cl++)
for (m = 0; m < MAX_MACHINE_MODE; m++)
{
- ira_reg_class_nregs[cl][m] = CLASS_MAX_NREGS (cl, m);
+ ira_reg_class_nregs[cl][m] = CLASS_MAX_NREGS ((enum reg_class) cl,
+ (enum machine_mode) m);
if (ira_max_nregs < ira_reg_class_nregs[cl][m])
ira_max_nregs = ira_reg_class_nregs[cl][m];
}
@@ -1169,7 +1171,7 @@ setup_prohibited_class_mode_regs (void)
for (k = ira_class_hard_regs_num[cl] - 1; k >= 0; k--)
{
hard_regno = ira_class_hard_regs[cl][k];
- if (! HARD_REGNO_MODE_OK (hard_regno, j))
+ if (! HARD_REGNO_MODE_OK (hard_regno, (enum machine_mode) j))
SET_HARD_REG_BIT (prohibited_class_mode_regs[cl][j],
hard_regno);
}
@@ -1306,7 +1308,7 @@ setup_prohibited_mode_move_regs (void)
SET_HARD_REG_SET (ira_prohibited_mode_move_regs[i]);
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
{
- if (! HARD_REGNO_MODE_OK (j, i))
+ if (! HARD_REGNO_MODE_OK (j, (enum machine_mode) i))
continue;
SET_REGNO (test_reg1, j);
PUT_MODE (test_reg1, i);
Index: ira-costs.c
===================================================================
--- ira-costs.c (revision 146298)
+++ ira-costs.c (working copy)
@@ -1,5 +1,5 @@
/* IRA hard register and memory cost calculation for allocnos.
- Copyright (C) 2006, 2007, 2008
+ Copyright (C) 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Vladimir Makarov <vmakarov@redhat.com>.
@@ -205,7 +205,7 @@ record_reg_classes (int n_alts, int n_op
{
enum reg_class classes[MAX_RECOG_OPERANDS];
int allows_mem[MAX_RECOG_OPERANDS];
- int rclass;
+ enum reg_class rclass;
int alt_fail = 0;
int alt_cost = 0, op_cost_add;
@@ -672,7 +672,7 @@ record_reg_classes (int n_alts, int n_op
{
unsigned int regno = REGNO (ops[!i]);
enum machine_mode mode = GET_MODE (ops[!i]);
- int rclass;
+ enum reg_class rclass;
unsigned int nr;
if (regno < FIRST_PSEUDO_REGISTER)
@@ -886,7 +886,8 @@ record_address_regs (enum machine_mode m
case REG:
{
struct costs *pp;
- int i, k;
+ enum reg_class i;
+ int k;
if (REGNO (x) < FIRST_PSEUDO_REGISTER)
break;
Index: fixed-value.h
===================================================================
--- fixed-value.h (revision 146298)
+++ fixed-value.h (working copy)
@@ -1,5 +1,5 @@
/* Fixed-point arithmetic support.
- Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@@ -26,8 +26,8 @@ along with GCC; see the file COPYING3.
struct fixed_value GTY(())
{
- double_int data; /* Store data up to 2 wide integers. */
- unsigned int mode; /* Use machine mode to know IBIT and FBIT. */
+ double_int data; /* Store data up to 2 wide integers. */
+ enum machine_mode mode; /* Use machine mode to know IBIT and FBIT. */
};
#define FIXED_VALUE_TYPE struct fixed_value
Index: df-problems.c
===================================================================
--- df-problems.c (revision 146298)
+++ df-problems.c (working copy)
@@ -321,7 +321,7 @@ df_rd_alloc (bitmap all_blocks)
static void
df_rd_bb_local_compute_process_def (struct df_rd_bb_info *bb_info,
df_ref *def_rec,
- enum df_ref_flags top_flag)
+ int top_flag)
{
while (*def_rec)
{
@@ -2025,7 +2025,7 @@ df_chain_reset (bitmap blocks_to_clear A
static void
df_chain_create_bb_process_use (bitmap local_rd,
df_ref *use_rec,
- enum df_ref_flags top_flag)
+ int top_flag)
{
bitmap_iterator bi;
unsigned int def_index;
@@ -2325,10 +2325,10 @@ static struct df_problem problem_CHAIN =
solution. */
void
-df_chain_add_problem (enum df_chain_flags chain_flags)
+df_chain_add_problem (unsigned int chain_flags)
{
df_add_problem (&problem_CHAIN);
- df_chain->local_flags = (unsigned int)chain_flags;
+ df_chain->local_flags = chain_flags;
df_chain->out_of_date_transfer_functions = BITMAP_ALLOC (NULL);
}
@@ -3931,5 +3931,3 @@ df_simulate_finalize_forwards (basic_blo
bitmap_clear_bit (live, DF_REF_REGNO (def));
}
}
-
-
Index: reginfo.c
===================================================================
--- reginfo.c (revision 146298)
+++ reginfo.c (working copy)
@@ -277,7 +277,8 @@ init_move_cost (enum machine_mode m)
cost = 65535;
else
{
- cost = REGISTER_MOVE_COST (m, i, j);
+ cost = REGISTER_MOVE_COST (m, (enum reg_class) i,
+ (enum reg_class) j);
gcc_assert (cost < 65535);
}
all_match &= (last_move_cost[i][j] == cost);
@@ -327,12 +328,12 @@ init_move_cost (enum machine_mode m)
gcc_assert (cost <= 65535);
move_cost[m][i][j] = cost;
- if (reg_class_subset_p (i, j))
+ if (reg_class_subset_p ((enum reg_class) i, (enum reg_class) j))
may_move_in_cost[m][i][j] = 0;
else
may_move_in_cost[m][i][j] = cost;
- if (reg_class_subset_p (j, i))
+ if (reg_class_subset_p ((enum reg_class) j, (enum reg_class) i))
may_move_out_cost[m][i][j] = 0;
else
may_move_out_cost[m][i][j] = cost;
@@ -589,11 +590,13 @@ init_reg_sets_1 (void)
HARD_REG_SET ok_regs;
CLEAR_HARD_REG_SET (ok_regs);
for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
- if (!fixed_regs [j] && HARD_REGNO_MODE_OK (j, m))
+ if (!fixed_regs [j] && HARD_REGNO_MODE_OK (j, (enum machine_mode) m))
SET_HARD_REG_BIT (ok_regs, j);
-
+
for (i = 0; i < N_REG_CLASSES; i++)
- if ((unsigned) CLASS_MAX_NREGS (i, m) <= reg_class_size[i]
+ if (((unsigned) CLASS_MAX_NREGS ((enum reg_class) i,
+ (enum machine_mode) m)
+ <= reg_class_size[i])
&& hard_reg_set_intersect_p (ok_regs, reg_class_contents[i]))
{
contains_reg_of_mode [i][m] = 1;
@@ -676,9 +679,9 @@ void
init_fake_stack_mems (void)
{
int i;
-
+
for (i = 0; i < MAX_MACHINE_MODE; i++)
- top_of_stack[i] = gen_rtx_MEM (i, stack_pointer_rtx);
+ top_of_stack[i] = gen_rtx_MEM ((enum machine_mode) i, stack_pointer_rtx);
}
Index: gimple.c
===================================================================
--- gimple.c (revision 146298)
+++ gimple.c (working copy)
@@ -1,6 +1,6 @@
/* Gimple IR support functions.
- Copyright 2007, 2008 Free Software Foundation, Inc.
+ Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>
This file is part of GCC.
@@ -271,7 +271,7 @@ gimple_build_with_ops_stat (enum gimple_
gimple
gimple_build_return (tree retval)
{
- gimple s = gimple_build_with_ops (GIMPLE_RETURN, 0, 1);
+ gimple s = gimple_build_with_ops (GIMPLE_RETURN, ERROR_MARK, 1);
if (retval)
gimple_return_set_retval (s, retval);
return s;
@@ -284,7 +284,7 @@ gimple_build_return (tree retval)
static inline gimple
gimple_build_call_1 (tree fn, unsigned nargs)
{
- gimple s = gimple_build_with_ops (GIMPLE_CALL, 0, nargs + 3);
+ gimple s = gimple_build_with_ops (GIMPLE_CALL, ERROR_MARK, nargs + 3);
if (TREE_CODE (fn) == FUNCTION_DECL)
fn = build_fold_addr_expr (fn);
gimple_set_op (s, 1, fn);
@@ -544,7 +544,7 @@ gimple_cond_set_condition_from_tree (gim
gimple
gimple_build_label (tree label)
{
- gimple p = gimple_build_with_ops (GIMPLE_LABEL, 0, 1);
+ gimple p = gimple_build_with_ops (GIMPLE_LABEL, ERROR_MARK, 1);
gimple_label_set_label (p, label);
return p;
}
@@ -554,7 +554,7 @@ gimple_build_label (tree label)
gimple
gimple_build_goto (tree dest)
{
- gimple p = gimple_build_with_ops (GIMPLE_GOTO, 0, 1);
+ gimple p = gimple_build_with_ops (GIMPLE_GOTO, ERROR_MARK, 1);
gimple_goto_set_dest (p, dest);
return p;
}
@@ -600,7 +600,8 @@ gimple_build_asm_1 (const char *string,
gimple p;
int size = strlen (string);
- p = gimple_build_with_ops (GIMPLE_ASM, 0, ninputs + noutputs + nclobbers);
+ p = gimple_build_with_ops (GIMPLE_ASM, ERROR_MARK,
+ ninputs + noutputs + nclobbers);
p->gimple_asm.ni = ninputs;
p->gimple_asm.no = noutputs;
@@ -776,7 +777,8 @@ static inline gimple
gimple_build_switch_1 (unsigned nlabels, tree index, tree default_label)
{
/* nlabels + 1 default label + 1 index. */
- gimple p = gimple_build_with_ops (GIMPLE_SWITCH, 0, nlabels + 1 + 1);
+ gimple p = gimple_build_with_ops (GIMPLE_SWITCH, ERROR_MARK,
+ nlabels + 1 + 1);
gimple_switch_set_index (p, index);
gimple_switch_set_default_label (p, default_label);
return p;
@@ -1046,7 +1048,7 @@ gimple_build_omp_single (gimple_seq body
gimple
gimple_build_cdt (tree type, tree ptr)
{
- gimple p = gimple_build_with_ops (GIMPLE_CHANGE_DYNAMIC_TYPE, 0, 2);
+ gimple p = gimple_build_with_ops (GIMPLE_CHANGE_DYNAMIC_TYPE, ERROR_MARK, 2);
gimple_cdt_set_new_type (p, type);
gimple_cdt_set_location (p, ptr);
Index: gimple.h
===================================================================
--- gimple.h (revision 146298)
+++ gimple.h (working copy)
@@ -69,7 +69,7 @@ extern void gimple_check_failed (const_g
const_gimple __gs = (GS); \
if (gimple_code (__gs) != (CODE)) \
gimple_check_failed (__gs, __FILE__, __LINE__, __FUNCTION__, \
- (CODE), 0); \
+ (CODE), ERROR_MARK); \
} while (0)
#else /* not ENABLE_GIMPLE_CHECKING */
#define GIMPLE_CHECK(GS, CODE) (void)0
@@ -930,7 +930,7 @@ typedef bool (*gimple_predicate)(tree);
/* FIXME we should deduce this from the predicate. */
-typedef enum fallback_t {
+enum fallback {
fb_none = 0, /* Do not generate a temporary. */
fb_rvalue = 1, /* Generate an rvalue to hold the result of a
@@ -942,7 +942,9 @@ typedef enum fallback_t {
fb_mayfail = 4, /* Gimplification may fail. Error issued
afterwards. */
fb_either= fb_rvalue | fb_lvalue
-} fallback_t;
+};
+
+typedef int fallback_t;
enum gimplify_status {
GS_ERROR = -2, /* Something Bad Seen. */
Index: config/s390/s390.c
===================================================================
--- config/s390/s390.c (revision 146298)
+++ config/s390/s390.c (working copy)
@@ -1,6 +1,6 @@
/* Subroutines used for code generation on IBM S/390 and zSeries
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008 Free Software Foundation, Inc.
+ 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Hartmut Penner (hpenner@de.ibm.com) and
Ulrich Weigand (uweigand@de.ibm.com) and
Andreas Krebbel (Andreas.Krebbel@de.ibm.com).
@@ -2320,9 +2320,9 @@ s390_rtx_costs (rtx x, int code, int out
*total = s390_cost->madbr;
else
*total = s390_cost->maebr;
- *total += rtx_cost (XEXP (XEXP (x, 0), 0), MULT, speed)
- + rtx_cost (XEXP (XEXP (x, 0), 1), MULT, speed)
- + rtx_cost (XEXP (x, 1), code, speed);
+ *total += (rtx_cost (XEXP (XEXP (x, 0), 0), MULT, speed)
+ + rtx_cost (XEXP (XEXP (x, 0), 1), MULT, speed)
+ + rtx_cost (XEXP (x, 1), (enum rtx_code) code, speed));
return true; /* Do not do an additional recursive descent. */
}
*total = COSTS_N_INSNS (1);
@@ -3909,11 +3909,13 @@ s390_expand_movmem (rtx dst, rtx src, rt
dst = change_address (dst, VOIDmode, dst_addr);
src = change_address (src, VOIDmode, src_addr);
- temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1, 0);
+ temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1,
+ OPTAB_DIRECT);
if (temp != count)
emit_move_insn (count, temp);
- temp = expand_binop (mode, lshr_optab, count, GEN_INT (8), blocks, 1, 0);
+ temp = expand_binop (mode, lshr_optab, count, GEN_INT (8), blocks, 1,
+ OPTAB_DIRECT);
if (temp != blocks)
emit_move_insn (blocks, temp);
@@ -3928,7 +3930,8 @@ s390_expand_movmem (rtx dst, rtx src, rt
s390_load_address (src_addr,
gen_rtx_PLUS (Pmode, src_addr, GEN_INT (256)));
- temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1, 0);
+ temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1,
+ OPTAB_DIRECT);
if (temp != blocks)
emit_move_insn (blocks, temp);
@@ -4011,7 +4014,8 @@ s390_expand_setmem (rtx dst, rtx len, rt
dst = change_address (dst, VOIDmode, dst_addr);
if (val == const0_rtx)
- temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1, 0);
+ temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1,
+ OPTAB_DIRECT);
else
{
dstp1 = adjust_address (dst, VOIDmode, 1);
@@ -4024,12 +4028,14 @@ s390_expand_setmem (rtx dst, rtx len, rt
emit_cmp_and_jump_insns (count, const1_rtx,
EQ, NULL_RTX, mode, 1, end_label);
- temp = expand_binop (mode, add_optab, count, GEN_INT (-2), count, 1, 0);
+ temp = expand_binop (mode, add_optab, count, GEN_INT (-2), count, 1,
+ OPTAB_DIRECT);
}
if (temp != count)
emit_move_insn (count, temp);
- temp = expand_binop (mode, lshr_optab, count, GEN_INT (8), blocks, 1, 0);
+ temp = expand_binop (mode, lshr_optab, count, GEN_INT (8), blocks, 1,
+ OPTAB_DIRECT);
if (temp != blocks)
emit_move_insn (blocks, temp);
@@ -4045,7 +4051,8 @@ s390_expand_setmem (rtx dst, rtx len, rt
s390_load_address (dst_addr,
gen_rtx_PLUS (Pmode, dst_addr, GEN_INT (256)));
- temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1, 0);
+ temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1,
+ OPTAB_DIRECT);
if (temp != blocks)
emit_move_insn (blocks, temp);
@@ -4117,11 +4124,13 @@ s390_expand_cmpmem (rtx target, rtx op0,
op0 = change_address (op0, VOIDmode, addr0);
op1 = change_address (op1, VOIDmode, addr1);
- temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1, 0);
+ temp = expand_binop (mode, add_optab, count, constm1_rtx, count, 1,
+ OPTAB_DIRECT);
if (temp != count)
emit_move_insn (count, temp);
- temp = expand_binop (mode, lshr_optab, count, GEN_INT (8), blocks, 1, 0);
+ temp = expand_binop (mode, lshr_optab, count, GEN_INT (8), blocks, 1,
+ OPTAB_DIRECT);
if (temp != blocks)
emit_move_insn (blocks, temp);
@@ -4142,7 +4151,8 @@ s390_expand_cmpmem (rtx target, rtx op0,
s390_load_address (addr1,
gen_rtx_PLUS (Pmode, addr1, GEN_INT (256)));
- temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1, 0);
+ temp = expand_binop (mode, add_optab, blocks, constm1_rtx, blocks, 1,
+ OPTAB_DIRECT);
if (temp != blocks)
emit_move_insn (blocks, temp);
@@ -7490,9 +7500,7 @@ save_gprs (rtx base, int offset, int fir
GEN_INT (last - 6 + 1));
note = PATTERN (note);
- REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- note, REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, note);
for (i = 0; i < XVECLEN (note, 0); i++)
if (GET_CODE (XVECEXP (note, 0, i)) == SET)
@@ -7704,6 +7712,7 @@ s390_emit_prologue (void)
if (cfun_frame_layout.frame_size > 0)
{
rtx frame_off = GEN_INT (-cfun_frame_layout.frame_size);
+ rtx real_frame_off;
if (s390_stack_size)
{
@@ -7781,12 +7790,11 @@ s390_emit_prologue (void)
}
RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode, stack_pointer_rtx,
- gen_rtx_PLUS (Pmode, stack_pointer_rtx,
- GEN_INT (-cfun_frame_layout.frame_size))),
- REG_NOTES (insn));
+ real_frame_off = GEN_INT (-cfun_frame_layout.frame_size);
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
+ gen_rtx_PLUS (Pmode, stack_pointer_rtx,
+ real_frame_off)));
/* Set backchain. */
@@ -7838,12 +7846,10 @@ s390_emit_prologue (void)
insn = save_fpr (temp_reg, offset, i);
offset += 8;
RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode,
- gen_rtx_MEM (DFmode, addr),
- gen_rtx_REG (DFmode, i)),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode,
+ gen_rtx_MEM (DFmode, addr),
+ gen_rtx_REG (DFmode, i)));
}
}
@@ -8725,7 +8731,7 @@ s390_expand_builtin (tree exp, rtx targe
insn_op = &insn_data[icode].operand[arity + nonvoid];
- op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, 0);
+ op[arity] = expand_expr (arg, NULL_RTX, insn_op->mode, EXPAND_NORMAL);
if (!(*insn_op->predicate) (op[arity], insn_op->mode))
op[arity] = copy_to_mode_reg (insn_op->mode, op[arity]);
Index: config/spu/spu.c
===================================================================
--- config/spu/spu.c (revision 146298)
+++ config/spu/spu.c (working copy)
@@ -786,7 +786,8 @@ spu_emit_branch_or_set (int is_set, enum
rtx target = operands[0];
enum machine_mode comp_mode;
enum machine_mode op_mode;
- enum spu_comp_code scode, eq_code, ior_code;
+ enum spu_comp_code scode, eq_code;
+ enum insn_code ior_code;
int index;
int eq_test = 0;
@@ -1886,8 +1887,7 @@ spu_expand_prologue (void)
}
RTX_FRAME_RELATED_P (insn) = 1;
real = gen_addsi3 (sp_reg, sp_reg, GEN_INT (-total_size));
- REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, real, REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, real);
if (total_size > 2000)
{
@@ -1904,9 +1904,7 @@ spu_expand_prologue (void)
insn = frame_emit_add_imm (fp_reg, sp_reg, fp_offset, scratch_reg_0);
RTX_FRAME_RELATED_P (insn) = 1;
real = gen_addsi3 (fp_reg, sp_reg, GEN_INT (fp_offset));
- REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- real, REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, real);
REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = STACK_BOUNDARY;
}
}
@@ -5892,7 +5890,7 @@ expand_builtin_args (struct spu_builtin_
tree arg = CALL_EXPR_ARG (exp, a);
if (arg == 0)
abort ();
- ops[i] = expand_expr (arg, NULL_RTX, VOIDmode, 0);
+ ops[i] = expand_expr (arg, NULL_RTX, VOIDmode, EXPAND_NORMAL);
}
/* The insn pattern may have additional operands (SCRATCH).
@@ -6291,4 +6289,3 @@ spu_section_type_flags (tree decl, const
return SECTION_BSS;
return default_section_type_flags (decl, name, reloc);
}
-
Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c (revision 146298)
+++ config/sparc/sparc.c (working copy)
@@ -1,6 +1,6 @@
/* Subroutines for insn-output.c for SPARC.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
@@ -4082,10 +4082,8 @@ sparc_expand_prologue (void)
rtx reg = gen_rtx_REG (Pmode, 1);
emit_move_insn (reg, GEN_INT (-actual_fsize));
insn = emit_insn (gen_stack_pointer_inc (reg));
- REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_stack_pointer_inc (GEN_INT (-actual_fsize)),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_stack_pointer_inc (GEN_INT (-actual_fsize)));
}
RTX_FRAME_RELATED_P (insn) = 1;
@@ -8255,13 +8253,14 @@ sparc_fold_builtin (tree fndecl, tree ar
{
tree arg0, arg1, arg2;
tree rtype = TREE_TYPE (TREE_TYPE (fndecl));
+ enum insn_code icode = (enum insn_code) DECL_FUNCTION_CODE (fndecl);
if (ignore
- && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrsi_vis
- && DECL_FUNCTION_CODE (fndecl) != CODE_FOR_alignaddrdi_vis)
+ && icode != CODE_FOR_alignaddrsi_vis
+ && icode != CODE_FOR_alignaddrdi_vis)
return fold_convert (rtype, integer_zero_node);
- switch (DECL_FUNCTION_CODE (fndecl))
+ switch (icode)
{
case CODE_FOR_fexpand_vis:
arg0 = TREE_VALUE (arglist);
@@ -8297,8 +8296,8 @@ sparc_fold_builtin (tree fndecl, tree ar
tree inner_type = TREE_TYPE (rtype);
tree elts0 = TREE_VECTOR_CST_ELTS (arg0);
tree elts1 = TREE_VECTOR_CST_ELTS (arg1);
- tree n_elts = sparc_handle_vis_mul8x16 (DECL_FUNCTION_CODE (fndecl),
- inner_type, elts0, elts1);
+ tree n_elts = sparc_handle_vis_mul8x16 (icode, inner_type, elts0,
+ elts1);
return build_vector (rtype, n_elts);
}
Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md (revision 146298)
+++ config/i386/i386.md (working copy)
@@ -4375,7 +4375,9 @@
;
else
{
- int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+ enum ix86_stack_slot slot = (virtuals_instantiated
+ ? SLOT_TEMP
+ : SLOT_VIRTUAL);
rtx temp = assign_386_stack_local (SFmode, slot);
emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp));
DONE;
@@ -4560,7 +4562,9 @@
}
else
{
- int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+ enum ix86_stack_slot slot = (virtuals_instantiated
+ ? SLOT_TEMP
+ : SLOT_VIRTUAL);
operands[2] = assign_386_stack_local (<MODE>mode, slot);
}
})
@@ -5730,7 +5734,9 @@
}
else
{
- int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+ enum ix86_stack_slot slot = (virtuals_instantiated
+ ? SLOT_TEMP
+ : SLOT_VIRTUAL);
operands[2] = assign_386_stack_local (DImode, slot);
}
})
@@ -18985,7 +18991,9 @@
emit_insn (gen_fxam<mode>2_i387_with_temp (scratch, operands[1]));
else
{
- int slot = virtuals_instantiated ? SLOT_TEMP : SLOT_VIRTUAL;
+ enum ix86_stack_slot slot = (virtuals_instantiated
+ ? SLOT_TEMP
+ : SLOT_VIRTUAL);
rtx temp = assign_386_stack_local (<MODE>mode, slot);
emit_move_insn (temp, operands[1]);
Index: config/i386/i386-c.c
===================================================================
--- config/i386/i386-c.c (revision 146298)
+++ config/i386/i386-c.c (working copy)
@@ -1,5 +1,5 @@
/* Subroutines used for macro/preprocessor support on the ia-32.
- Copyright (C) 2008
+ Copyright (C) 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -297,14 +297,14 @@ ix86_pragma_target_parse (tree args, tre
ix86_target_macros_internal (prev_isa & diff_isa,
prev_arch,
prev_tune,
- prev_opt->fpmath,
+ (enum fpmath_unit) prev_opt->fpmath,
cpp_undef);
/* Define all of the macros for new options that were just turned on. */
ix86_target_macros_internal (cur_isa & diff_isa,
cur_arch,
cur_tune,
- cur_opt->fpmath,
+ (enum fpmath_unit) cur_opt->fpmath,
cpp_define);
return true;
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 146298)
+++ config/i386/i386.c (working copy)
@@ -8333,8 +8333,7 @@ ix86_expand_prologue (void)
RTX_FRAME_RELATED_P (insn) = 1;
t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (-allocate));
t = gen_rtx_SET (VOIDmode, stack_pointer_rtx, t);
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- t, REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, t);
if (eax_live)
{
@@ -14576,20 +14575,14 @@ ix86_split_fp_branch (enum rtx_code code
label),
pc_rtx)));
if (bypass_probability >= 0)
- REG_NOTES (i)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (bypass_probability),
- REG_NOTES (i));
+ add_reg_note (i, REG_BR_PROB, GEN_INT (bypass_probability));
}
i = emit_jump_insn (gen_rtx_SET
(VOIDmode, pc_rtx,
gen_rtx_IF_THEN_ELSE (VOIDmode,
condition, target1, target2)));
if (probability >= 0)
- REG_NOTES (i)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (probability),
- REG_NOTES (i));
+ add_reg_note (i, REG_BR_PROB, GEN_INT (probability));
if (second != NULL_RTX)
{
i = emit_jump_insn (gen_rtx_SET
@@ -14597,10 +14590,7 @@ ix86_split_fp_branch (enum rtx_code code
gen_rtx_IF_THEN_ELSE (VOIDmode, second, target1,
target2)));
if (second_probability >= 0)
- REG_NOTES (i)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (second_probability),
- REG_NOTES (i));
+ add_reg_note (i, REG_BR_PROB, GEN_INT (second_probability));
}
if (label != NULL_RTX)
emit_label (label);
@@ -16798,10 +16788,7 @@ predict_jump (int prob)
{
rtx insn = get_last_insn ();
gcc_assert (JUMP_P (insn));
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (prob),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_BR_PROB, GEN_INT (prob));
}
/* Helper function for the string operations below. Dest VARIABLE whether
@@ -23604,7 +23591,7 @@ ix86_expand_binop_builtin (enum insn_cod
static rtx
ix86_expand_multi_arg_builtin (enum insn_code icode, tree exp, rtx target,
enum multi_arg_type m_type,
- enum insn_code sub_code)
+ enum rtx_code sub_code)
{
rtx pat;
int i;
@@ -25091,7 +25078,8 @@ ix86_builtin_vectorized_function (unsign
/* Dispatch to a handler for a vectorization library. */
if (ix86_veclib_handler)
- return (*ix86_veclib_handler)(fn, type_out, type_in);
+ return (*ix86_veclib_handler) ((enum built_in_function) fn, type_out,
+ type_in);
return NULL_TREE;
}
Index: config/ia64/ia64.c
===================================================================
--- config/ia64/ia64.c (revision 146298)
+++ config/ia64/ia64.c (working copy)
@@ -1311,9 +1311,7 @@ ia64_split_tmode_move (rtx operands[])
&& (GET_CODE (XEXP (EXP, 0)) == POST_MODIFY \
|| GET_CODE (XEXP (EXP, 0)) == POST_INC \
|| GET_CODE (XEXP (EXP, 0)) == POST_DEC)) \
- REG_NOTES (INSN) = gen_rtx_EXPR_LIST (REG_INC, \
- XEXP (XEXP (EXP, 0), 0), \
- REG_NOTES (INSN))
+ add_reg_note (insn, REG_INC, XEXP (XEXP (EXP, 0), 0))
insn = emit_insn (gen_rtx_SET (VOIDmode, out[0], in[0]));
MAYBE_ADD_REG_INC_NOTE (insn, in[0]);
@@ -2770,9 +2768,8 @@ spill_restore_mem (rtx reg, HOST_WIDE_IN
gen_rtx_PLUS (DImode,
spill_fill_data.iter_reg[iter],
disp_rtx));
- REG_NOTES (spill_fill_data.prev_insn[iter])
- = gen_rtx_EXPR_LIST (REG_INC, spill_fill_data.iter_reg[iter],
- REG_NOTES (spill_fill_data.prev_insn[iter]));
+ add_reg_note (spill_fill_data.prev_insn[iter],
+ REG_INC, spill_fill_data.iter_reg[iter]);
}
else
{
@@ -2889,13 +2886,11 @@ do_spill (rtx (*move_fn) (rtx, rtx, rtx)
off = current_frame_info.total_size - cfa_off;
}
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode,
- gen_rtx_MEM (GET_MODE (reg),
- plus_constant (base, off)),
- frame_reg),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode,
+ gen_rtx_MEM (GET_MODE (reg),
+ plus_constant (base, off)),
+ frame_reg));
}
}
@@ -3095,16 +3090,12 @@ ia64_expand_prologue (void)
{
RTX_FRAME_RELATED_P (insn) = 1;
if (GET_CODE (offset) != CONST_INT)
- {
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
- gen_rtx_PLUS (DImode,
- stack_pointer_rtx,
- frame_size_rtx)),
- REG_NOTES (insn));
- }
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode,
+ stack_pointer_rtx,
+ gen_rtx_PLUS (DImode,
+ stack_pointer_rtx,
+ frame_size_rtx)));
}
/* ??? At this point we must generate a magic insn that appears to
@@ -3171,10 +3162,8 @@ ia64_expand_prologue (void)
/* ??? Denote pr spill/fill by a DImode move that modifies all
64 hard registers. */
RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode, alt_reg, reg),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, alt_reg, reg));
/* Even if we're not going to generate an epilogue, we still
need to save the register so that EH works. */
@@ -3533,16 +3522,12 @@ ia64_expand_epilogue (int sibcall_p)
RTX_FRAME_RELATED_P (insn) = 1;
if (GET_CODE (offset) != CONST_INT)
- {
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode,
- stack_pointer_rtx,
- gen_rtx_PLUS (DImode,
- stack_pointer_rtx,
- frame_size_rtx)),
- REG_NOTES (insn));
- }
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode,
+ stack_pointer_rtx,
+ gen_rtx_PLUS (DImode,
+ stack_pointer_rtx,
+ frame_size_rtx)));
}
if (cfun->machine->ia64_eh_epilogue_bsp)
@@ -7931,7 +7916,7 @@ insert_bundle_state (struct bundle_state
{
void **entry_ptr;
- entry_ptr = htab_find_slot (bundle_state_table, bundle_state, 1);
+ entry_ptr = htab_find_slot (bundle_state_table, bundle_state, INSERT);
if (*entry_ptr == NULL)
{
bundle_state->next = index_to_bundle_states [bundle_state->insn_num];
@@ -8295,9 +8280,7 @@ ia64_add_bundle_selector_before (int tem
if (find_reg_note (insn, REG_EH_REGION, NULL_RTX))
note = NULL_RTX;
else
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_EH_REGION, XEXP (note, 0),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_EH_REGION, XEXP (note, 0));
}
}
}
Index: config/ia64/ia64.md
===================================================================
--- config/ia64/ia64.md (revision 146298)
+++ config/ia64/ia64.md (working copy)
@@ -1,6 +1,6 @@
;; IA-64 Machine description template
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009 Free Software Foundation, Inc.
;; Contributed by James E. Wilson <wilson@cygnus.com> and
;; David Mosberger <davidm@hpl.hp.com>.
@@ -116,7 +116,8 @@
;; Processor type. This attribute must exactly match the processor_type
;; enumeration in ia64.h.
-(define_attr "cpu" "itanium,itanium2" (const (symbol_ref "ia64_tune")))
+(define_attr "cpu" "itanium,itanium2"
+ (const (symbol_ref "((enum attr_cpu) ia64_tune)")))
;; Instruction type. This primarily determines how instructions can be
;; packed in bundles, and secondarily affects scheduling to function units.
@@ -6076,7 +6077,7 @@
{
emit_library_call (gen_rtx_SYMBOL_REF (Pmode,
\"__ia64_save_stack_nonlocal\"),
- 0, VOIDmode, 2, XEXP (operands[0], 0), Pmode,
+ LCT_NORMAL, VOIDmode, 2, XEXP (operands[0], 0), Pmode,
operands[1], Pmode);
DONE;
})
@@ -6154,7 +6155,7 @@
{
emit_library_call (gen_rtx_SYMBOL_REF (Pmode,
"__ia64_restore_stack_nonlocal"),
- 0, VOIDmode, 1,
+ LCT_NORMAL, VOIDmode, 1,
copy_to_reg (XEXP (operands[1], 0)), Pmode);
DONE;
})
Index: config/rs6000/rs6000.c
===================================================================
--- config/rs6000/rs6000.c (revision 146298)
+++ config/rs6000/rs6000.c (working copy)
@@ -1346,7 +1346,7 @@ rs6000_init_hard_regno_mode_ok (void)
for (r = 0; r < FIRST_PSEUDO_REGISTER; ++r)
for (m = 0; m < NUM_MACHINE_MODES; ++m)
- if (rs6000_hard_regno_mode_ok (r, m))
+ if (rs6000_hard_regno_mode_ok (r, (enum machine_mode) m))
rs6000_hard_regno_mode_ok_p[m][r] = true;
}
@@ -8560,8 +8560,8 @@ altivec_expand_vec_set_builtin (tree exp
mode1 = TYPE_MODE (TREE_TYPE (TREE_TYPE (arg0)));
gcc_assert (VECTOR_MODE_P (tmode));
- op0 = expand_expr (arg0, NULL_RTX, tmode, 0);
- op1 = expand_expr (arg1, NULL_RTX, mode1, 0);
+ op0 = expand_expr (arg0, NULL_RTX, tmode, EXPAND_NORMAL);
+ op1 = expand_expr (arg1, NULL_RTX, mode1, EXPAND_NORMAL);
elt = get_element_number (TREE_TYPE (arg0), arg2);
if (GET_MODE (op1) != mode1 && GET_MODE (op1) != VOIDmode)
@@ -14035,7 +14035,7 @@ emit_unlikely_jump (rtx cond, rtx label)
x = gen_rtx_IF_THEN_ELSE (VOIDmode, cond, label, pc_rtx);
x = emit_jump_insn (gen_rtx_SET (VOIDmode, pc_rtx, x));
- REG_NOTES (x) = gen_rtx_EXPR_LIST (REG_BR_PROB, very_unlikely, NULL_RTX);
+ add_reg_note (x, REG_BR_PROB, very_unlikely);
}
/* A subroutine of the atomic operation splitters. Emit a load-locked
@@ -15628,12 +15628,10 @@ rs6000_emit_allocate_stack (HOST_WIDE_IN
set_mem_alias_set (mem, get_frame_alias_set ());
RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn) =
- gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode, stack_reg,
- gen_rtx_PLUS (Pmode, stack_reg,
- GEN_INT (-size))),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, stack_reg,
+ gen_rtx_PLUS (Pmode, stack_reg,
+ GEN_INT (-size))));
}
/* Add to 'insn' a note which is PATTERN (INSN) but with REG replaced
@@ -15714,9 +15712,7 @@ rs6000_frame_related (rtx insn, rtx reg,
}
RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- real,
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, real);
}
/* Returns an insn that has a vrsave set operation with the
@@ -16341,9 +16337,7 @@ rs6000_emit_prologue (void)
We use CR2_REGNO (70) to be compatible with gcc-2.95 on Linux. */
set = gen_rtx_SET (VOIDmode, cr_save_rtx,
gen_rtx_REG (SImode, CR2_REGNO));
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- set,
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, set);
}
/* Do any required saving of fpr's. If only one or two to save, do
@@ -16599,10 +16593,7 @@ rs6000_emit_prologue (void)
insn = emit_insn (gen_movesi_from_cr (cr_save_rtx));
RTX_FRAME_RELATED_P (insn) = 1;
set = gen_rtx_SET (VOIDmode, cr_save_rtx, magic_eh_cr_reg);
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- set,
- REG_NOTES (insn));
-
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, set);
}
insn = emit_move_insn (mem, cr_save_rtx);
@@ -18132,7 +18123,7 @@ output_toc (FILE *file, rtx x, int label
h->key_mode = mode;
h->labelno = labelno;
- found = htab_find_slot (toc_hash_table, h, 1);
+ found = htab_find_slot (toc_hash_table, h, INSERT);
if (*found == NULL)
*found = h;
else /* This is indeed a duplicate.
@@ -18553,7 +18544,8 @@ output_profile_hook (int labelno ATTRIBU
# define NO_PROFILE_COUNTERS 0
#endif
if (NO_PROFILE_COUNTERS)
- emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 0);
+ emit_library_call (init_one_libfunc (RS6000_MCOUNT),
+ LCT_NORMAL, VOIDmode, 0);
else
{
char buf[30];
@@ -18564,8 +18556,8 @@ output_profile_hook (int labelno ATTRIBU
label_name = (*targetm.strip_name_encoding) (ggc_strdup (buf));
fun = gen_rtx_SYMBOL_REF (Pmode, label_name);
- emit_library_call (init_one_libfunc (RS6000_MCOUNT), 0, VOIDmode, 1,
- fun, Pmode);
+ emit_library_call (init_one_libfunc (RS6000_MCOUNT),
+ LCT_NORMAL, VOIDmode, 1, fun, Pmode);
}
}
else if (DEFAULT_ABI == ABI_DARWIN)
@@ -18584,7 +18576,7 @@ output_profile_hook (int labelno ATTRIBU
caller_addr_regno = 0;
#endif
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mcount_name),
- 0, VOIDmode, 1,
+ LCT_NORMAL, VOIDmode, 1,
gen_rtx_REG (Pmode, caller_addr_regno), Pmode);
}
}
@@ -20487,7 +20479,7 @@ rs6000_initialize_trampoline (rtx addr,
case ABI_DARWIN:
case ABI_V4:
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__trampoline_setup"),
- FALSE, VOIDmode, 4,
+ LCT_NORMAL, VOIDmode, 4,
addr, Pmode,
GEN_INT (rs6000_trampoline_size ()), SImode,
fnaddr, Pmode,
@@ -22730,7 +22722,7 @@ rs6000_init_dwarf_reg_sizes_extra (tree
{
int i;
enum machine_mode mode = TYPE_MODE (char_type_node);
- rtx addr = expand_expr (address, NULL_RTX, VOIDmode, 0);
+ rtx addr = expand_expr (address, NULL_RTX, VOIDmode, EXPAND_NORMAL);
rtx mem = gen_rtx_MEM (BLKmode, addr);
rtx value = gen_int_mode (4, mode);
Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c (revision 146298)
+++ config/arm/arm.c (working copy)
@@ -4784,7 +4784,7 @@ thumb_legitimize_reload_address (rtx *x_
x = copy_rtx (x);
push_reload (orig_x, NULL_RTX, x_p, NULL, MODE_BASE_REG_CLASS (mode),
- Pmode, VOIDmode, 0, 0, opnum, type);
+ Pmode, VOIDmode, 0, 0, opnum, (enum reload_type) type);
return x;
}
@@ -4801,7 +4801,7 @@ thumb_legitimize_reload_address (rtx *x_
x = copy_rtx (x);
push_reload (orig_x, NULL_RTX, x_p, NULL, MODE_BASE_REG_CLASS (mode),
- Pmode, VOIDmode, 0, 0, opnum, type);
+ Pmode, VOIDmode, 0, 0, opnum, (enum reload_type) type);
return x;
}
@@ -5465,7 +5465,7 @@ arm_rtx_costs_1 (rtx x, enum rtx_code ou
return true;
case ABS:
- if (GET_MODE_CLASS (mode == MODE_FLOAT))
+ if (GET_MODE_CLASS (mode) == MODE_FLOAT)
{
if (TARGET_HARD_FLOAT && (mode == SFmode || mode == DFmode))
{
@@ -5821,10 +5821,12 @@ arm_rtx_costs (rtx x, int code, int oute
bool speed)
{
if (!speed)
- return arm_size_rtx_costs (x, code, outer_code, total);
+ return arm_size_rtx_costs (x, (enum rtx_code) code,
+ (enum rtx_code) outer_code, total);
else
- return all_cores[(int)arm_tune].rtx_costs (x, code, outer_code, total,
- speed);
+ return all_cores[(int)arm_tune].rtx_costs (x, (enum rtx_code) code,
+ (enum rtx_code) outer_code,
+ total, speed);
}
/* RTX costs for cores with a slow MUL implementation. Thumb-2 is not
@@ -7408,7 +7410,7 @@ adjacent_mem_locations (rtx a, rtx b)
/* Don't accept any offset that will require multiple
instructions to handle, since this would cause the
arith_adjacentmem pattern to output an overlong sequence. */
- if (!const_ok_for_op (PLUS, val0) || !const_ok_for_op (PLUS, val1))
+ if (!const_ok_for_op (val0, PLUS) || !const_ok_for_op (val1, PLUS))
return 0;
/* Don't allow an eliminable register: register elimination can make
@@ -10214,8 +10216,7 @@ vfp_emit_fstmd (int base_reg, int count)
}
par = emit_insn (par);
- REG_NOTES (par) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, dwarf,
- REG_NOTES (par));
+ add_reg_note (par, REG_FRAME_RELATED_EXPR, dwarf);
RTX_FRAME_RELATED_P (par) = 1;
return count * 8;
@@ -12498,8 +12499,8 @@ emit_multi_reg_push (unsigned long mask)
RTX_FRAME_RELATED_P (tmp) = 1;
XVECEXP (dwarf, 0, 0) = tmp;
- REG_NOTES (par) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, dwarf,
- REG_NOTES (par));
+ add_reg_note (par, REG_FRAME_RELATED_EXPR, dwarf);
+
return par;
}
@@ -12565,8 +12566,8 @@ emit_sfm (int base_reg, int count)
XVECEXP (dwarf, 0, 0) = tmp;
par = emit_insn (par);
- REG_NOTES (par) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, dwarf,
- REG_NOTES (par));
+ add_reg_note (par, REG_FRAME_RELATED_EXPR, dwarf);
+
return par;
}
@@ -12985,8 +12986,7 @@ thumb_set_frame_pointer (arm_stack_offse
dwarf = gen_rtx_SET (VOIDmode, hard_frame_pointer_rtx,
plus_constant (stack_pointer_rtx, amount));
RTX_FRAME_RELATED_P (dwarf) = 1;
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, dwarf,
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, dwarf);
}
RTX_FRAME_RELATED_P (insn) = 1;
@@ -13049,8 +13049,7 @@ arm_expand_prologue (void)
dwarf = gen_rtx_SET (VOIDmode, r0, dwarf);
insn = gen_movsi (r0, stack_pointer_rtx);
RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- dwarf, REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, dwarf);
emit_insn (insn);
emit_insn (gen_andsi3 (r1, r0, GEN_INT (~(HOST_WIDE_INT)7)));
emit_insn (gen_movsi (stack_pointer_rtx, r1));
@@ -13117,8 +13116,7 @@ arm_expand_prologue (void)
plus_constant (stack_pointer_rtx,
-fp_offset));
RTX_FRAME_RELATED_P (insn) = 1;
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- dwarf, REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, dwarf);
}
else
{
@@ -14670,7 +14668,8 @@ arm_hard_regno_mode_ok (unsigned int reg
/* For efficiency and historical reasons LO_REGS, HI_REGS and CC_REGS are
not used in arm mode. */
-int
+
+enum reg_class
arm_regno_class (int regno)
{
if (TARGET_THUMB1)
@@ -17631,9 +17630,7 @@ thumb1_expand_prologue (void)
plus_constant (stack_pointer_rtx,
-amount));
RTX_FRAME_RELATED_P (dwarf) = 1;
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, dwarf,
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR, dwarf);
}
}
Index: config/arm/arm.h
===================================================================
--- config/arm/arm.h (revision 146298)
+++ config/arm/arm.h (working copy)
@@ -1915,7 +1915,7 @@ typedef struct
TARGET_32BIT ? 12 : 16)), \
FNADDR); \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
- 0, VOIDmode, 2, TRAMP, Pmode, \
+ LCT_NORMAL, VOIDmode, 2, TRAMP, Pmode, \
plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \
}
#endif
Index: config/arm/arm-tune.md
===================================================================
--- config/arm/arm-tune.md (revision 146298)
+++ config/arm/arm-tune.md (working copy)
@@ -2,4 +2,4 @@
;; Generated automatically by gentune.sh from arm-cores.def
(define_attr "tune"
"arm2,arm250,arm3,arm6,arm60,arm600,arm610,arm620,arm7,arm7d,arm7di,arm70,arm700,arm700i,arm710,arm720,arm710c,arm7100,arm7500,arm7500fe,arm7m,arm7dm,arm7dmi,arm8,arm810,strongarm,strongarm110,strongarm1100,strongarm1110,arm7tdmi,arm7tdmis,arm710t,arm720t,arm740t,arm9,arm9tdmi,arm920,arm920t,arm922t,arm940t,ep9312,arm10tdmi,arm1020t,arm9e,arm946es,arm966es,arm968es,arm10e,arm1020e,arm1022e,xscale,iwmmxt,iwmmxt2,arm926ejs,arm1026ejs,arm1136js,arm1136jfs,arm1176jzs,arm1176jzfs,mpcorenovfp,mpcore,arm1156t2s,cortexa8,cortexa9,cortexr4,cortexr4f,cortexm3,cortexm1"
- (const (symbol_ref "arm_tune")))
+ (const (symbol_ref "((enum attr_tune) arm_tune)")))
Index: config/arm/arm-protos.h
===================================================================
--- config/arm/arm-protos.h (revision 146298)
+++ config/arm/arm-protos.h (working copy)
@@ -1,6 +1,6 @@
/* Prototypes for exported functions defined in arm.c and pe.c
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rearnsha@arm.com)
Minor hacks by Nick Clifton (nickc@cygnus.com)
@@ -26,7 +26,7 @@
extern void arm_override_options (void);
extern void arm_optimization_options (int, int);
extern int use_return_insn (int, rtx);
-extern int arm_regno_class (int);
+extern enum reg_class arm_regno_class (int);
extern void arm_load_pic_register (unsigned long);
extern int arm_volatile_func (void);
extern const char *arm_output_epilogue (rtx);
Index: config/arm/gentune.sh
===================================================================
--- config/arm/gentune.sh (revision 146298)
+++ config/arm/gentune.sh (working copy)
@@ -9,4 +9,4 @@ allcores=`awk -F'[(, ]+' '/^ARM_CORE/ {
echo "(define_attr \"tune\""
echo " \"$allcores\"" | sed -e 's/,"$/"/'
-echo " (const (symbol_ref \"arm_tune\")))"
+echo " (const (symbol_ref \"((enum attr_tune) arm_tune)\")))"
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c (revision 146298)
+++ config/pa/pa.c (working copy)
@@ -684,7 +684,7 @@ legitimize_pic_address (rtx orig, enum m
insn = emit_insn (gen_rtx_SET (VOIDmode, reg, orig));
/* Put a REG_EQUAL note on this insn, so that it can be optimized. */
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig, REG_NOTES (insn));
+ add_reg_note (insn, REG_EQUAL, orig);
/* During and after reload, we need to generate a REG_LABEL_OPERAND note
and update LABEL_NUSES because this is not done automatically. */
@@ -3395,11 +3395,9 @@ store_reg (int reg, HOST_WIDE_INT disp,
insn = emit_move_insn (tmpreg, gen_rtx_PLUS (Pmode, tmpreg, basereg));
if (DO_FRAME_NOTES)
{
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode, tmpreg,
- gen_rtx_PLUS (Pmode, basereg, delta)),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, tmpreg,
+ gen_rtx_PLUS (Pmode, basereg, delta)));
RTX_FRAME_RELATED_P (insn) = 1;
}
dest = gen_rtx_MEM (word_mode, tmpreg);
@@ -3415,16 +3413,13 @@ store_reg (int reg, HOST_WIDE_INT disp,
dest = gen_rtx_MEM (word_mode, gen_rtx_LO_SUM (Pmode, tmpreg, delta));
insn = emit_move_insn (dest, src);
if (DO_FRAME_NOTES)
- {
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode,
- gen_rtx_MEM (word_mode,
- gen_rtx_PLUS (word_mode, basereg,
- delta)),
- src),
- REG_NOTES (insn));
- }
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode,
+ gen_rtx_MEM (word_mode,
+ gen_rtx_PLUS (word_mode,
+ basereg,
+ delta)),
+ src));
}
if (DO_FRAME_NOTES)
@@ -3484,11 +3479,9 @@ set_reg_plus_d (int reg, int base, HOST_
insn = emit_move_insn (gen_rtx_REG (Pmode, reg),
gen_rtx_PLUS (Pmode, tmpreg, basereg));
if (DO_FRAME_NOTES)
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode, tmpreg,
- gen_rtx_PLUS (Pmode, basereg, delta)),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, tmpreg,
+ gen_rtx_PLUS (Pmode, basereg, delta)));
}
else
{
@@ -3912,10 +3905,8 @@ hppa_expand_prologue (void)
{
rtx mem = gen_rtx_MEM (DFmode,
plus_constant (base, offset));
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SET (VOIDmode, mem, reg),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SET (VOIDmode, mem, reg));
}
else
{
@@ -3932,10 +3923,8 @@ hppa_expand_prologue (void)
RTX_FRAME_RELATED_P (setl) = 1;
RTX_FRAME_RELATED_P (setr) = 1;
vec = gen_rtvec (2, setl, setr);
- REG_NOTES (insn)
- = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
- gen_rtx_SEQUENCE (VOIDmode, vec),
- REG_NOTES (insn));
+ add_reg_note (insn, REG_FRAME_RELATED_EXPR,
+ gen_rtx_SEQUENCE (VOIDmode, vec));
}
}
offset += GET_MODE_SIZE (DFmode);
@@ -4353,8 +4342,7 @@ hppa_profile_hook (int label_no)
/* Indicate the _mcount call cannot throw, nor will it execute a
non-local goto. */
- REG_NOTES (call_insn)
- = gen_rtx_EXPR_LIST (REG_EH_REGION, constm1_rtx, REG_NOTES (call_insn));
+ add_reg_note (call_insn, REG_EH_REGION, constm1_rtx);
}
/* Fetch the return address for the frame COUNT steps up from
Index: config/mips/mips.md
===================================================================
--- config/mips/mips.md (revision 146298)
+++ config/mips/mips.md (working copy)
@@ -571,7 +571,7 @@
;; with the processor_type enumeration in mips.h.
(define_attr "cpu"
"r3000,4kc,4kp,5kc,5kf,20kc,24kc,24kf2_1,24kf1_1,74kc,74kf2_1,74kf1_1,74kf3_2,loongson_2e,loongson_2f,m4k,octeon,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,r10000,sb1,sb1a,sr71000,xlr"
- (const (symbol_ref "mips_tune")))
+ (const (symbol_ref "((enum attr_cpu) mips_tune)")))
;; The type of hardware hazard associated with this instruction.
;; DELAY means that the next instruction cannot read the result
Index: config/mips/sdemtk.h
===================================================================
--- config/mips/sdemtk.h (revision 146298)
+++ config/mips/sdemtk.h (working copy)
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler.
MIPS SDE version, for use with the SDE C library rather than newlib.
- Copyright (C) 2007, 2008
+ Copyright (C) 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
@@ -86,7 +86,7 @@ extern void mips_sync_icache (void *beg,
#undef MIPS_ICACHE_SYNC
#define MIPS_ICACHE_SYNC(ADDR, SIZE) \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \
- 0, VOIDmode, 2, ADDR, Pmode, \
+ LCT_NORMAL, VOIDmode, 2, ADDR, Pmode, \
SIZE, TYPE_MODE (sizetype))
/* This version of _mcount does not pop 2 words from the stack. */
Index: config/mips/mips.c
===================================================================
--- config/mips/mips.c (revision 146298)
+++ config/mips/mips.c (working copy)
@@ -3312,7 +3312,7 @@ mips_binary_cost (rtx x, int single_cost
else
cost = single_cost;
return (cost
- + rtx_cost (XEXP (x, 0), 0, !optimize_size)
+ + rtx_cost (XEXP (x, 0), SET, !optimize_size)
+ rtx_cost (XEXP (x, 1), GET_CODE (x), !optimize_size));
}
@@ -3531,7 +3531,7 @@ mips_rtx_costs (rtx x, int code, int out
&& UINTVAL (XEXP (x, 1)) == 0xffffffff)
{
*total = (mips_zero_extend_cost (mode, XEXP (x, 0))
- + rtx_cost (XEXP (x, 0), 0, speed));
+ + rtx_cost (XEXP (x, 0), SET, speed));
return true;
}
/* Fall through. */
@@ -3563,7 +3563,7 @@ mips_rtx_costs (rtx x, int code, int out
case LO_SUM:
/* Low-part immediates need an extended MIPS16 instruction. */
*total = (COSTS_N_INSNS (TARGET_MIPS16 ? 2 : 1)
- + rtx_cost (XEXP (x, 0), 0, speed));
+ + rtx_cost (XEXP (x, 0), SET, speed));
return true;
case LT:
@@ -3603,17 +3603,17 @@ mips_rtx_costs (rtx x, int code, int out
if (GET_CODE (op0) == MULT && GET_CODE (XEXP (op0, 0)) == NEG)
{
*total = (mips_fp_mult_cost (mode)
- + rtx_cost (XEXP (XEXP (op0, 0), 0), 0, speed)
- + rtx_cost (XEXP (op0, 1), 0, speed)
- + rtx_cost (op1, 0, speed));
+ + rtx_cost (XEXP (XEXP (op0, 0), 0), SET, speed)
+ + rtx_cost (XEXP (op0, 1), SET, speed)
+ + rtx_cost (op1, SET, speed));
return true;
}
if (GET_CODE (op1) == MULT)
{
*total = (mips_fp_mult_cost (mode)
- + rtx_cost (op0, 0, speed)
- + rtx_cost (XEXP (op1, 0), 0, speed)
- + rtx_cost (XEXP (op1, 1), 0, speed));
+ + rtx_cost (op0, SET, speed)
+ + rtx_cost (XEXP (op1, 0), SET, speed)
+ + rtx_cost (XEXP (op1, 1), SET, speed));
return true;
}
}
@@ -3654,9 +3654,9 @@ mips_rtx_costs (rtx x, int code, int out
&& GET_CODE (XEXP (op, 0)) == MULT)
{
*total = (mips_fp_mult_cost (mode)
- + rtx_cost (XEXP (XEXP (op, 0), 0), 0, speed)
- + rtx_cost (XEXP (XEXP (op, 0), 1), 0, speed)
- + rtx_cost (XEXP (op, 1), 0, speed));
+ + rtx_cost (XEXP (XEXP (op, 0), 0), SET, speed)
+ + rtx_cost (XEXP (XEXP (op, 0), 1), SET, speed)
+ + rtx_cost (XEXP (op, 1), SET, speed));
return true;
}
}
@@ -3694,9 +3694,10 @@ mips_rtx_costs (rtx x, int code, int out
if (outer_code == SQRT || GET_CODE (XEXP (x, 1)) == SQRT)
/* An rsqrt<mode>a or rsqrt<mode>b pattern. Count the
division as being free. */
- *total = rtx_cost (XEXP (x, 1), 0, speed);
+ *total = rtx_cost (XEXP (x, 1), SET, speed);
else
- *total = mips_fp_div_cost (mode) + rtx_cost (XEXP (x, 1), 0, speed);
+ *total = (mips_fp_div_cost (mode)
+ + rtx_cost (XEXP (x, 1), SET, speed));
return true;
}
/* Fall through. */
@@ -3724,7 +3725,7 @@ mips_rtx_costs (rtx x, int code, int out
&& CONST_INT_P (XEXP (x, 1))
&& exact_log2 (INTVAL (XEXP (x, 1))) >= 0)
{
- *total = COSTS_N_INSNS (2) + rtx_cost (XEXP (x, 0), 0, speed);
+ *total = COSTS_N_INSNS (2) + rtx_cost (XEXP (x, 0), SET, speed);
return true;
}
*total = COSTS_N_INSNS (mips_idiv_insns ());
@@ -14465,8 +14466,8 @@ mips_override_options (void)
/* Set up mips_hard_regno_mode_ok. */
for (mode = 0; mode < MAX_MACHINE_MODE; mode++)
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
- mips_hard_regno_mode_ok[(int)mode][regno]
- = mips_hard_regno_mode_ok_p (regno, mode);
+ mips_hard_regno_mode_ok[mode][regno]
+ = mips_hard_regno_mode_ok_p (regno, (enum machine_mode) mode);
/* Function to allocate machine-dependent function status. */
init_machine_status = &mips_init_machine_status;
Index: config/mips/mips.h
===================================================================
--- config/mips/mips.h (revision 146298)
+++ config/mips/mips.h (working copy)
@@ -2441,7 +2441,7 @@ typedef struct mips_args {
/* Flush both caches. We need to flush the data cache in case \
the system has a write-back cache. */ \
emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \
- 0, VOIDmode, 3, ADDR, Pmode, SIZE, Pmode, \
+ LCT_NORMAL, VOIDmode, 3, ADDR, Pmode, SIZE, Pmode, \
GEN_INT (3), TYPE_MODE (integer_type_node))
/* A C statement to initialize the variable parts of a trampoline.
Index: reload1.c
===================================================================
--- reload1.c (revision 146298)
+++ reload1.c (working copy)
@@ -997,7 +997,8 @@ reload (rtx first, int global)
for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
if (reg_renumber[i] < 0 && reg_equiv_memory_loc[i])
{
- rtx x = eliminate_regs (reg_equiv_memory_loc[i], 0, NULL_RTX);
+ rtx x = eliminate_regs (reg_equiv_memory_loc[i], VOIDmode,
+ NULL_RTX);
if (strict_memory_address_p (GET_MODE (regno_reg_rtx[i]),
XEXP (x, 0)))
@@ -2809,7 +2810,7 @@ eliminate_regs_1 (rtx x, enum machine_mo
case USE:
/* Handle insn_list USE that a call to a pure function may generate. */
- new_rtx = eliminate_regs_1 (XEXP (x, 0), 0, insn, false);
+ new_rtx = eliminate_regs_1 (XEXP (x, 0), VOIDmode, insn, false);
if (new_rtx != XEXP (x, 0))
return gen_rtx_USE (GET_MODE (x), new_rtx);
return x;
@@ -3050,8 +3051,8 @@ elimination_effects (rtx x, enum machine
}
}
- elimination_effects (SET_DEST (x), 0);
- elimination_effects (SET_SRC (x), 0);
+ elimination_effects (SET_DEST (x), VOIDmode);
+ elimination_effects (SET_SRC (x), VOIDmode);
return;
case MEM:
@@ -3349,7 +3350,7 @@ eliminate_regs_in_insn (rtx insn, int re
}
/* Determine the effects of this insn on elimination offsets. */
- elimination_effects (old_body, 0);
+ elimination_effects (old_body, VOIDmode);
/* Eliminate all eliminable registers occurring in operands that
can be handled by reload. */
@@ -3390,7 +3391,7 @@ eliminate_regs_in_insn (rtx insn, int re
in_plus = true;
substed_operand[i]
- = eliminate_regs_1 (recog_data.operand[i], 0,
+ = eliminate_regs_1 (recog_data.operand[i], VOIDmode,
replace ? insn : NULL_RTX,
is_set_src || in_plus);
if (substed_operand[i] != orig_operand[i])
@@ -3520,7 +3521,7 @@ eliminate_regs_in_insn (rtx insn, int re
the pre-passes. */
if (val && REG_NOTES (insn) != 0)
REG_NOTES (insn)
- = eliminate_regs_1 (REG_NOTES (insn), 0, REG_NOTES (insn), true);
+ = eliminate_regs_1 (REG_NOTES (insn), VOIDmode, REG_NOTES (insn), true);
return val;
}
@@ -7087,7 +7088,8 @@ emit_input_reload_insns (struct insn_cha
else if (new_class == NO_REGS)
{
if (reload_adjust_reg_for_icode (&second_reload_reg,
- third_reload_reg, sri.icode))
+ third_reload_reg,
+ (enum insn_code) sri.icode))
icode = sri.icode, third_reload_reg = 0;
else
oldequiv = old, real_oldequiv = real_old;
@@ -7117,7 +7119,8 @@ emit_input_reload_insns (struct insn_cha
if (reload_adjust_reg_for_temp (&intermediate, NULL,
new_class, mode)
&& reload_adjust_reg_for_icode (&third_reload_reg, NULL,
- sri2.icode))
+ ((enum insn_code)
+ sri2.icode)))
{
second_reload_reg = intermediate;
tertiary_icode = sri2.icode;
@@ -8414,7 +8417,7 @@ delete_output_reload (rtx insn, int j, i
reg, 0);
if (substed)
n_occurrences += count_occurrences (PATTERN (insn),
- eliminate_regs (substed, 0,
+ eliminate_regs (substed, VOIDmode,
NULL_RTX), 0);
for (i1 = reg_equiv_alt_mem_list[REGNO (reg)]; i1; i1 = XEXP (i1, 1))
{