From a6e125f07e7df0db2f828e0ce49f92f5b48a20bb Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Tue, 15 Jul 2014 15:31:39 +0000 Subject: [PATCH] [mips] Correct .MIPS.abiflags fp_abi field for -mfpxx and without .module Summary: Previously all the test cases set it after initialization with '.module fp=xx'. Differential Revision: http://reviews.llvm.org/D4489 llvm-svn: 213071 --- llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp | 2 +- llvm/test/MC/Mips/mips_abi_flags_xx.s | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp index 765ac02df13b..2bedb5960ffb 100644 --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -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); diff --git a/llvm/test/MC/Mips/mips_abi_flags_xx.s b/llvm/test/MC/Mips/mips_abi_flags_xx.s index 9192d0c4800b..d71eef373320 100644 --- a/llvm/test/MC/Mips/mips_abi_flags_xx.s +++ b/llvm/test/MC/Mips/mips_abi_flags_xx.s @@ -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.