Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

ARM does not support trampolines #4135

Open Quuxplusone opened 15 years ago

Quuxplusone commented 15 years ago
Bugzilla Link PR3728
Status NEW
Importance P normal
Reported by S.Bharadwaj Yadavalli (bharadwajy@gmail.com)
Reported on 2009-03-04 16:11:19 -0800
Last modified on 2009-09-09 06:17:15 -0700
Version trunk
Hardware PC Linux
CC baldrick@free.fr, llvm-bugs@lists.llvm.org, xerxes@zafena.se
Fixed by commit(s)
Attachments bugpoint-reduced-simplified.ll (802 bytes, text/plain)
Blocks
Blocked by
See also

I encountered the following assertion during compilation using x86_64->arm cross compiler that I built. llvm rev no: 66050.

Please find bugpoint-reduced-simplified.ll attached.

Thanks.

Quuxplusone commented 15 years ago

Attached bugpoint-reduced-simplified.ll (802 bytes, text/plain): bugpoint-reduced-simplified.ll

Quuxplusone commented 15 years ago
It shouldn't be too hard to add support for trampolines to ARM.
The usual technique is to study the code sequence gcc uses and
implement it or a variant in the LLVM code generators.  If you
are interested, compare the ppc and x86 cases in LLVM and gcc.

That said, not sure why pointers to nested functions are being
used in the ARM llvm-gcc cross build...  What is the original
code?
Quuxplusone commented 15 years ago
The ouput of the testcase:

llvm-as < ./bugpoint-reduced-simplified.ll  | llc -march=arm
llc: /usr/src/openembedded/overo/tmp/work/armv7a-angstrom-linux-gnueabi/llvm2.6-
2.5+svnr20090511-r0/trunk/lib/Target/ARM/ARMISelLowering.cpp:1596: virtual
llvm::SDValue llvm::ARMTargetLowering::LowerOperation(llvm::SDValue,
llvm::SelectionDAG&): Assertion `0 && "Don't know how to custom lower this!"'
failed.
Stack dump:
0.  Program arguments: llc -march=arm
1.  Running pass 'ARM Instruction Selection' on function '@RunTestInMode'
Aborted
Quuxplusone commented 15 years ago
retesting with llvm svn rev 79847

xerxes@sheeva:/usr/src/build$ ./buildbot/llvm-arm-linux/build/Debug/bin/llvm-as
<  bugpoint-reduced-simplified.ll  | ./buildbot/llvm-arm-
linux/build/Debug/bin/llc -march=arm
    .file   "<stdin>"
    .eabi_attribute 20, 1
    .eabi_attribute 21, 1
    .eabi_attribute 23, 3
    .eabi_attribute 24, 1
    .eabi_attribute 25, 1
Don't know how to custom lower this!
UNREACHABLE executed at ARMISelLowering.cpp:2759!
0   llc       0x011a08b8
1   llc       0x011a1170
2   libc.so.6 0x4022bc10 __default_sa_restorer_v2 + 0
Stack dump:
0.  Program arguments: ./buildbot/llvm-arm-linux/build/Debug/bin/llc -march=arm
1.  Running pass 'ARM Instruction Selection' on function '@RunTestInMode'
Aborted
xerxes@sheeva:/usr/src/build$
Quuxplusone commented 15 years ago
still exists with llvm rev 81322

xerxes@overo:/usr/src/openembedded/verdexpro/tmp/work/armv5te-angstrom-linux-
gnueabi/llvm2.6-2.5+svnr81322-r1/trunk/build/bin$ ./llvm-as < /home/xerxes/3728.
ll | ./llc -march=arm
    .file   "<stdin>"
    .eabi_attribute 20, 1
    .eabi_attribute 21, 1
    .eabi_attribute 23, 3
    .eabi_attribute 24, 1
    .eabi_attribute 25, 1
Don't know how to custom lower this!
UNREACHABLE executed at /usr/src/openembedded/verdexpro/tmp/work/armv5te-
angstrom-linux-gnueabi/llvm2.6-2.5+svnr81322-r1/trunk/lib/Target/ARM/ARMISelLowering.cpp:2788!
Stack dump:
0.  Program arguments: ./llc -march=arm
1.  Running pass 'ARM Instruction Selection' on function '@RunTestInMode'
Aborted