From 301b6a4efe8b404c6e797ec71a74c1209cd446f1 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Wed, 7 Jan 2009 19:26:39 +0100 Subject: [PATCH] i386.c (ix86_target_string): Use ARRAY_SIZE. * config/i386/i386.c (ix86_target_string): Use ARRAY_SIZE. (ix86_target_string): Ditto. (ix86_valid_target_attribute_inner_p): Ditto. From-SVN: r143164 --- gcc/ChangeLog | 32 ++++++++++++++++++-------------- gcc/config/i386/i386.c | 12 +++++------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b379b1ba709..03338fcfa52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-01-07 Uros Bizjak + + * config/i386/i386.c (ix86_target_string): Use ARRAY_SIZE. + (ix86_target_string): Ditto. + (ix86_valid_target_attribute_inner_p): Ditto. + 2009-01-07 Jan Sjodin PR tree-optimization/38492 @@ -94,7 +100,7 @@ 2009-01-06 Jan Hubicka PR target/38744 - * i386.c (ix86_expand_call): Use ARRAY_SIZE + * i386.c (ix86_expand_call): Use ARRAY_SIZE. 2009-01-06 Gerald Pfeifer @@ -116,8 +122,8 @@ (ix86_nsaved_sseregs): New. (ix86_compute_frame_layout): Update nsseregs; set preferred alignment to 16 for w64; compute padding and size of sse reg save area. - (ix86_emit_save_regs, ix86_emit_save_regs_using_mov): Save only general - purpose regs. + (ix86_emit_save_regs, ix86_emit_save_regs_using_mov): Save only + general purpose regs. (ix86_emit_save_sse_regs_using_mov): New. (ix86_expand_prologue): Save SSE regs if needed. (ix86_emit_restore_regs_using_mov): Use only general purpose regs. @@ -128,8 +134,8 @@ Kai Tietz * i386.h (ACCUMULATE_OUTGOING_ARGS): Enable for MSABI - * i386.c (init_cumulative_args): Disallow calls of MSABI functions when - accumulate outgoing args is off. + * i386.c (init_cumulative_args): Disallow calls of MSABI functions + when accumulate outgoing args is off. 2009-01-06 H.J. Lu @@ -182,8 +188,7 @@ (ira_build_conflicts): Use ira_conflicts_p. Check result of building conflict table. - * ira-color.c (fast_allocation): Use num instead of - ira_allocnos_num. + * ira-color.c (fast_allocation): Use num instead of ira_allocnos_num. (ira_color): Use ira_conflicts_p. * global.c: Include ira.h. @@ -208,8 +213,7 @@ * reload1.c (compute_use_by_pseudos, reload, count_pseudo, count_spilled_pseudo, find_reg, alter_reg, finish_spills, - emit_input_reload_insns, delete_output_reload): Use - ira_conflicts_p. + emit_input_reload_insns, delete_output_reload): Use ira_conflicts_p. 2009-01-06 Ben Elliston @@ -225,9 +229,9 @@ PR tree-optimization/38492 * graphite.c (rename_map_elt, debug_rename_elt, - debug_rename_map_1, debug_rename_map, new_rename_map_elt, - rename_map_elt_info, eq_rename_map_elts, - get_new_name_from_old_name, bb_in_sese_p): Moved around. + debug_rename_map_1, debug_rename_map, new_rename_map_elt, + rename_map_elt_info, eq_rename_map_elts, + get_new_name_from_old_name, bb_in_sese_p): Moved around. (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use. (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb. (sese_build_livein_liveouts): New. @@ -247,7 +251,7 @@ (gloog): Call scop_adjust_phis_for_liveouts. * graphite.h (struct sese): Documented. Added fields liveout, - num_ver and livein. + num_ver and livein. (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New. (new_sese, free_sese, sese_build_livein_liveouts): Declared. (struct scop): Added field liveout_renames. @@ -338,7 +342,7 @@ * config/mips/sync.md (memory_barrier): Redefine as expander pattern. Remove mem:BLK from insn operands. Use Pmode scratch register. Set volatile flag on operand 0. - (*memory_barrier): New insn pattern. + (*mb_internal): New insn pattern. * config/alpha/sync.md (*memory_barrier): Rename from *mb_internal. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index df2be1c8e55..6a31bbf4883 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2306,9 +2306,7 @@ ix86_target_string (int isa, int flags, const char *arch, const char *tune, { "-mtls-direct-seg-refs", MASK_TLS_DIRECT_SEG_REFS }, }; - const char *opts[ (sizeof (isa_opts) / sizeof (isa_opts[0]) - + sizeof (flag_opts) / sizeof (flag_opts[0]) - + 6)][2]; + const char *opts[ARRAY_SIZE (isa_opts) + ARRAY_SIZE (flag_opts) + 6][2]; char isa_other[40]; char target_other[40]; @@ -2337,7 +2335,7 @@ ix86_target_string (int isa, int flags, const char *arch, const char *tune, } /* Pick out the options in isa options. */ - for (i = 0; i < sizeof (isa_opts) / sizeof (isa_opts[0]); i++) + for (i = 0; i < ARRAY_SIZE (isa_opts); i++) { if ((isa & isa_opts[i].mask) != 0) { @@ -2353,7 +2351,7 @@ ix86_target_string (int isa, int flags, const char *arch, const char *tune, } /* Add flag options. */ - for (i = 0; i < sizeof (flag_opts) / sizeof (flag_opts[0]); i++) + for (i = 0; i < ARRAY_SIZE (flag_opts); i++) { if ((flags & flag_opts[i].mask) != 0) { @@ -2379,7 +2377,7 @@ ix86_target_string (int isa, int flags, const char *arch, const char *tune, if (num == 0) return NULL; - gcc_assert (num < sizeof (opts) / sizeof (opts[0])); + gcc_assert (num < ARRAY_SIZE (opts)); /* Size the string. */ len = 0; @@ -3526,7 +3524,7 @@ ix86_valid_target_attribute_inner_p (tree args, char *p_strings[]) /* Find the option. */ ch = *p; opt = N_OPTS; - for (i = 0; i < sizeof (attrs) / sizeof (attrs[0]); i++) + for (i = 0; i < ARRAY_SIZE (attrs); i++) { type = attrs[i].type; opt_len = attrs[i].len;