This revision was automatically updated to reflect the committed changes.
Closed by commit rL340391: [clang][mips] Set __mips_fpr correctly for -mfpxx
(authored by smaksimovic, committed by ).
Herald added subscribers: llvm-commits, jrtc27.
Changed prior to commit:
atanasyan accepted this revision.
atanasyan added a comment.
This revision is now accepted and ready to land.
LGTM
https://reviews.llvm.org/D50557
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
smaksimovic updated this revision to Diff 161690.
smaksimovic added a comment.
Expanded a piece of code using switch cases as suggested.
https://reviews.llvm.org/D50557
Files:
include/clang/Basic/DiagnosticCommonKinds.td
lib/Basic/Targets/Mips.cpp
lib/Basic/Targets/Mips.h
atanasyan added inline comments.
Comment at: lib/Basic/Targets/Mips.cpp:141
+ Twine(32 / (FPMode == FP64 || IsSingleFloat ? 1 : 2)));
if (IsMips16)
What do you think about this variant of the code? It's longer, but imho looks
more
smaksimovic added inline comments.
Comment at: lib/Basic/Targets/Mips.cpp:62
+unsigned MipsTargetInfo::getISARev(const std::string& CPU) const {
+ return llvm::StringSwitch(getCPU())
atanasyan wrote:
> The CPU argument looks unused. We can either remove it or
smaksimovic updated this revision to Diff 161233.
smaksimovic added a comment.
Added test cases.
https://reviews.llvm.org/D50557
Files:
include/clang/Basic/DiagnosticCommonKinds.td
lib/Basic/Targets/Mips.cpp
lib/Basic/Targets/Mips.h
test/Preprocessor/init.c
Index:
atanasyan added a comment.
Any test cases?
Comment at: lib/Basic/Targets/Mips.cpp:62
+unsigned MipsTargetInfo::getISARev(const std::string& CPU) const {
+ return llvm::StringSwitch(getCPU())
The CPU argument looks unused. We can either remove it or make
smaksimovic created this revision.
smaksimovic added a reviewer: atanasyan.
Herald added subscribers: arichardson, sdardis.
Set __mips_fpr to 0 if o32 ABI is used with either -mfpxx or none of -mfp32,
-mfpxx, -mfp64 being specified.
Introduce additional checks:
- -mfpxx is only to be used in