Skip to content

Commit

Permalink
[mips] Correct .MIPS.abiflags fp_abi field for -mfpxx and without .mo…
Browse files Browse the repository at this point in the history
…dule

Summary: Previously all the test cases set it after initialization with '.module fp=xx'.

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

llvm-svn: 213071
  • Loading branch information
dsandersllvm committed Jul 15, 2014
1 parent 53bc7a3 commit a6e125f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class MipsAsmParser : public MCTargetAsmParser {
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);
Expand Down
4 changes: 4 additions & 0 deletions llvm/test/MC/Mips/mips_abi_flags_xx.s
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a6e125f

Please sign in to comment.