]> granicus.if.org Git - llvm/commitdiff
[mips] Don't derive the default ABI from the CPU in the backend.
authorDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 23 Jun 2016 12:42:53 +0000 (12:42 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Thu, 23 Jun 2016 12:42:53 +0000 (12:42 +0000)
Summary:
The backend has no reason to behave like a driver and should generally do
as it's told (and error out if it can't) instead of trying to figure out
what the API user meant. The default ABI is still derived from the arch
component as a concession to backwards compatibility.

API-users that previously passed an explicit CPU and a triple that was
inconsistent with the CPU (e.g. mips-linux-gnu and mips64r2) may get a
different ABI to what they got before. However, it's expected that there
are no such users on the basis that CodeGen has been asserting that the
triple is consistent with the selected ABI for several releases. API-users
that were consistent or passed '' or 'generic' as the CPU will see no
difference.

Reviewers: sdardis, rafael

Subscribers: rafael, dsanders, sdardis, llvm-commits

Differential Revision: http://reviews.llvm.org/D21466

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273557 91177308-0d34-0410-b5e6-96231b3b80d8

33 files changed:
lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp
test/CodeGen/Mips/Fast-ISel/check-disabled-mcpus.ll
test/CodeGen/Mips/adjust-callstack-sp.ll
test/CodeGen/Mips/compactbranches/compact-branches.ll
test/CodeGen/Mips/elf_eflags.ll
test/CodeGen/Mips/fcmp.ll
test/CodeGen/Mips/interrupt-attr-64-error.ll
test/CodeGen/Mips/llvm-ir/add.ll
test/CodeGen/Mips/llvm-ir/and.ll
test/CodeGen/Mips/llvm-ir/lh_lhu.ll
test/CodeGen/Mips/llvm-ir/mul.ll
test/CodeGen/Mips/llvm-ir/not.ll
test/CodeGen/Mips/llvm-ir/or.ll
test/CodeGen/Mips/llvm-ir/sdiv.ll
test/CodeGen/Mips/llvm-ir/srem.ll
test/CodeGen/Mips/llvm-ir/udiv.ll
test/CodeGen/Mips/llvm-ir/urem.ll
test/CodeGen/Mips/llvm-ir/xor.ll
test/CodeGen/Mips/madd-msub.ll
test/CodeGen/Mips/mips64extins.ll
test/CodeGen/Mips/mips64r6/compatibility.ll
test/CodeGen/Mips/zeroreg.ll
test/MC/Mips/elf_eflags.s
test/MC/Mips/mips64/abiflags.s
test/MC/Mips/mips64r2/abi-bad.s
test/MC/Mips/mips64r2/abiflags.s
test/MC/Mips/mips64r3/abi-bad.s
test/MC/Mips/mips64r3/abiflags.s
test/MC/Mips/mips64r5/abi-bad.s
test/MC/Mips/mips64r5/abiflags.s
test/MC/Mips/mips_abi_flags_xx.s
test/MC/Mips/nooddspreg-cmdarg.s
test/MC/Mips/nooddspreg.s

