2014-05-09 08:58:32 +08:00
|
|
|
; RUN: llc -mtriple thumbv7-windows-itanium -relocation-model pic -filetype asm -o - %s \
|
2015-07-14 13:51:05 +08:00
|
|
|
; 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
|
2014-05-09 08:58:32 +08:00
|
|
|
|
|
|
|
@external = external global i8
|
|
|
|
|
|
|
|
define arm_aapcs_vfpcc i8 @return_external() {
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%0 = load i8, i8* @external, align 1
|
2014-05-09 08:58:32 +08:00
|
|
|
ret i8 %0
|
|
|
|
}
|
|
|
|
|
2015-07-14 13:51:05 +08:00
|
|
|
; CHECK-WIN-LABEL: return_external
|
|
|
|
; CHECK-WIN: movw r0, :lower16:external
|
|
|
|
; CHECK-WIN: movt r0, :upper16:external
|
|
|
|
; CHECK-WIN: ldrb r0, [r0]
|
2014-05-09 08:58:32 +08:00
|
|
|
|
2015-07-14 13:51:05 +08:00
|
|
|
; CHECK-GNU-LABEL: return_external
|
|
|
|
; CHECK-GNU: movw r0, :lower16:external
|
|
|
|
; CHECK-GNU: movt r0, :upper16:external
|
|
|
|
; CHECK-GNU: ldrb r0, [r0]
|