This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/66215] [4.8/4.9/5/6 Regression] Wrong after label NOP emission for -mhotpatch
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 May 2015 12:23:29 +0000
- Subject: [Bug target/66215] [4.8/4.9/5/6 Regression] Wrong after label NOP emission for -mhotpatch
- Auto-submitted: auto-generated
- References: <bug-66215-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66215
--- Comment #1 from Martin LiÅka <marxin at gcc dot gnu.org> ---
Following testcase is wrongly compiled event with -O2 optimization level.
$ cat o2-test-case.c
static int a;
int t(int tt)
{
switch (tt)
{
case 1: return a;
}
return 0;
}
$ ./xgcc -B. -mhotpatch=2,3 -O2 -fno-inline -o /tmp/test.s -S o2-test-case.c
$ head -n20 /tmp/test.s
.file "o2-test-case.c"
.text
.align 8
.globl t
.type t, @function
nopr %r7 # pre-label NOPs for hotpatch (2 halfwords)
nopr %r7
# alignment for hotpatch
.align 8
t:
marxin@marxinbox:~/Programming/gcc2/objdir/gcc> head -n20 /tmp/test.s
.file "o2-test-case.c"
.text
.align 8
.globl t
.type t, @function
nopr %r7 # pre-label NOPs for hotpatch (2 halfwords)
nopr %r7
# alignment for hotpatch
.align 8
t:
# post-label NOPs for hotpatch (3 halfwords)
.LFB0:
st %r14,56(%r15)
nop 0
nopr %r7
.LCFI0:
l %r4,56(%r15)
lhi %r2,0
l %r14,56(%r15)
.LCFI1: