f81f6758f3188e1fd8be6b3707301959268dbbf0 |
|
04-Aug-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Print r_type with the correct number of bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/MC/ARM/elf-movt.s
|
f7179de2a5c127d08e6d24e507abec516f2fc597 |
|
04-Aug-2011 |
Rafael Espindola <rafael.espindola@gmail.com> |
Change anther counter to decimal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/MC/ARM/elf-movt.s
|
861b9c6a397f2ed4b5601cacbc9121d0b07d1f65 |
|
19-May-2011 |
Jason W Kim <jason.w.kim.2009@gmail.com> |
This fixes one divergence between LLVM and binutils for ARM in the text section. Assume the following bit of annotated assembly: .section .data.rel.ro,"aw",%progbits .align 2 .LAlpha: .long startval(GOTOFF) .text .align 2 .type main,%function .align 4 main: ;;; assume "main" starts at offset 0x20 0x0 push {r11, lr} 0x4 movw r0, :lower16:(.LAlpha-(.LBeta+8)) ;;; ==> (.AddrOf(.LAlpha) - ((.AddrOf(.LBeta) - .AddrOf(".")) + 8) ;;; ==> (??? - ((16-4) + 8) = -20 0x8 movt r0, :upper16:(.LAlpha-(.LBeta+8)) ;;; ==> (.AddrOf(.LAlpha) - ((.AddrOf(.LBeta) - .AddrOf(".")) + 8) ;;; ==> (??? - ((16-8) + 8) = -16 0xc ... blah .LBeta: 0x10 add r0, pc, r0 0x14 ... blah .LGamma: 0x18 add r1, pc, r1 Above snippet results in the following relocs in the .o file for the first pair of movw/movt instructions 00000024 R_ARM_MOVW_PREL_NC .LAlpha 00000028 R_ARM_MOVT_PREL .LAlpha And the encoded instructions in the .o file for main: must be 00000020 <main>: 20: e92d4800 push {fp, lr} 24: e30f0fec movw r0, #65516 ; 0xffec i.e. -20 28: e34f0ff0 movt r0, #65520 ; 0xfff0 i.e. -16 However, llc (prior to this commit) generates the following sequence 00000020 <main>: 20: e92d4800 push {fp, lr} 24: e30f0fec movw r0, #65516 ; 0xffec - i.e. -20 28: e34f0fff movt r0, #65535 ; 0xffff - i.e. -1 What has to happen in the ArmAsmBackend is that if the relocation is PC relative, the 16 bits encoded as part of movw and movt must be both addends, not addresses. It makes sense to encode addresses by right shifting the value by 16, but the result is incorrect for PIC. i.e., the right shift by 16 for movt is ONLY valid for the NON-PCRel case. This change agrees with what GNU as does, and makes the PIC code run. MC/ARM/elf-movt.s covers this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/MC/ARM/elf-movt.s
|
f3eb3bba1614a7935b44fc963a805088d71267f3 |
|
14-Jan-2011 |
Evan Cheng <evan.cheng@apple.com> |
Completed :lower16: / :upper16: support for movw / movt pairs on Darwin. - Fixed :upper16: fix up routine. It should be shifting down the top 16 bits first. - Added support for Thumb2 :lower16: and :upper16: fix up. - Added :upper16: and :lower16: relocation support to mach-o object writer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/MC/ARM/elf-movt.s
|
7597212abced110723f2fee985a7d60557c092ec |
|
13-Jan-2011 |
Evan Cheng <evan.cheng@apple.com> |
Model :upper16: and :lower16: as ARM specific MCTargetExpr. This is a step in the right direction. It eliminated some hacks and will unblock codegen work. But it's far from being done. It doesn't reject illegal expressions, e.g. (FOO - :lower16:BAR). It also doesn't work in Thumb2 mode at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/MC/ARM/elf-movt.s
|
86a97f2e4d0cde5e992f52ac287da0de687e0110 |
|
12-Jan-2011 |
Jason W Kim <jason.w.kim.2009@gmail.com> |
1. Support ELF pcrel relocations for movw/movt: R_ARM_MOVT_PREL and R_ARM_MOVW_PREL_NC. 2. Fix minor bug in ARMAsmPrinter - treat bitfield flag as a bitfield, not an enum. 3. Add support for 3 new elf section types (no-ops) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/MC/ARM/elf-movt.s
|
9081b4b4cf89a161246e037f4817c69de2fcdf82 |
|
12-Jan-2011 |
Jason W Kim <jason.w.kim.2009@gmail.com> |
Workaround for bug 8721. .s Test added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/test/MC/ARM/elf-movt.s
|