X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FARM%2Fglobals.ll;h=bab96dadce55ee00ea47713c6cef137f406ea4e3;hb=0cf3a4e4fee5bb456dc02a393ed4fcb559b7f824;hp=886c0d55cfa8c3fd5872017b000c559e44cc4733;hpb=2e2563bf8e0f0a7f8c923000c0206855f16968b2;p=oota-llvm.git diff --git a/test/CodeGen/ARM/globals.ll b/test/CodeGen/ARM/globals.ll index 886c0d55cfa..bab96dadce5 100644 --- a/test/CodeGen/ARM/globals.ll +++ b/test/CodeGen/ARM/globals.ll @@ -1,33 +1,33 @@ -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=DarwinStatic -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DarwinDynamic -; RUN: llc < %s -mtriple=arm-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=DarwinPIC -; RUN: llc < %s -mtriple=arm-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LinuxPIC +; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=static | FileCheck %s -check-prefix=DarwinStatic +; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DarwinDynamic +; RUN: llc < %s -mtriple=armv6-apple-darwin -relocation-model=pic | FileCheck %s -check-prefix=DarwinPIC +; RUN: llc < %s -mtriple=armv6-linux-gnueabi -relocation-model=pic | FileCheck %s -check-prefix=LinuxPIC @G = external global i32 define i32 @test1() { - %tmp = load i32* @G + %tmp = load i32, i32* @G ret i32 %tmp } ; DarwinStatic: _test1: -; DarwinStatic: ldr r0, LCPI1_0 +; DarwinStatic: ldr r0, LCPI0_0 ; DarwinStatic: ldr r0, [r0] ; DarwinStatic: bx lr ; DarwinStatic: .align 2 -; DarwinStatic: LCPI1_0: +; DarwinStatic: LCPI0_0: ; DarwinStatic: .long {{_G$}} ; DarwinDynamic: _test1: -; DarwinDynamic: ldr r0, LCPI1_0 +; DarwinDynamic: ldr r0, LCPI0_0 ; DarwinDynamic: ldr r0, [r0] ; DarwinDynamic: ldr r0, [r0] ; DarwinDynamic: bx lr ; DarwinDynamic: .align 2 -; DarwinDynamic: LCPI1_0: +; DarwinDynamic: LCPI0_0: ; DarwinDynamic: .long L_G$non_lazy_ptr ; DarwinDynamic: .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers @@ -39,15 +39,16 @@ define i32 @test1() { ; DarwinPIC: _test1: -; DarwinPIC: ldr r0, LCPI1_0 -; DarwinPIC: LPC1_0: -; DarwinPIC: ldr r0, [pc, +r0] +; DarwinPIC: ldr r0, LCPI0_0 +; DarwinPIC: LPC0_0: +; DarwinPIC: ldr r0, [pc, r0] ; DarwinPIC: ldr r0, [r0] +; DarwinPIC-NOT: ldr ; DarwinPIC: bx lr ; DarwinPIC: .align 2 -; DarwinPIC: LCPI1_0: -; DarwinPIC: .long L_G$non_lazy_ptr-(LPC1_0+8) +; DarwinPIC: LCPI0_0: +; DarwinPIC: .long L_G$non_lazy_ptr-(LPC0_0+8) ; DarwinPIC: .section __DATA,__nl_symbol_ptr,non_lazy_symbol_pointers ; DarwinPIC: .align 2 @@ -57,19 +58,18 @@ define i32 @test1() { -; LinuxPIC: test1: -; LinuxPIC: ldr r0, .LCPI1_0 -; LinuxPIC: ldr r1, .LCPI1_1 +; LinuxPIC-LABEL: test1: +; LinuxPIC: ldr r0, .LCPI0_0 +; LinuxPIC: ldr r1, .LCPI0_1 -; LinuxPIC: .LPC1_0: +; LinuxPIC: .LPC0_0: ; LinuxPIC: add r0, pc, r0 -; LinuxPIC: ldr r0, [r1, +r0] +; LinuxPIC: ldr r0, [r1, r0] ; LinuxPIC: ldr r0, [r0] ; LinuxPIC: bx lr ; LinuxPIC: .align 2 -; LinuxPIC: .LCPI1_0: -; LinuxPIC: .long _GLOBAL_OFFSET_TABLE_-(.LPC1_0+8) -; LinuxPIC: .align 2 -; LinuxPIC: .LCPI1_1: +; LinuxPIC: .LCPI0_0: +; LinuxPIC: .long _GLOBAL_OFFSET_TABLE_-(.LPC0_0+8) +; LinuxPIC: .LCPI0_1: ; LinuxPIC: .long G(GOT)