[mips] Correct .MIPS.abiflags fp_abi field for -mfpxx and without .module
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 15 Jul 2014 15:31:39 +0000 (15:31 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 15 Jul 2014 15:31:39 +0000 (15:31 +0000)
Summary: Previously all the test cases set it after initialization with '.module fp=xx'.

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

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

lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/mips_abi_flags_xx.s

index 765ac02df13b45080b0c795814ef76559553cce2..2bedb5960ffb8537a53a3bed76959847ad78592e 100644 (file)
@@ -252,7 +252,7 @@ public:
   bool isABI_N32() const { return STI.getFeatureBits() & Mips::FeatureN32; }
   bool isABI_N64() const { return STI.getFeatureBits() & Mips::FeatureN64; }
   bool isABI_O32() const { return STI.getFeatureBits() & Mips::FeatureO32; }
-  bool isABI_FPXX() const { return false; } // TODO: add check for FeatureXX
+  bool isABI_FPXX() const { return STI.getFeatureBits() & Mips::FeatureFPXX; }
 
   bool useOddSPReg() const {
     return !(STI.getFeatureBits() & Mips::FeatureNoOddSPReg);
index 9192d0c4800b2cc4d77844b75f00433a850e3466..d71eef37332055f4d83f5d13070676302744a9fc 100644 (file)
@@ -5,6 +5,10 @@
 # RUN:   llvm-readobj -sections -section-data -section-relocations - | \
 # RUN:     FileCheck %s -check-prefix=CHECK-OBJ
 
+# RUN: llvm-mc /dev/null -arch=mips -mcpu=mips32 -mattr=fpxx -filetype=obj -o - | \
+# RUN:   llvm-readobj -sections -section-data -section-relocations - | \
+# RUN:     FileCheck %s -check-prefix=CHECK-OBJ
+
 # CHECK-ASM: .module fp=xx
 
 # Checking if the Mips.abiflags were correctly emitted.