From d09a02e0ed3c7200bcb322d6cb76e061439f4689 Mon Sep 17 00:00:00 2001 From: Matteo Croce Date: Wed, 21 May 2008 11:51:22 +0000 Subject: refresh gcc-4.2.3 patches git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11232 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches/4.2.3/904-flatten-switch-stmt-00.patch | 89 ++-------------------- 1 file changed, 5 insertions(+), 84 deletions(-) (limited to 'toolchain/gcc/patches/4.2.3/904-flatten-switch-stmt-00.patch') diff --git a/toolchain/gcc/patches/4.2.3/904-flatten-switch-stmt-00.patch b/toolchain/gcc/patches/4.2.3/904-flatten-switch-stmt-00.patch index 8fac37c4df..f33f8e7b92 100644 --- a/toolchain/gcc/patches/4.2.3/904-flatten-switch-stmt-00.patch +++ b/toolchain/gcc/patches/4.2.3/904-flatten-switch-stmt-00.patch @@ -47,11 +47,11 @@ $ size switch-*.o Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff" -Index: gcc-4.2.0/gcc/stmt.c +Index: gcc-4.2.3/gcc/stmt.c =================================================================== ---- gcc-4.2.0.orig/gcc/stmt.c (revision 123843) -+++ gcc-4.2.0/gcc/stmt.c (working copy) -@@ -2517,7 +2517,11 @@ expand_case (tree exp) +--- gcc-4.2.3.orig/gcc/stmt.c 2007-09-01 17:28:30.000000000 +0200 ++++ gcc-4.2.3/gcc/stmt.c 2008-05-21 13:45:59.137288494 +0200 +@@ -2511,7 +2511,11 @@ use_cost_table = (TREE_CODE (orig_type) != ENUMERAL_TYPE && estimate_case_costs (case_list)); @@ -64,7 +64,7 @@ Index: gcc-4.2.0/gcc/stmt.c emit_case_nodes (index, case_list, default_label, index_type); emit_jump (default_label); } -@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt +@@ -3069,6 +3073,7 @@ { if (!node_has_low_bound (node, index_type)) { @@ -72,82 +72,3 @@ Index: gcc-4.2.0/gcc/stmt.c emit_cmp_and_jump_insns (index, convert_modes (mode, imode, - - -Content-Type: text/x-csrc; charset=us-ascii -Content-Disposition: attachment; filename="switch.c" - -int -commutative_tree_code (int code) -{ -#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret; -#ifndef CHAIN - switch (code) - { -# if 1 - CASE(1,3) - CASE(3,2) - CASE(5,8) - CASE(7,1) - CASE(33,4) - CASE(44,9) - CASE(55,10) - CASE(66,-1) - CASE(77,99) - CASE(666,0) -# else - case 1: - return 3; - case 3: - return 2; - case 5: - return 8; - case 7: - return 1; - case 33: - return 4; - case 44: - return 9; - case 55: - return 10; - case 66: - return -1; - case 77: - return 99; - case 666: - return 0; -# endif - default: - break; - } - return 4711; - -#else - if (code == 1) - return 3; - else if (code == 3) - return 2; - else if (code == 5) - return 8; - else if (code == 7) - return 1; - else if (code == 33) - return 4; - else if (code == 44) - return 9; - else if (code == 55) - return 10; - else if (code == 66) - return -1; - else if (code == 77) - return 99; - else if (code == 666) - return 0; - else - return 4711; -#endif -} - - ---AhhlLboLdkugWU4S-- - -- cgit v1.2.3