mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
ARM: support PIC on Windows on ARM
Handle lowering of global addresses for PIC mode compilation on Windows. Always use the movw/movt load to load the address as Windows on ARM requires ARMv7+ and is a pure Thumb environment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208385 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
16
test/CodeGen/ARM/Windows/pic.ll
Normal file
16
test/CodeGen/ARM/Windows/pic.ll
Normal file
@@ -0,0 +1,16 @@
|
||||
; RUN: llc -mtriple thumbv7-windows-itanium -relocation-model pic -filetype asm -o - %s \
|
||||
; RUN: | FileCheck %s
|
||||
|
||||
@external = external global i8
|
||||
|
||||
define arm_aapcs_vfpcc i8 @return_external() {
|
||||
entry:
|
||||
%0 = load i8* @external, align 1
|
||||
ret i8 %0
|
||||
}
|
||||
|
||||
; CHECK-LABEL: return_external
|
||||
; CHECK: movw r0, :lower16:external
|
||||
; CHECK: movt r0, :upper16:external
|
||||
; CHECK: ldrb r0, [r0]
|
||||
|
Reference in New Issue
Block a user