From 07eb1856c10a4c0fd853433f202c2dd32686fa9b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 14 Jan 2009 18:37:40 +0000 Subject: [PATCH] merge r14036 to 8.09 SVN-Revision: 14037 --- toolchain/gcc/patches/4.1.2/500-avr32.patch | 142 ----------------- .../gcc/patches/4.2.4/900-avr32_support.patch | 150 ------------------ 2 files changed, 292 deletions(-) diff --git a/toolchain/gcc/patches/4.1.2/500-avr32.patch b/toolchain/gcc/patches/4.1.2/500-avr32.patch index b5bb346ec6..11e24eef22 100644 --- a/toolchain/gcc/patches/4.1.2/500-avr32.patch +++ b/toolchain/gcc/patches/4.1.2/500-avr32.patch @@ -19382,136 +19382,6 @@ diff -Nur gcc-4.1.2/gcc/expr.c gcc-4.1.2-owrt/gcc/expr.c dest = gen_rtx_MEM (mode, dest_addr); if (type != 0) -diff -Nur gcc-4.1.2/gcc/genemit.c gcc-4.1.2-owrt/gcc/genemit.c ---- gcc-4.1.2/gcc/genemit.c 2005-06-25 04:02:01.000000000 +0200 -+++ gcc-4.1.2-owrt/gcc/genemit.c 2007-05-24 12:03:28.000000000 +0200 -@@ -122,6 +122,24 @@ - } - - static void -+gen_vararg_prologue(int operands) -+{ -+ int i; -+ -+ if (operands > 1) -+ { -+ for (i = 1; i < operands; i++) -+ printf(" rtx operand%d ATTRIBUTE_UNUSED;\n", i); -+ -+ printf(" va_list args;\n\n"); -+ printf(" va_start(args, operand0);\n"); -+ for (i = 1; i < operands; i++) -+ printf(" operand%d = va_arg(args, rtx);\n", i); -+ printf(" va_end(args);\n\n"); -+ } -+} -+ -+static void - print_code (RTX_CODE code) - { - const char *p1; -@@ -406,18 +424,16 @@ - fatal ("match_dup operand number has no match_operand"); - - /* Output the function name and argument declarations. */ -- printf ("rtx\ngen_%s (", XSTR (insn, 0)); -+ printf ("rtx\ngen_%s ", XSTR (insn, 0)); -+ - if (operands) -- for (i = 0; i < operands; i++) -- if (i) -- printf (",\n\trtx operand%d ATTRIBUTE_UNUSED", i); -- else -- printf ("rtx operand%d ATTRIBUTE_UNUSED", i); -+ printf("(rtx operand0 ATTRIBUTE_UNUSED, ...)\n"); - else -- printf ("void"); -- printf (")\n"); -+ printf("(void)\n"); - printf ("{\n"); - -+ gen_vararg_prologue(operands); -+ - /* Output code to construct and return the rtl for the instruction body. */ - - if (XVECLEN (insn, 1) == 1) -@@ -457,16 +473,12 @@ - operands = max_operand_vec (expand, 1); - - /* Output the function name and argument declarations. */ -- printf ("rtx\ngen_%s (", XSTR (expand, 0)); -+ printf ("rtx\ngen_%s ", XSTR (expand, 0)); - if (operands) -- for (i = 0; i < operands; i++) -- if (i) -- printf (",\n\trtx operand%d", i); -- else -- printf ("rtx operand%d", i); -+ printf("(rtx operand0 ATTRIBUTE_UNUSED, ...)\n"); - else -- printf ("void"); -- printf (")\n"); -+ printf("(void)\n"); -+ - printf ("{\n"); - - /* If we don't have any C code to write, only one insn is being written, -@@ -476,6 +488,8 @@ - && operands > max_dup_opno - && XVECLEN (expand, 1) == 1) - { -+ gen_vararg_prologue(operands); -+ - printf (" return "); - gen_exp (XVECEXP (expand, 1, 0), DEFINE_EXPAND, NULL); - printf (";\n}\n\n"); -@@ -489,6 +503,7 @@ - for (; i <= max_scratch_opno; i++) - printf (" rtx operand%d ATTRIBUTE_UNUSED;\n", i); - printf (" rtx _val = 0;\n"); -+ gen_vararg_prologue(operands); - printf (" start_sequence ();\n"); - - /* The fourth operand of DEFINE_EXPAND is some code to be executed -diff -Nur gcc-4.1.2/gcc/genflags.c gcc-4.1.2-owrt/gcc/genflags.c ---- gcc-4.1.2/gcc/genflags.c 2005-06-25 04:02:01.000000000 +0200 -+++ gcc-4.1.2-owrt/gcc/genflags.c 2007-05-24 12:03:28.000000000 +0200 -@@ -128,7 +128,6 @@ - gen_proto (rtx insn) - { - int num = num_operands (insn); -- int i; - const char *name = XSTR (insn, 0); - int truth = maybe_eval_c_test (XSTR (insn, 2)); - -@@ -159,12 +158,7 @@ - if (num == 0) - fputs ("void", stdout); - else -- { -- for (i = 1; i < num; i++) -- fputs ("rtx, ", stdout); -- -- fputs ("rtx", stdout); -- } -+ fputs("rtx, ...", stdout); - - puts (");"); - -@@ -174,12 +168,7 @@ - { - printf ("static inline rtx\ngen_%s", name); - if (num > 0) -- { -- putchar ('('); -- for (i = 0; i < num-1; i++) -- printf ("rtx ARG_UNUSED (%c), ", 'a' + i); -- printf ("rtx ARG_UNUSED (%c))\n", 'a' + i); -- } -+ puts("(rtx ARG_UNUSED(a), ...)"); - else - puts ("(void)"); - puts ("{\n return 0;\n}"); diff -Nur gcc-4.1.2/gcc/genoutput.c gcc-4.1.2-owrt/gcc/genoutput.c --- gcc-4.1.2/gcc/genoutput.c 2005-06-25 04:02:01.000000000 +0200 +++ gcc-4.1.2-owrt/gcc/genoutput.c 2007-05-24 12:03:28.000000000 +0200 @@ -19567,18 +19437,6 @@ diff -Nur gcc-4.1.2/gcc/longlong.h gcc-4.1.2-owrt/gcc/longlong.h #if defined (__hppa) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("add %4,%5,%1\n\taddc %2,%3,%0" \ -diff -Nur gcc-4.1.2/gcc/optabs.h gcc-4.1.2-owrt/gcc/optabs.h ---- gcc-4.1.2/gcc/optabs.h 2005-08-19 23:20:02.000000000 +0200 -+++ gcc-4.1.2-owrt/gcc/optabs.h 2007-05-24 12:03:28.000000000 +0200 -@@ -415,7 +415,7 @@ - extern GTY(()) optab code_to_optab[NUM_RTX_CODE + 1]; - - --typedef rtx (*rtxfun) (rtx); -+typedef rtx (*rtxfun) (rtx, ...); - - /* Indexed by the rtx-code for a conditional (e.g. EQ, LT,...) - gives the gen_function to make a branch to test that condition. */ diff -Nur gcc-4.1.2/libstdc++-v3/acinclude.m4 gcc-4.1.2-owrt/libstdc++-v3/acinclude.m4 --- gcc-4.1.2/libstdc++-v3/acinclude.m4 2007-01-29 11:51:01.000000000 +0100 +++ gcc-4.1.2-owrt/libstdc++-v3/acinclude.m4 2007-05-24 12:03:28.000000000 +0200 diff --git a/toolchain/gcc/patches/4.2.4/900-avr32_support.patch b/toolchain/gcc/patches/4.2.4/900-avr32_support.patch index 333eb64cdb..164f5e33bc 100644 --- a/toolchain/gcc/patches/4.2.4/900-avr32_support.patch +++ b/toolchain/gcc/patches/4.2.4/900-avr32_support.patch @@ -21943,145 +21943,6 @@ { int save_tree_used; ---- a/gcc/genemit.c -+++ b/gcc/genemit.c -@@ -121,6 +121,24 @@ max_operand_vec (rtx insn, int arg) - } - - static void -+gen_vararg_prologue(int operands) -+{ -+ int i; -+ -+ if (operands > 1) -+ { -+ for (i = 1; i < operands; i++) -+ printf(" rtx operand%d ATTRIBUTE_UNUSED;\n", i); -+ -+ printf(" va_list args;\n\n"); -+ printf(" va_start(args, operand0);\n"); -+ for (i = 1; i < operands; i++) -+ printf(" operand%d = va_arg(args, rtx);\n", i); -+ printf(" va_end(args);\n\n"); -+ } -+} -+ -+static void - print_code (RTX_CODE code) - { - const char *p1; -@@ -405,18 +423,16 @@ gen_insn (rtx insn, int lineno) - fatal ("match_dup operand number has no match_operand"); - - /* Output the function name and argument declarations. */ -- printf ("rtx\ngen_%s (", XSTR (insn, 0)); -+ printf ("rtx\ngen_%s ", XSTR (insn, 0)); -+ - if (operands) -- for (i = 0; i < operands; i++) -- if (i) -- printf (",\n\trtx operand%d ATTRIBUTE_UNUSED", i); -- else -- printf ("rtx operand%d ATTRIBUTE_UNUSED", i); -+ printf("(rtx operand0 ATTRIBUTE_UNUSED, ...)\n"); - else -- printf ("void"); -- printf (")\n"); -+ printf("(void)\n"); - printf ("{\n"); - -+ gen_vararg_prologue(operands); -+ - /* Output code to construct and return the rtl for the instruction body. */ - - if (XVECLEN (insn, 1) == 1) -@@ -456,16 +472,12 @@ gen_expand (rtx expand) - operands = max_operand_vec (expand, 1); - - /* Output the function name and argument declarations. */ -- printf ("rtx\ngen_%s (", XSTR (expand, 0)); -+ printf ("rtx\ngen_%s ", XSTR (expand, 0)); - if (operands) -- for (i = 0; i < operands; i++) -- if (i) -- printf (",\n\trtx operand%d", i); -- else -- printf ("rtx operand%d", i); -+ printf("(rtx operand0 ATTRIBUTE_UNUSED, ...)\n"); - else -- printf ("void"); -- printf (")\n"); -+ printf("(void)\n"); -+ - printf ("{\n"); - - /* If we don't have any C code to write, only one insn is being written, -@@ -475,6 +487,8 @@ gen_expand (rtx expand) - && operands > max_dup_opno - && XVECLEN (expand, 1) == 1) - { -+ gen_vararg_prologue(operands); -+ - printf (" return "); - gen_exp (XVECEXP (expand, 1, 0), DEFINE_EXPAND, NULL); - printf (";\n}\n\n"); -@@ -488,6 +502,7 @@ gen_expand (rtx expand) - for (; i <= max_scratch_opno; i++) - printf (" rtx operand%d ATTRIBUTE_UNUSED;\n", i); - printf (" rtx _val = 0;\n"); -+ gen_vararg_prologue(operands); - printf (" start_sequence ();\n"); - - /* The fourth operand of DEFINE_EXPAND is some code to be executed ---- a/gcc/genflags.c -+++ b/gcc/genflags.c -@@ -127,7 +127,6 @@ static void - gen_proto (rtx insn) - { - int num = num_operands (insn); -- int i; - const char *name = XSTR (insn, 0); - int truth = maybe_eval_c_test (XSTR (insn, 2)); - -@@ -158,12 +157,7 @@ gen_proto (rtx insn) - if (num == 0) - fputs ("void", stdout); - else -- { -- for (i = 1; i < num; i++) -- fputs ("rtx, ", stdout); -- -- fputs ("rtx", stdout); -- } -+ fputs("rtx, ...", stdout); - - puts (");"); - -@@ -173,12 +167,7 @@ gen_proto (rtx insn) - { - printf ("static inline rtx\ngen_%s", name); - if (num > 0) -- { -- putchar ('('); -- for (i = 0; i < num-1; i++) -- printf ("rtx ARG_UNUSED (%c), ", 'a' + i); -- printf ("rtx ARG_UNUSED (%c))\n", 'a' + i); -- } -+ puts("(rtx ARG_UNUSED(a), ...)"); - else - puts ("(void)"); - puts ("{\n return 0;\n}"); ---- a/gcc/genoutput.c -+++ b/gcc/genoutput.c -@@ -386,7 +386,7 @@ output_insn_data (void) - } - - if (d->name && d->name[0] != '*') -- printf (" (insn_gen_fn) gen_%s,\n", d->name); -+ printf (" gen_%s,\n", d->name); - else - printf (" 0,\n"); - --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -77,7 +77,7 @@ static int num_possible_if_blocks; @@ -22231,17 +22092,6 @@ #if defined (__hppa) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("add %4,%5,%1\n\taddc %2,%3,%0" \ ---- a/gcc/optabs.h -+++ b/gcc/optabs.h -@@ -431,7 +431,7 @@ extern enum insn_code reload_out_optab[N - extern GTY(()) optab code_to_optab[NUM_RTX_CODE + 1]; - - --typedef rtx (*rtxfun) (rtx); -+typedef rtx (*rtxfun) (rtx, ...); - - /* Indexed by the rtx-code for a conditional (e.g. EQ, LT,...) - gives the gen_function to make a branch to test that condition. */ --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -1592,6 +1592,9 @@ copyprop_hardreg_forward_1 (basic_block -- 2.30.2