diff options
author | Zuxy Meng <zuxy.meng@gmail.com> | 2008-04-14 23:47:39 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@gcc.gnu.org> | 2008-04-14 23:47:39 +0000 |
commit | 40f39798cea1409910ee900f17a37944eea0f7b7 (patch) | |
tree | c03939e161466008cf104067ba245f0ec53745ca /gcc | |
parent | 07acc7b3e198ab2b21bbe47f3d16e2820e4990cf (diff) | |
download | gcc-40f39798cea1409910ee900f17a37944eea0f7b7.zip gcc-40f39798cea1409910ee900f17a37944eea0f7b7.tar.gz gcc-40f39798cea1409910ee900f17a37944eea0f7b7.tar.bz2 |
re PR target/35661 (__attribute__((cold)) generates wrong code)
2008-04-16 Zuxy Meng <zuxy.meng@gmail.com>
PR target/35661
* config/i386/winnt.c (i386_pe_section_type_flags): Mark
".text.unlikely" section as executable.
From-SVN: r134296
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e32aeea..0109ead 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-04-16 Zuxy Meng <zuxy.meng@gmail.com> + + PR target/35661 + * config/i386/winnt.c (i386_pe_section_type_flags): Mark + ".text.unlikely" section as executable. + 2008-04-14 James E. Wilson <wilson@tuliptree.org> * config/ia64/ia64.c (rtx_needs_barrier): Handle diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 4d93573..35d7f9f 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -420,6 +420,15 @@ i386_pe_section_type_flags (tree decl, const char *name, int reloc) flags = SECTION_CODE; else if (decl && decl_readonly_section (decl, reloc)) flags = 0; + else if (current_function_decl + && cfun + && crtl->subsections.unlikely_text_section_name + && strcmp (name, crtl->subsections.unlikely_text_section_name) == 0) + flags = SECTION_CODE; + else if (!decl + && (!current_function_decl || !cfun) + && strcmp (name, UNLIKELY_EXECUTED_TEXT_SECTION_NAME) == 0) + flags = SECTION_CODE; else { flags = SECTION_WRITE; |