Root/toolchain/gcc/patches/3.4.6/701-pr16276-fix.patch

1http://gcc.gnu.org/PR16276
2
32004-07-08 H.J. Lu <hongjiu.lu@intel.com>
4
5    PR c++/16276
6    * final.c (PUT_JUMP_TABLES_IN_TEXT_SECTION): New.
7    (shorten_branches): Replace JUMP_TABLES_IN_TEXT_SECTION with
8    PUT_JUMP_TABLES_IN_TEXT_SECTION.
9    (final_scan_insn): Likewise.
10
11--- a/gcc/final.c 2003-12-03 09:42:25.000000000 -0800
12+++ b/gcc/final.c 2004-07-08 14:45:07.900366938 -0700
13@@ -100,6 +100,9 @@ Software Foundation, 59 Temple Place - S
14 #define JUMP_TABLES_IN_TEXT_SECTION 0
15 #endif
16 
17+#define PUT_JUMP_TABLES_IN_TEXT_SECTION \
18+ (JUMP_TABLES_IN_TEXT_SECTION || DECL_ONE_ONLY (current_function_decl))
19+
20 #if defined(READONLY_DATA_SECTION) || defined(READONLY_DATA_SECTION_ASM_OP)
21 #define HAVE_READONLY_DATA_SECTION 1
22 #else
23@@ -1119,7 +1122,8 @@ shorten_branches (first)
24       next = NEXT_INSN (insn);
25       /* ADDR_VECs only take room if read-only data goes into the text
26          section. */
27- if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION)
28+ if (PUT_JUMP_TABLES_IN_TEXT_SECTION
29+ || !HAVE_READONLY_DATA_SECTION)
30         if (next && GET_CODE (next) == JUMP_INSN)
31           {
32         rtx nextbody = PATTERN (next);
33@@ -1282,7 +1286,8 @@ shorten_branches (first)
34     {
35       /* This only takes room if read-only data goes into the text
36          section. */
37- if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION)
38+ if (PUT_JUMP_TABLES_IN_TEXT_SECTION
39+ || !HAVE_READONLY_DATA_SECTION)
40         insn_lengths[uid] = (XVECLEN (body,
41                       GET_CODE (body) == ADDR_DIFF_VEC)
42                  * GET_MODE_SIZE (GET_MODE (body)));
43@@ -1483,7 +1488,8 @@ shorten_branches (first)
44           PUT_MODE (body, CASE_VECTOR_SHORTEN_MODE (min_addr - rel_addr,
45                             max_addr - rel_addr,
46                             body));
47- if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION)
48+ if (PUT_JUMP_TABLES_IN_TEXT_SECTION
49+ || !HAVE_READONLY_DATA_SECTION)
50         {
51           insn_lengths[uid]
52             = (XVECLEN (body, 1) * GET_MODE_SIZE (GET_MODE (body)));
53@@ -2254,7 +2260,7 @@ final_scan_insn (insn, file, optimize, p
54          target, so don't output the label at all. Leave that
55          to the back end macros. */
56 #else
57- if (! JUMP_TABLES_IN_TEXT_SECTION)
58+ if (! PUT_JUMP_TABLES_IN_TEXT_SECTION)
59         {
60           int log_align;
61 
62

Archive Download this file



interactive