1 http://gcc.gnu.org/PR16276
3 2004-07-08 H.J. Lu <hongjiu.lu@intel.com>
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.
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
17 +#define PUT_JUMP_TABLES_IN_TEXT_SECTION \
18 + (JUMP_TABLES_IN_TEXT_SECTION || DECL_ONE_ONLY (current_function_decl))
20 #if defined(READONLY_DATA_SECTION) || defined(READONLY_DATA_SECTION_ASM_OP)
21 #define HAVE_READONLY_DATA_SECTION 1
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
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)
32 rtx nextbody = PATTERN (next);
33 @@ -1282,7 +1286,8 @@ shorten_branches (first)
35 /* This only takes room if read-only data goes into the text
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,
47 - if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION)
48 + if (PUT_JUMP_TABLES_IN_TEXT_SECTION
49 + || !HAVE_READONLY_DATA_SECTION)
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. */
57 - if (! JUMP_TABLES_IN_TEXT_SECTION)
58 + if (! PUT_JUMP_TABLES_IN_TEXT_SECTION)