source: branches/backfire/toolchain/gcc/patches/3.4.6/701-pr16276-fix.patch @ 20959

Last change on this file since 20959 was 20959, checked in by nico, 6 years ago

[backfire] backport r20900

File size: 2.2 KB
  • gcc/final.c

    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 b Software Foundation, 59 Temple Place - S 
    100100#define JUMP_TABLES_IN_TEXT_SECTION 0 
    101101#endif 
    102102 
     103#define PUT_JUMP_TABLES_IN_TEXT_SECTION \ 
     104  (JUMP_TABLES_IN_TEXT_SECTION || DECL_ONE_ONLY (current_function_decl)) 
     105 
    103106#if defined(READONLY_DATA_SECTION) || defined(READONLY_DATA_SECTION_ASM_OP) 
    104107#define HAVE_READONLY_DATA_SECTION 1 
    105108#else 
    shorten_branches (first) 
    11191122          next = NEXT_INSN (insn); 
    11201123          /* ADDR_VECs only take room if read-only data goes into the text 
    11211124             section.  */ 
    1122           if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION) 
     1125          if (PUT_JUMP_TABLES_IN_TEXT_SECTION 
     1126              || !HAVE_READONLY_DATA_SECTION) 
    11231127            if (next && GET_CODE (next) == JUMP_INSN) 
    11241128              { 
    11251129                rtx nextbody = PATTERN (next); 
    shorten_branches (first) 
    12821286        { 
    12831287          /* This only takes room if read-only data goes into the text 
    12841288             section.  */ 
    1285           if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION) 
     1289          if (PUT_JUMP_TABLES_IN_TEXT_SECTION 
     1290              || !HAVE_READONLY_DATA_SECTION) 
    12861291            insn_lengths[uid] = (XVECLEN (body, 
    12871292                                          GET_CODE (body) == ADDR_DIFF_VEC) 
    12881293                                 * GET_MODE_SIZE (GET_MODE (body))); 
    shorten_branches (first) 
    14831488              PUT_MODE (body, CASE_VECTOR_SHORTEN_MODE (min_addr - rel_addr, 
    14841489                                                        max_addr - rel_addr, 
    14851490                                                        body)); 
    1486               if (JUMP_TABLES_IN_TEXT_SECTION || !HAVE_READONLY_DATA_SECTION) 
     1491              if (PUT_JUMP_TABLES_IN_TEXT_SECTION 
     1492                  || !HAVE_READONLY_DATA_SECTION) 
    14871493                { 
    14881494                  insn_lengths[uid] 
    14891495                    = (XVECLEN (body, 1) * GET_MODE_SIZE (GET_MODE (body))); 
    final_scan_insn (insn, file, optimize, p 
    22542260                 target, so don't output the label at all.  Leave that 
    22552261                 to the back end macros.  */ 
    22562262#else 
    2257               if (! JUMP_TABLES_IN_TEXT_SECTION) 
     2263              if (! PUT_JUMP_TABLES_IN_TEXT_SECTION) 
    22582264                { 
    22592265                  int log_align; 
    22602266 
Note: See TracBrowser for help on using the repository browser.