X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fconfig%2Fspu%2Fspu.c;h=bbe6eddde2a9ee8d35b162a6b629b7fe69f52b6b;hp=a9a5d40f26b0710c7e2df3324b0cd1ece029916e;hb=1e944a0b51698cfea09da04479be167faec7885e;hpb=170efcd43ff482304129b383edb8c111258b437e diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index a9a5d40f26b..bbe6eddde2a 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -36,7 +36,6 @@ #include "basic-block.h" #include "integrate.h" #include "diagnostic-core.h" -#include "toplev.h" #include "ggc.h" #include "hashtab.h" #include "tm_p.h" @@ -47,7 +46,6 @@ #include "cfglayout.h" #include "sched-int.h" #include "params.h" -#include "assert.h" #include "machmode.h" #include "gimple.h" #include "tm-constrs.h" @@ -231,6 +229,7 @@ static section *spu_select_section (tree, int, unsigned HOST_WIDE_INT); static void spu_unique_section (tree, int); static rtx spu_expand_load (rtx, rtx, rtx, int); static void spu_trampoline_init (rtx, tree, rtx); +static void spu_conditional_register_usage (void); /* Which instruction set architecture to use. */ int spu_arch; @@ -489,6 +488,9 @@ static const struct attribute_spec spu_attribute_table[] = #undef TARGET_EXCEPT_UNWIND_INFO #define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info +#undef TARGET_CONDITIONAL_REGISTER_USAGE +#define TARGET_CONDITIONAL_REGISTER_USAGE spu_conditional_register_usage + struct gcc_target targetm = TARGET_INITIALIZER; static void @@ -539,7 +541,7 @@ spu_option_override (void) else if (strcmp (&spu_arch_string[0], "celledp") == 0) spu_arch = PROCESSOR_CELLEDP; else - error ("Unknown architecture '%s'", &spu_arch_string[0]); + error ("unknown architecture %qs", &spu_arch_string[0]); } /* Determine processor to tune for. */ @@ -550,7 +552,7 @@ spu_option_override (void) else if (strcmp (&spu_tune_string[0], "celledp") == 0) spu_tune = PROCESSOR_CELLEDP; else - error ("Unknown architecture '%s'", &spu_tune_string[0]); + error ("unknown architecture %qs", &spu_tune_string[0]); } /* Change defaults according to the processor architecture. */ @@ -749,9 +751,9 @@ spu_expand_insv (rtx ops[]) HOST_WIDE_INT width = INTVAL (ops[1]); HOST_WIDE_INT start = INTVAL (ops[2]); HOST_WIDE_INT maskbits; - enum machine_mode dst_mode, src_mode; + enum machine_mode dst_mode; rtx dst = ops[0], src = ops[3]; - int dst_size, src_size; + int dst_size; rtx mask; rtx shift_reg; int shift; @@ -771,8 +773,6 @@ spu_expand_insv (rtx ops[]) src = force_reg (m, convert_to_mode (m, src, 0)); } src = adjust_operand (src, 0); - src_mode = GET_MODE (src); - src_size = GET_MODE_BITSIZE (GET_MODE (src)); mask = gen_reg_rtx (dst_mode); shift_reg = gen_reg_rtx (dst_mode); @@ -4287,7 +4287,7 @@ spu_setup_incoming_varargs (CUMULATIVE_ARGS * cum, enum machine_mode mode, } } -void +static void spu_conditional_register_usage (void) { if (flag_pic) @@ -4974,6 +4974,7 @@ spu_split_store (rtx * ops) } } + gcc_assert (aform == 0 || aform == 1); reg = gen_reg_rtx (TImode); scalar = store_with_one_insn_p (ops[0]); @@ -6424,7 +6425,7 @@ spu_check_builtin_parm (struct spu_builtin_description *d, rtx op, int p) int range = p - SPU_BTI_7; if (!CONSTANT_P (op)) - error ("%s expects an integer literal in the range [%d, %d].", + error ("%s expects an integer literal in the range [%d, %d]", d->name, spu_builtin_range[range].low, spu_builtin_range[range].high); @@ -6444,8 +6445,7 @@ spu_check_builtin_parm (struct spu_builtin_description *d, rtx op, int p) /* The default for v is 0 which is valid in every range. */ if (v < spu_builtin_range[range].low || v > spu_builtin_range[range].high) - error ("%s expects an integer literal in the range [%d, %d]. (" - HOST_WIDE_INT_PRINT_DEC ")", + error ("%s expects an integer literal in the range [%d, %d]. (%wd)", d->name, spu_builtin_range[range].low, spu_builtin_range[range].high, v); @@ -6474,7 +6474,7 @@ spu_check_builtin_parm (struct spu_builtin_description *d, rtx op, int p) || (GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (op)) || (v & ((1 << lsbits) - 1)) != 0) - warning (0, "%d least significant bits of %s are ignored.", lsbits, + warning (0, "%d least significant bits of %s are ignored", lsbits, d->name); } } @@ -6945,8 +6945,8 @@ spu_sms_res_mii (struct ddg *g) rtx insn = g->nodes[i].insn; int p = get_pipe (insn) + 2; - assert (p >= 0); - assert (p < 4); + gcc_assert (p >= 0); + gcc_assert (p < 4); t[p]++; if (dump_file && INSN_P (insn)) @@ -7111,7 +7111,7 @@ spu_split_convert (rtx ops[]) } void -spu_function_profiler (FILE * file, int labelno) +spu_function_profiler (FILE * file, int labelno ATTRIBUTE_UNUSED) { fprintf (file, "# profile\n"); fprintf (file, "brsl $75, _mcount\n");