[LLVMbugs] [Bug 7880] New: llc with frame pointer elimination disabled generates incorrect epilogue code for the ARM target
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 12 17:01:49 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7880
Summary: llc with frame pointer elimination disabled generates
incorrect epilogue code for the ARM target
Product: libraries
Version: 2.7
Platform: PC
OS/Version: Linux
Status: NEW
Severity: release blocker
Priority: P
Component: Backend: ARM
AssignedTo: unassignedbugs at nondot.org
ReportedBy: pawel at 32bitmicro.com
CC: llvmbugs at cs.uiuc.edu
Using stock LVVM-2.7 x86_64 release
C file fbench.c is compiled to byte code - fbench.bc
/projects/test-suite/SingleSource/Benchmarks/Misc/fbench.c
llc is then used to produce assembly with the following options:
llc -O0 -regalloc=local -relocation-model=pic -f -disable-fp-elim fbench.bc -o
fbench.bc.s
fbench.bc.s is assembled and linked for Linux armel machine. Running the
executable results in segfault at the stack adjustment code in @ BB#13 shown
below:
There seems to be two issues:
- r11 (fp) does not have correct value for the stack pointer
- "sub" is generated instead of "add"
sub sp, r11, #28
ldr r4, [sp]
Larger fragment:
@ BB#13:
... -
bl printf(PLT)
mov r0, #0
sub sp, r11, #28
ldr r4, [sp]
ldr r5, [sp, #+4]
ldr r6, [sp, #+8]
ldr r7, [sp, #+12]
ldr r8, [sp, #+16]
ldr r9, [sp, #+20]
ldr r10, [sp, #+24]
ldr r11, [sp, #+28]
ldr lr, [sp, #+32]
add sp, sp, #36
bx lr
.LBB2_14: @ %bb29
ldr r0, .LCPI2_62
ldr r1, .LCPI2_63
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list