Archived
1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Files
archive/toolchain/gcc/patches/3.4.6/701-pr16276-fix.patch

62 lines
2.1 KiB
Diff

http://gcc.gnu.org/PR16276
2004-07-08 H.J. Lu <hongjiu.lu@intel.com>
PR c++/16276
* final.c (PUT_JUMP_TABLES_IN_TEXT_SECTION): New.
(shorten_branches): Replace JUMP_TABLES_IN_TEXT_SECTION with
PUT_JUMP_TABLES_IN_TEXT_SECTION.
(final_scan_insn): Likewise.
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -105,6 +105,9 @@ Software Foundation, 59 Temple Place - S
#define JUMP_TABLES_IN_TEXT_SECTION 0
#endif
+#define PUT_JUMP_TABLES_IN_TEXT_SECTION \
+ (JUMP_TABLES_IN_TEXT_SECTION || DECL_ONE_ONLY (current_function_decl))
+
#if defined(READONLY_DATA_SECTION) || defined(READONLY_DATA_SECTION_ASM_OP)
#define HAVE_READONLY_DATA_SECTION 1
#else
@@ -835,7 +838,8 @@ shorten_branches (rtx first ATTRIBUTE_UN
next = NEXT_INSN (insn);
/* ADDR_VECs only take room if read-only data goes into the text
section. */
- if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION)
+ if (PUT_JUMP_TABLES_IN_TEXT_SECTION
+ || !HAVE_READONLY_DATA_SECTION)
if (next && GET_CODE (next) == JUMP_INSN)
{
rtx nextbody = PATTERN (next);
@@ -998,7 +1002,8 @@ shorten_branches (rtx first ATTRIBUTE_UN
{
/* This only takes room if read-only data goes into the text
section. */
- if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION)
+ if (PUT_JUMP_TABLES_IN_TEXT_SECTION
+ || !HAVE_READONLY_DATA_SECTION)
insn_lengths[uid] = (XVECLEN (body,
GET_CODE (body) == ADDR_DIFF_VEC)
* GET_MODE_SIZE (GET_MODE (body)));
@@ -1199,7 +1204,8 @@ shorten_branches (rtx first ATTRIBUTE_UN
PUT_MODE (body, CASE_VECTOR_SHORTEN_MODE (min_addr - rel_addr,
max_addr - rel_addr,
body));
- if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION)
+ if (PUT_JUMP_TABLES_IN_TEXT_SECTION
+ || !HAVE_READONLY_DATA_SECTION)
{
insn_lengths[uid]
= (XVECLEN (body, 1) * GET_MODE_SIZE (GET_MODE (body)));
@@ -1877,7 +1883,7 @@ final_scan_insn (rtx insn, FILE *file, i
target, so don't output the label at all. Leave that
to the back end macros. */
#else
- if (! JUMP_TABLES_IN_TEXT_SECTION)
+ if (! PUT_JUMP_TABLES_IN_TEXT_SECTION)
{
int log_align;