[llvm-commits] [PATCH] Thumb2 cond/uncond branch fixup for ELF

Logan Chien tzuhsiang.chien at gmail.com
Tue Aug 28 19:50:44 PDT 2012


Dear all,

  It seems that ARMELFObjectWriter is not translating fixup_t2_condbranch
and fixup_t2_uncondbranch into R_ARM_THM_JUMP24.  As a result, "llc"
can not compile following code correctly with integrated assembler.  I hope
these patches can fix this issue.  Please review.  Thanks!

Sincerely,
Logan


*p.s. Test case to crash llc:*
; RUN: llc -mtriple thumbv7-none-linux-gnueabi -mcpu=cortex-a8 -march=thumb
\
; RUN:   -mattr=thumb2 -filetype=obj -o - < %s | llvm-objdump -r - |
FileCheck %s
define i32 @test_fixup_t2_uncondbranch() {
b0:
  invoke void @__cxa_throw(i8* null, i8* null, i8* null) noreturn
    to label %unreachable unwind label %lpad
; CHECK: {{[0-9]+}} R_ARM_THM_JUMP24 __cxa_throw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120829/d6dd4a3e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-ARM-ELF-support-to-llvm-objdump.patch
Type: application/octet-stream
Size: 8570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120829/d6dd4a3e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-thumb2-fixup-kind-in-the-integrated-as.patch
Type: application/octet-stream
Size: 2583 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120829/d6dd4a3e/attachment-0001.obj>


More information about the llvm-commits mailing list