index 0a4e12cb5deed672cf0ae250bfb061c717ca4ae9..3cf632e789deaa2aa3bd3e79c1aaf9b2d0ee023c 100644 (file)
@@ -58,34 +58,9 @@ MipsABIInfo MipsABIInfo::computeTargetABI(const Triple &TT, StringRef CPU,
   else if (!Options.getABIName().empty())
     llvm_unreachable("Unknown ABI option for MIPS");
 
-  // FIXME: This shares code with the selectMipsCPU routine that's
-  // used and not shared in a couple of other places. This needs unifying
-  // at some level.
-  if (CPU.empty() || CPU == "generic") {
-    if (TT.getArch() == Triple::mips || TT.getArch() == Triple::mipsel)
-      CPU = "mips32";
-    else
-      CPU = "mips64";
-  }
-
-  return StringSwitch<MipsABIInfo>(CPU)
-      .Case("mips1", MipsABIInfo::O32())
-      .Case("mips2", MipsABIInfo::O32())
-      .Case("mips32", MipsABIInfo::O32())
-      .Case("mips32r2", MipsABIInfo::O32())
-      .Case("mips32r3", MipsABIInfo::O32())
-      .Case("mips32r5", MipsABIInfo::O32())
-      .Case("mips32r6", MipsABIInfo::O32())
-      .Case("mips3", MipsABIInfo::N64())
-      .Case("mips4", MipsABIInfo::N64())
-      .Case("mips5", MipsABIInfo::N64())
-      .Case("mips64", MipsABIInfo::N64())
-      .Case("mips64r2", MipsABIInfo::N64())
-      .Case("mips64r3", MipsABIInfo::N64())
-      .Case("mips64r5", MipsABIInfo::N64())
-      .Case("mips64r6", MipsABIInfo::N64())
-      .Case("octeon", MipsABIInfo::N64())
-      .Default(MipsABIInfo::Unknown());
+  if (TT.getArch() == Triple::mips64 || TT.getArch() == Triple::mips64el)
+    return MipsABIInfo::N64();
+  return MipsABIInfo::O32();
 }
 
 unsigned MipsABIInfo::GetStackPtr() const {
index 00a27817a3d676800a78bd2774a26a0b48505fd5..290e4ecb740557eaa6ea162d0e95c99f9319abf5 100644 (file)
@@ -1,8 +1,8 @@
 ; RUN: llc -march=mips -mcpu=mips2 -O0 -relocation-model=pic \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
-; RUN: llc -march=mips -mcpu=mips3 -O0 -relocation-model=pic \
+; RUN: llc -march=mips -mcpu=mips3 -O0 -relocation-model=pic -target-abi n64 \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
-; RUN: llc -march=mips -mcpu=mips4 -O0 -relocation-model=pic \
+; RUN: llc -march=mips -mcpu=mips4 -O0 -relocation-model=pic -target-abi n64 \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
 
 ; RUN: llc -march=mips -mcpu=mips32r6 -O0 -relocation-model=pic \
 ; RUN: llc -march=mips -mcpu=mips32r2 -mattr=+micromips -O0 -relocation-model=pic \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
 
-; RUN: llc -march=mips -mcpu=mips64 -O0 -relocation-model=pic \
+; RUN: llc -march=mips -mcpu=mips64 -O0 -relocation-model=pic -target-abi n64 \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
-; RUN: llc -march=mips -mcpu=mips64r2 -O0 -relocation-model=pic \
+; RUN: llc -march=mips -mcpu=mips64r2 -O0 -relocation-model=pic -target-abi n64 \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
-; RUN: llc -march=mips -mcpu=mips64r3 -O0 -relocation-model=pic \
+; RUN: llc -march=mips -mcpu=mips64r3 -O0 -relocation-model=pic -target-abi n64 \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
-; RUN: llc -march=mips -mcpu=mips64r5 -O0 -relocation-model=pic \
+; RUN: llc -march=mips -mcpu=mips64r5 -O0 -relocation-model=pic -target-abi n64 \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
 ; RUN: llc -march=mips -mcpu=mips32r6 -O0 -relocation-model=pic \
 ; RUN:     -fast-isel-verbose <%s 2>&1 | FileCheck %s
index e4afcd835005093c36de22858022ea1f390ee97e..32d77ac19ae6b1f225d31d40e772579ee9973182 100644 (file)
@@ -2,18 +2,18 @@
 ; RUN: llc < %s -march=mips -mcpu=mips2 | FileCheck %s -check-prefix=GP32
 ; RUN: llc < %s -march=mips -mcpu=mips32 | FileCheck %s -check-prefix=GP32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 | FileCheck %s -check-prefix=GP32
-; RUN: llc < %s -march=mips -mcpu=mips3 | FileCheck %s -check-prefix=GP64
-; RUN: llc < %s -march=mips -mcpu=mips64 | FileCheck %s -check-prefix=GP64
-; RUN: llc < %s -march=mips -mcpu=mips64r6 | FileCheck %s -check-prefix=GP64
+; RUN: llc < %s -march=mips -mcpu=mips3 -target-abi n64 | FileCheck %s -check-prefix=GP64
+; RUN: llc < %s -march=mips -mcpu=mips64 -target-abi n64 | FileCheck %s -check-prefix=GP64
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 | FileCheck %s -check-prefix=GP64
 
 declare void @bar(i32*)
 
 define void @foo(i32 %sz) {
   ; ALL-LABEL: foo:
 
-    ; M16-NOT:        addiu     $sp, 0 # 16 bit inst
-    ; GP32-NOT:       addiu     $sp, $sp, 0
-    ; GP64-NOT:       daddiu    $sp, $sp, 0
+  ; M16-NOT:        addiu     $sp, 0 # 16 bit inst
+  ; GP32-NOT:       addiu     $sp, $sp, 0
+  ; GP64-NOT:       daddiu    $sp, $sp, 0
   %a = alloca i32, i32 %sz
   call void @bar(i32* %a)
   ret void
index a7e92195ee9dca95861446a853ea860c143816f3..75ff8a0bbcbb89be738d5eddd176794ea71a4ff0 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llc -march=mipsel -mcpu=mips32r6 -relocation-model=static -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=STATIC32
-; RUN: llc -march=mipsel -mcpu=mips64r6 -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=PIC
+; RUN: llc -march=mipsel -mcpu=mips64r6 -target-abi n64 -disable-mips-delay-filler < %s | FileCheck %s -check-prefix=PIC
 
 ; Function Attrs: nounwind
 define void @l()  {
index 00d8584fdad2c427c012afc4a4402957bd0e9460..40910d8987d2e9dd44cf01706d175f7bf5249064 100644 (file)
 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MICROMIPS %s
 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+micromips %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MICROMIPS_PIC %s
 
-; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips4 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64 %s
-; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips4 %s -o - | FileCheck -check-prefix=CHECK-LE64_PIC %s
+; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips4 -target-abi n64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64 %s
+; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips4 -target-abi n64 %s -o - | FileCheck -check-prefix=CHECK-LE64_PIC %s
 
-; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64 %s
-; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 %s -o - | FileCheck -check-prefix=CHECK-LE64_PIC %s
-; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64R2 %s
-; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 %s -o - | FileCheck -check-prefix=CHECK-LE64R2_PIC %s
+; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 -target-abi n64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64 %s
+; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64 -target-abi n64 %s -o - | FileCheck -check-prefix=CHECK-LE64_PIC %s
+; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 -target-abi n64 -relocation-model=static %s -o - | FileCheck -check-prefix=CHECK-LE64R2 %s
+; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips64r2 -target-abi n64 %s -o - | FileCheck -check-prefix=CHECK-LE64R2_PIC %s
 
 ; RUN: llc -mtriple mipsel-unknown-linux -mcpu=mips32r2 -mattr=+mips16 -relocation-model=pic %s -o - | FileCheck -check-prefix=CHECK-LE32R2-MIPS16 %s
 
index 59e847b8844a90725cada073577fadabee76228a..9f09929710fba99f9b983b178884a1094c00cd43 100644 (file)
@@ -17,7 +17,7 @@
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MMR6 \
 ; RUN:    -check-prefix=MM32R6
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips | FileCheck %s \
+; RUN: llc < %s -march=mips64 -mcpu=mips64r6 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MMR6 \
 ; RUN:    -check-prefix=MM64R6
 
index 830c199d91d9ba9f2ca57109322298190920a1ca..9626bda45f5149828a1b50fdd8a66840491e23e5 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: not llc -mcpu=mips64r6 -march=mipsel -relocation-model=static < %s 2>%t
+; RUN: not llc -mcpu=mips64r6 -march=mipsel -target-abi n64 -relocation-model=static < %s 2>%t
 ; RUN: FileCheck %s < %t
 
 ; CHECK: LLVM ERROR: "interrupt" attribute is only supported for the O32 ABI on MIPS32R2+ at the present time.
index 2d26ce0af6eaa442dd15c1c298a03a94de025e18..358e4cad94e034a47c8d2c66c9c4739547cbf26e 100644 (file)
@@ -28,7 +28,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips -O2 | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -O2 | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips -O2 | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM64
 
 define signext i1 @add_i1(i1 signext %a, i1 signext %b) {
index 9574d57c9ff3fc0b7bfbf43fe36f245c3924c28e..96d72a0f9c4747eab0e327d3e6979e332c18bda8 100644 (file)
@@ -28,7 +28,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM64
 
 define signext i1 @and_i1(i1 signext %a, i1 signext %b) {
index 85527b3cd85fa3e7d74805303993066a8bcf7684..fadcfdb0fb4fe9e29920161aa5eb6b3ef00892df 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llc < %s -march=mips -mcpu=mips32r2 -mattr=+micromips -relocation-model=pic | FileCheck %s
 ; RUN: llc < %s -march=mips -mcpu=mips32r3 -mattr=+micromips -relocation-model=pic | FileCheck %s
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic | FileCheck %s
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -relocation-model=pic | FileCheck %s
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips -relocation-model=pic | FileCheck %s
 
 @us = global i16 0, align 2
 
index fa1d200320f4a43f2e9c0bd3e5b14edc6034944f..7dff49a6eff94084738c124e14538a97851cdd89 100644 (file)
@@ -26,7 +26,7 @@
 ; RUN:    -check-prefix=MM32 -check-prefix=MM32R3
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=MM32 -check-prefix=MM32R6
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -target-abi n64 -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=64R6
 
 define signext i1 @mul_i1(i1 signext %a, i1 signext %b) {
index 531a1b0447dfb11c49f65ce9750dcf39bd0f0d0c..bc8d9c06b475d664e9c555435c341eebdf39794f 100644 (file)
@@ -28,7 +28,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM64
 
 define signext i1 @not_i1(i1 signext %a) {
index a83992839cd4a88253c6b52b38e2c240d9ef0bf4..2975c40db38181275400220accbccaaf012dd5a0 100644 (file)
@@ -28,7 +28,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM64
 
 define signext i1 @or_i1(i1 signext %a, i1 signext %b) {
index 3f52d39c3309fd6e5fef25ea0dd4eb5bd91595c7..f6eefc7a7fdfe2864ce8da15fff219b3f718e6b2 100644 (file)
@@ -43,7 +43,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MMR3 -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -target-abi n64 -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM64
 
 define signext i1 @sdiv_i1(i1 signext %a, i1 signext %b) {
index e193ab84b5c8e4a6b1c014778c40c99f700ca118..95ea83bc07d500b5bdebaddc89e3871eaaad58d0 100644 (file)
@@ -43,7 +43,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MMR3 -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM64
 
 define signext i1 @srem_i1(i1 signext %a, i1 signext %b) {
index 2e448c1581edb7627df52cc355dde74cd803fdf5..aea189f248cfbdcb1cfd54c9ccaa204292d53ec6 100644 (file)
@@ -30,7 +30,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MMR3 -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM64
 
 define zeroext i1 @udiv_i1(i1 zeroext %a, i1 zeroext %b) {
index 1b082f5c1e34841e0011fe50bcf439f42ddb8035..ae80c79b409fa6afbeca4c72d6db292a3dfe166b 100644 (file)
@@ -43,7 +43,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MMR3 -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips -relocation-model=pic | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips -relocation-model=pic | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MMR6 -check-prefix=MM64
 
 define signext i1 @urem_i1(i1 signext %a, i1 signext %b) {
index 1104ba1b5b4ed1189b9a0c3c8aaabe27827c76ac..d8ed6e8810e641d826c6d1da74bb6da763936d0c 100644 (file)
@@ -28,7 +28,7 @@
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM32
 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM32
-; RUN: llc < %s -march=mips -mcpu=mips64r6 -mattr=+micromips | FileCheck %s \
+; RUN: llc < %s -march=mips -mcpu=mips64r6 -target-abi n64 -mattr=+micromips | FileCheck %s \
 ; RUN:    -check-prefix=ALL -check-prefix=MM -check-prefix=MM64
 
 define signext i1 @xor_i1(i1 signext %a, i1 signext %b) {
index 667676de5f337bfb7da4c895b378d50d89ea8c5a..05091751a4817c3d92a13193c39c17aeb8916c8a 100644 (file)
@@ -2,9 +2,9 @@
 ; RUN: llc -march=mips -mcpu=mips32r2 < %s | FileCheck %s -check-prefix=ALL -check-prefix=32
 ; RUN: llc -march=mips -mcpu=mips32r6 < %s | FileCheck %s -check-prefix=ALL -check-prefix=32R6
 ; RUN: llc -march=mips -mcpu=mips32 -mattr=dsp < %s | FileCheck %s -check-prefix=DSP
-; RUN: llc -march=mips -mcpu=mips64   < %s | FileCheck %s -check-prefix=ALL -check-prefix=64
-; RUN: llc -march=mips -mcpu=mips64r2 < %s | FileCheck %s -check-prefix=ALL -check-prefix=64
-; RUN: llc -march=mips -mcpu=mips64r6 < %s | FileCheck %s -check-prefix=ALL -check-prefix=64R6
+; RUN: llc -march=mips -mcpu=mips64   -target-abi n64 < %s | FileCheck %s -check-prefix=ALL -check-prefix=64
+; RUN: llc -march=mips -mcpu=mips64r2 -target-abi n64 < %s | FileCheck %s -check-prefix=ALL -check-prefix=64
+; RUN: llc -march=mips -mcpu=mips64r6 -target-abi n64 < %s | FileCheck %s -check-prefix=ALL -check-prefix=64R6
 
 ; FIXME: The MIPS16 test should check its output
 ; RUN: llc -march=mips -mattr=mips16 < %s
index bf68bbd79dd134bc77b51c9271e74931fdfb021d..7876266fb856a02cce5ae8e7c29bf3c4ff723763 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc  < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 | FileCheck %s 
+; RUN: llc < %s -march=mips64el -mcpu=mips64r2 -target-abi=n64 | FileCheck %s
 
 define i64 @dext(i64 %i) nounwind readnone {
 entry:
index 429f68d784bbfb8b72383de13cc440f3b3e3b258..174f4ce1771ad5a9bbd2e9ff36c31a3570568941 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: llc -march=mipsel -mcpu=mips64r6 < %s | FileCheck %s
-; RUN: not llc -march=mipsel -mcpu=mips64r6 -mattr=+dsp < %s 2>&1 | FileCheck --check-prefix=DSP %s
+; RUN: llc -march=mipsel -mcpu=mips64r6 -target-abi n64 < %s | FileCheck %s
+; RUN: not llc -march=mipsel -mcpu=mips64r6 -target-abi n64 -mattr=+dsp < %s 2>&1 | FileCheck --check-prefix=DSP %s
 
 ; CHECK: foo:
 ; DSP: MIPS64r6 is not compatible with the DSP ASE
index 2c1ff5a8f1aaea58465ec506797dad113e38671a..e3b1d39a7ea070856ff93952c619f5061f55b7c7 100644 (file)
@@ -1,10 +1,10 @@
 ; RUN: llc < %s -march=mipsel -mcpu=mips32   -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=32-CMOV
 ; RUN: llc < %s -march=mipsel -mcpu=mips32r2 -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=32-CMOV
 ; RUN: llc < %s -march=mipsel -mcpu=mips32r6 -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=32R6
-; RUN: llc < %s -march=mipsel -mcpu=mips4    -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=64-CMOV
-; RUN: llc < %s -march=mipsel -mcpu=mips64   -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=64-CMOV
-; RUN: llc < %s -march=mipsel -mcpu=mips64r2 -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=64-CMOV
-; RUN: llc < %s -march=mipsel -mcpu=mips64r6 -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=64R6
+; RUN: llc < %s -march=mipsel -mcpu=mips4    -target-abi n64 -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=64-CMOV
+; RUN: llc < %s -march=mipsel -mcpu=mips64   -target-abi n64 -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=64-CMOV
+; RUN: llc < %s -march=mipsel -mcpu=mips64r2 -target-abi n64 -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=64-CMOV
+; RUN: llc < %s -march=mipsel -mcpu=mips64r6 -target-abi n64 -relocation-model=pic | FileCheck %s -check-prefix=ALL -check-prefix=64R6
 
 @g1 = external global i32
 
index e994cce1c2e1f6fd39d66680c0e1c172983c6abc..244b07db25fac0ee00fb3102580fcf92d593133d 100644 (file)
@@ -1,26 +1,26 @@
 # These *MUST* match the output of 'gcc -c' compiled with the same triple and
 # corresponding options (-mcpu=mips32 -> -mips32 for example).
 
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r6 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R6 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r6 -target-abi n64 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R6 %s
 # MIPSEL-MIPS64R6: Flags [ (0xA0000406)
 
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r6 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R6-NAN2008 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r6 -target-abi n64 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R6-NAN2008 %s
 # MIPSEL-MIPS64R6-NAN2008: Flags [ (0xA0000406)
 
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r2 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2 %s
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r3 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2 %s
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r5 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r2 -target-abi n64 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r3 -target-abi n64 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r5 -target-abi n64 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2 %s
 # MIPSEL-MIPS64R2: Flags [ (0x80000006)
 
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r2 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2-NAN2008 %s
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r3 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2-NAN2008 %s
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r5 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2-NAN2008 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r2 -target-abi n64 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2-NAN2008 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r3 -target-abi n64 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2-NAN2008 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64r5 -target-abi n64 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64R2-NAN2008 %s
 # MIPSEL-MIPS64R2-NAN2008: Flags [ (0x80000406)
 
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64 -target-abi n64 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64 %s
 # MIPSEL-MIPS64: Flags [ (0x60000006)
 
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64-NAN2008 %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips64 -target-abi n64 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS64-NAN2008 %s
 # MIPSEL-MIPS64-NAN2008: Flags [ (0x60000406)
 
 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32r6 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-MIPS32R6 %s
 # RUN: llvm-mc -filetype=obj -triple mips64el-unknown-linux -mcpu=mips64 -mattr=+nan2008 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPS64EL-MIPS64-NAN2008 %s
 # MIPS64EL-MIPS64-NAN2008: Flags [ (0x60000406)
 
-# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=octeon %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-OCTEON %s
+# RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=octeon -target-abi n64 %s -o -| llvm-readobj -h | FileCheck --check-prefix=MIPSEL-OCTEON %s
 # MIPSEL-OCTEON: Flags [ (0x808B0006)
index ecaffcc3465c19fd9e0f3da447de11c154f814e9..10c768942a1ea5dc9baa5b8ac6a46a2b3eae996b 100644 (file)
@@ -1,7 +1,7 @@
-# RUN: llvm-mc %s -arch=mips -mcpu=mips64 | \
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n64 | \
 # RUN:   FileCheck %s -check-prefix=CHECK-ASM
 #
-# RUN: llvm-mc %s -arch=mips -mcpu=mips64 -filetype=obj -o - | \
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n64 -filetype=obj -o - | \
 # RUN:   llvm-readobj -sections -section-data -section-relocations - | \
 # RUN:     FileCheck %s -check-prefix=CHECK-OBJ
 
index 7070d4572471632d69a19f6b84823c57162ff599..78748804c429826f5e74014ce245dcd6d0d3d892 100644 (file)
@@ -1,4 +1,4 @@
-# RUN: not llvm-mc %s -triple mips-unknown-linux -mcpu=mips64r2 2>&1 | FileCheck %s
+# RUN: not llvm-mc %s -triple mips-unknown-linux -mcpu=mips64r2 -target-abi n64 2>&1 | FileCheck %s
         .set fp=xx
 # CHECK: error: '.set fp=xx' requires the O32 ABI
 # CHECK: .set fp=xx
index dc4a1e946e3efc45115ff990f18d6c5b42c048d9..ece133f8f0e217c8ca262a24892f0c7083d4e884 100644 (file)
@@ -1,7 +1,7 @@
-# RUN: llvm-mc %s -arch=mips -mcpu=mips64r2 | \
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64r2 -target-abi n64 | \
 # RUN:   FileCheck %s -check-prefix=CHECK-ASM
 #
-# RUN: llvm-mc %s -arch=mips -mcpu=mips64r2 -filetype=obj -o - | \
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64r2 -target-abi n64 -filetype=obj -o - | \
 # RUN:   llvm-readobj -sections -section-data -section-relocations - | \
 # RUN:     FileCheck %s -check-prefix=CHECK-OBJ
 
index 7691601bf29b4a616ae1abac54e628e27aeacb8e..0f38fde5bf385dab4d95b52062004792995d10f1 100644 (file)
@@ -1,4 +1,4 @@
-# RUN: not llvm-mc %s -triple mips-unknown-linux -mcpu=mips64r3 2>&1 | FileCheck %s
+# RUN: not llvm-mc %s -triple mips-unknown-linux -mcpu=mips64r3 -target-abi n64 2>&1 | FileCheck %s
         .set fp=xx
 # CHECK: error: '.set fp=xx' requires the O32 ABI
 # CHECK: .set fp=xx
index e89be29ca2b9ccf33b56281f1c9df9db618e9508..e1461ccb3cbf9920d07dd7ad13f1b8f4d1557c5f 100644 (file)
@@ -1,7 +1,7 @@
-# RUN: llvm-mc %s -arch=mips -mcpu=mips64r3 | \
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64r3 -target-abi n64 | \
 # RUN:   FileCheck %s -check-prefix=CHECK-ASM
 #
-# RUN: llvm-mc %s -arch=mips -mcpu=mips64r3 -filetype=obj -o - | \
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64r3 -target-abi n64 -filetype=obj -o - | \
 # RUN:   llvm-readobj -sections -section-data -section-relocations - | \
 # RUN:     FileCheck %s -check-prefix=CHECK-OBJ
 
index c6bb29a8b20d0b838dd6475926a79016ff2950b6..b3d0588f986163c5a943745668b3a277818455eb 100644 (file)
@@ -1,4 +1,4 @@
-# RUN: not llvm-mc %s -triple mips-unknown-linux -mcpu=mips64r5 2>&1 | FileCheck %s
+# RUN: not llvm-mc %s -triple mips-unknown-linux -mcpu=mips64r5 -target-abi n64 2>&1 | FileCheck %s
         .set fp=xx
 # CHECK: error: '.set fp=xx' requires the O32 ABI
 # CHECK: .set fp=xx
index 43a5fe618bccd082a487f14e7cc9c73baef970a1..7972f5837de20a185a4b672c43f63f1097d4f057 100644 (file)
@@ -1,7 +1,7 @@
-# RUN: llvm-mc %s -arch=mips -mcpu=mips64r5 | \
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64r5 -target-abi n64 | \
 # RUN:   FileCheck %s -check-prefix=CHECK-ASM
 #
-# RUN: llvm-mc %s -arch=mips -mcpu=mips64r5 -filetype=obj -o - | \
+# RUN: llvm-mc %s -arch=mips -mcpu=mips64r5 -target-abi n64 -filetype=obj -o - | \
 # RUN:   llvm-readobj -sections -section-data -section-relocations - | \
 # RUN:     FileCheck %s -check-prefix=CHECK-OBJ
 
index 9cbdc1235d4af14e9f2a1831b37005724097e74d..9e92604d7b0c18d98f3b44889d538c71412f9306 100644 (file)
@@ -16,7 +16,7 @@
 # RUN:   FileCheck %s -check-prefix=CHECK-OBJ -check-prefix=CHECK-OBJ-32R6 \
 # RUN:   -check-prefix=CHECK-OBJ-MIPS
 
-# RUN: llvm-mc /dev/null -arch=mips -mcpu=octeon -filetype=obj -o - | \
+# RUN: llvm-mc /dev/null -arch=mips -mcpu=octeon -target-abi n64 -filetype=obj -o - | \
 # RUN:   llvm-readobj -sections -section-data -section-relocations -mips-abi-flags - | \
 # RUN:   FileCheck %s -check-prefix=CHECK-OBJ -check-prefix=CHECK-OBJ-64R2 \
 # RUN:   -check-prefix=CHECK-OBJ-OCTEON
index 74c9d4da1967237448d815b8972d36b17b8eb998..28ac7b723343f2172990282198625ca9be5c5883 100644 (file)
@@ -8,7 +8,7 @@
 # RUN: not llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n32 -mattr=+nooddspreg 2> %t0
 # RUN: FileCheck %s -check-prefix=INVALID < %t0
 #
-# RUN: not llvm-mc %s -arch=mips -mcpu=mips64 -mattr=+nooddspreg 2> %t0
+# RUN: not llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n64 -mattr=+nooddspreg 2> %t0
 # RUN: FileCheck %s -check-prefix=INVALID < %t0
 #
 # CHECK-ASM-NOT: .module nooddspreg
index 6332b7042987efa000746e224e8063de6bbba5d9..2b5154d427b20ec38395c66a70baf1e20b75ac84 100644 (file)
@@ -8,7 +8,7 @@
 # RUN: not llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n32 2> %t1
 # RUN: FileCheck %s -check-prefix=INVALID < %t1
 #
-# RUN: not llvm-mc %s -arch=mips -mcpu=mips64 2> %t2
+# RUN: not llvm-mc %s -arch=mips -mcpu=mips64 -target-abi n64 2> %t2
 # RUN: FileCheck %s -check-prefix=INVALID < %t2
 #
 # CHECK-ASM: .module nooddspreg