Files
archived-llvm/test/CodeGen/ARM/Windows/pic.ll
Martin Storsjo d67818ff54 [MinGW] [ARM] Add stubs for potential automatic dllimported variables
The runtime pseudo relocations can't handle the ARM format embedded
addresses in movw/movt pairs. By using stubs, the potentially
dllimported addresses can be touched up by the runtime pseudo relocation
framework.

Differential Revision: https://reviews.llvm.org/D51450

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341176 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-31 08:00:25 +00:00

25 lines
742 B
LLVM

; RUN: llc -mtriple thumbv7-windows-itanium -relocation-model pic -filetype asm -o - %s \
; RUN: | FileCheck %s -check-prefix CHECK-WIN
; RUN: llc -mtriple thumbv7-windows-gnu -relocation-model pic -filetype asm -o - %s \
; RUN: | FileCheck %s -check-prefix CHECK-GNU
@external = external global i8
define arm_aapcs_vfpcc i8 @return_external() {
entry:
%0 = load i8, i8* @external, align 1
ret i8 %0
}
; CHECK-WIN-LABEL: return_external
; CHECK-WIN: movw r0, :lower16:external
; CHECK-WIN: movt r0, :upper16:external
; CHECK-WIN: ldrb r0, [r0]
; CHECK-GNU-LABEL: return_external
; CHECK-GNU: movw r0, :lower16:.refptr.external
; CHECK-GNU: movt r0, :upper16:.refptr.external
; CHECK-GNU: ldr r0, [r0]
; CHECK-GNU: ldrb r0, [r0]