llvm.org GIT mirror llvm / 6f1e023
Generate correct asm info for mingw and cygwin ARM targets. http://reviews.llvm.org/D11075 Patch by Martell Malone Reviewed by Reid Kleckner git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242123 91177308-0d34-0410-b5e6-96231b3b80d8 Yaron Keren 5 years ago
5 changed file(s) with 38 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
276276 MCAsmInfo *MAI;
277277 if (TheTriple.isOSDarwin() || TheTriple.isOSBinFormatMachO())
278278 MAI = new ARMMCAsmInfoDarwin(TheTriple);
279 else if (TheTriple.isWindowsItaniumEnvironment())
280 MAI = new ARMCOFFMCAsmInfoGNU();
281279 else if (TheTriple.isWindowsMSVCEnvironment())
282280 MAI = new ARMCOFFMCAsmInfoMicrosoft();
281 else if (TheTriple.isOSWindows())
282 MAI = new ARMCOFFMCAsmInfoGNU();
283283 else
284284 MAI = new ARMELFMCAsmInfo(TheTriple);
285285
None ; RUN: llc -mtriple=thumbv7-windows-itanium -mcpu=cortex-a9 -o - %s | FileCheck %s
0 ; RUN: llc -mtriple=thumbv7-windows-itanium -mcpu=cortex-a9 -o - %s \
1 ; RUN: | FileCheck %s -check-prefix CHECK-WIN
2
3 ; RUN: llc -mtriple=thumbv7-windows-gnu -mcpu=cortex-a9 -o - %s \
4 ; RUN: | FileCheck %s -check-prefix CHECK-GNU
15
26 define float @function(float %f, float %g) nounwind {
37 entry:
59 ret float %h
610 }
711
8 ; CHECK: vadd.f32 s0, s0, s1
12 ; CHECK-WIN: vadd.f32 s0, s0, s1
913
14 ; CHECK-GNU: vadd.f32 s0, s0, s1
15
0 ; RUN: not llc -mtriple=armv7-windows-itanium -mcpu=cortex-a9 -o /dev/null %s 2>&1 \
1 ; RUN: | FileCheck %s
1 ; RUN: | FileCheck %s -check-prefix CHECK-WIN
22
3 ; CHECK: does not support ARM mode execution
3 ; RUN: not llc -mtriple=armv7-windows-gnu -mcpu=cortex-a9 -o /dev/null %s 2>&1 \
4 ; RUN: | FileCheck %s -check-prefix CHECK-GNU
45
6 ; CHECK-WIN: does not support ARM mode execution
7
8 ; CHECK-GNU: does not support ARM mode execution
9
0 ; RUN: llc -mtriple thumbv7-windows-itanium -relocation-model pic -filetype asm -o - %s \
1 ; RUN: | FileCheck %s
1 ; RUN: | FileCheck %s -check-prefix CHECK-WIN
2
3 ; RUN: llc -mtriple thumbv7-windows-gnu -relocation-model pic -filetype asm -o - %s \
4 ; RUN: | FileCheck %s -check-prefix CHECK-GNU
25
36 @external = external global i8
47
811 ret i8 %0
912 }
1013
11 ; CHECK-LABEL: return_external
12 ; CHECK: movw r0, :lower16:external
13 ; CHECK: movt r0, :upper16:external
14 ; CHECK: ldrb r0, [r0]
14 ; CHECK-WIN-LABEL: return_external
15 ; CHECK-WIN: movw r0, :lower16:external
16 ; CHECK-WIN: movt r0, :upper16:external
17 ; CHECK-WIN: ldrb r0, [r0]
1518
19 ; CHECK-GNU-LABEL: return_external
20 ; CHECK-GNU: movw r0, :lower16:external
21 ; CHECK-GNU: movt r0, :upper16:external
22 ; CHECK-GNU: ldrb r0, [r0]
None ; RUN: llc -mtriple thumbv7-windows-itanium -o - %s | FileCheck %s
0 ; RUN: llc -mtriple thumbv7-windows-itanium -o - %s \
1 ; RUN: | FileCheck %s -check-prefix CHECK-WIN
2
3 ; RUN: llc -mtriple thumbv7-windows-gnu -o - %s \
4 ; RUN: | FileCheck %s -check-prefix CHECK-GNU
15
26 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @function, i8* null }]
37
610 ret void
711 }
812
9 ; CHECK: .section .CRT$XCU,"dr"
10 ; CHECK: .long function
13 ; CHECK-WIN: .section .CRT$XCU,"dr"
14 ; CHECK-WIN: .long function
1115
16 ; CHECK-GNU: .section .ctors,"dw"
17 ; CHECK-GNU: .long function