martell updated this revision to Diff 29428.
martell added a comment.

Added relevant test cases as requested by Tim :)


http://reviews.llvm.org/D11075

Files:
  lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
  test/CodeGen/ARM/Windows/hard-float.ll
  test/CodeGen/ARM/Windows/no-arm-mode.ll
  test/CodeGen/ARM/Windows/pic.ll
  test/CodeGen/ARM/Windows/structors.ll

Index: test/CodeGen/ARM/Windows/structors.ll
===================================================================
--- test/CodeGen/ARM/Windows/structors.ll
+++ test/CodeGen/ARM/Windows/structors.ll
@@ -1,12 +1,18 @@
-; RUN: llc -mtriple thumbv7-windows-itanium -o - %s | FileCheck %s
+; RUN: llc -mtriple thumbv7-windows-itanium -o - %s \
+; RUN:   | FileCheck %s -check-prefix CHECK-WIN
+
+; RUN: llc -mtriple thumbv7-windows-gnu -o - %s \
+; RUN:   | FileCheck %s -check-prefix CHECK-GNU
 
 @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @function, i8* null }]
 
 define arm_aapcs_vfpcc void @function() {
 entry:
   ret void
 }
 
-; CHECK: .section .CRT$XCU,"dr"
-; CHECK: .long function
+; CHECK-WIN: .section .CRT$XCU,"dr"
+; CHECK-WIN: .long function
 
+; CHECK-GNU: .section .ctors,"dw"
+; CHECK-GNU: .long function
Index: test/CodeGen/ARM/Windows/pic.ll
===================================================================
--- test/CodeGen/ARM/Windows/pic.ll
+++ test/CodeGen/ARM/Windows/pic.ll
@@ -1,5 +1,8 @@
 ; RUN: llc -mtriple thumbv7-windows-itanium -relocation-model pic -filetype asm -o - %s \
-; RUN:    | FileCheck %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
 
@@ -9,8 +12,12 @@
   ret i8 %0
 }
 
-; CHECK-LABEL: return_external
-; CHECK: movw r0, :lower16:external
-; CHECK: movt r0, :upper16:external
-; CHECK: ldrb r0, [r0]
+; 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:external
+; CHECK-GNU: movt r0, :upper16:external
+; CHECK-GNU: ldrb r0, [r0]
Index: test/CodeGen/ARM/Windows/no-arm-mode.ll
===================================================================
--- test/CodeGen/ARM/Windows/no-arm-mode.ll
+++ test/CodeGen/ARM/Windows/no-arm-mode.ll
@@ -1,5 +1,10 @@
 ; RUN: not llc -mtriple=armv7-windows-itanium -mcpu=cortex-a9 -o /dev/null %s 2>&1 \
-; RUN:  | FileCheck %s
+; RUN:   | FileCheck %s -check-prefix CHECK-WIN
 
-; CHECK: does not support ARM mode execution
+; RUN: not llc -mtriple=armv7-windows-gnu -mcpu=cortex-a9 -o /dev/null %s 2>&1 \
+; RUN:   | FileCheck %s -check-prefix CHECK-GNU
+
+; CHECK-WIN: does not support ARM mode execution
+
+; CHECK-GNU: does not support ARM mode execution
 
Index: test/CodeGen/ARM/Windows/hard-float.ll
===================================================================
--- test/CodeGen/ARM/Windows/hard-float.ll
+++ test/CodeGen/ARM/Windows/hard-float.ll
@@ -1,10 +1,16 @@
-; RUN: llc -mtriple=thumbv7-windows-itanium -mcpu=cortex-a9 -o - %s | FileCheck %s
+; RUN: llc -mtriple=thumbv7-windows-itanium -mcpu=cortex-a9 -o - %s \
+; RUN:   | FileCheck %s -check-prefix CHECK-WIN
+
+; RUN: llc -mtriple=thumbv7-windows-gnu -mcpu=cortex-a9 -o - %s \
+; RUN:   | FileCheck %s -check-prefix CHECK-GNU
 
 define float @function(float %f, float %g) nounwind {
 entry:
   %h = fadd float %f, %g
   ret float %h
 }
 
-; CHECK: vadd.f32 s0, s0, s1
+; CHECK-WIN: vadd.f32 s0, s0, s1
+
+; CHECK-GNU: vadd.f32 s0, s0, s1
 
Index: lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
===================================================================
--- lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
+++ lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
@@ -279,7 +279,7 @@
   MCAsmInfo *MAI;
   if (TheTriple.isOSDarwin() || TheTriple.isOSBinFormatMachO())
     MAI = new ARMMCAsmInfoDarwin(TheTriple);
-  else if (TheTriple.isWindowsItaniumEnvironment())
+  else if (TheTriple.isWindowsItaniumEnvironment() || TheTriple.isOSCygMing())
     MAI = new ARMCOFFMCAsmInfoGNU();
   else if (TheTriple.isWindowsMSVCEnvironment())
     MAI = new ARMCOFFMCAsmInfoMicrosoft();
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to