[backfire] toolchain: fix gcc 3.4.6 (brcm-2.4) after relocation from usr/, refresh...
[openwrt/svn-archive/archive.git] / toolchain / gcc / patches / 3.4.6 / 701-pr16276-fix.patch
1 http://gcc.gnu.org/PR16276
2
3 2004-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
12 +++ b/gcc/final.c
13 @@ -105,6 +105,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 @@ -835,7 +838,8 @@ shorten_branches (rtx first ATTRIBUTE_UN
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 @@ -998,7 +1002,8 @@ shorten_branches (rtx first ATTRIBUTE_UN
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 @@ -1199,7 +1204,8 @@ shorten_branches (rtx first ATTRIBUTE_UN
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 @@ -1877,7 +1883,7 @@ final_scan_insn (rtx insn, FILE *file, i
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