[PATCH] D50557: [clang][mips] Set __mips_fpr correctly for -mfpxx

2018-08-22 Thread Stefan Maksimovic via Phabricator via cfe-commits
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:

[PATCH] D50557: [clang][mips] Set __mips_fpr correctly for -mfpxx

2018-08-21 Thread Stefan Maksimovic via Phabricator via cfe-commits
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

[PATCH] D50557: [clang][mips] Set __mips_fpr correctly for -mfpxx

2018-08-17 Thread Stefan Maksimovic via Phabricator via cfe-commits
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

[PATCH] D50557: [clang][mips] Set __mips_fpr correctly for -mfpxx

2018-08-17 Thread Stefan Maksimovic via Phabricator via cfe-commits
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:

[PATCH] D50557: [clang][mips] Set __mips_fpr correctly for -mfpxx

2018-08-10 Thread Stefan Maksimovic via Phabricator via cfe-commits
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

[PATCH] D49289: [mips64][clang] Provide the signext attribute for i32 return values

2018-07-30 Thread Stefan Maksimovic via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC338239: [mips64][clang] Provide the signext attribute for i32 return values (authored by smaksimovic, committed by ). Repository: rC Clang https://reviews.llvm.org/D49289 Files:

[PATCH] D49289: [mips64][clang] Provide the signext attribute for i32 return values

2018-07-13 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic created this revision. smaksimovic added a reviewer: atanasyan. Herald added subscribers: arichardson, sdardis. Patch for the backend part of the problem here: https://reviews.llvm.org/D48374 https://reviews.llvm.org/D49289 Files: lib/CodeGen/TargetInfo.cpp Index:

[PATCH] D33401: [mips] Add runtime options to enable/disable generation of madd.fmt, msub.fmt

2017-06-06 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic updated this revision to Diff 101562. smaksimovic added a comment. Provided define checks, one when the target feature is present, other when the feature isn't provided at all (default). https://reviews.llvm.org/D33401 Files: include/clang/Driver/Options.td

[PATCH] D33401: [mips] Add runtime options to enable/disable generation of madd.fmt, msub.fmt

2017-06-01 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic updated this revision to Diff 101010. smaksimovic added a comment. Changed feature name from madd4 to nomadd4 to reflect the change from the dependency. Added macro definition when +nomadd4 is present. https://reviews.llvm.org/D33401 Files: include/clang/Driver/Options.td

[PATCH] D33401: [mips] Add runtime options to enable/disable generation of madd.fmt, msub.fmt

2017-05-22 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic created this revision. Herald added a subscriber: arichardson. Added options to clang are -mmadd4 and -mno-madd4, used to enable or disable generation of madd.fmt and similar instructions respectively, as per GCC. https://reviews.llvm.org/D33401 Files:

[PATCH] D32900: [mips] Impose a threshold for coercion of aggregates

2017-05-09 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic updated this revision to Diff 98269. smaksimovic added a comment. Herald added a subscriber: krytarowski. Thanks, fixed. https://reviews.llvm.org/D32900 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/mips-aggregate-arg.c Index: test/CodeGen/mips-aggregate-arg.c

[PATCH] D32900: [mips] Impose a threshold for coercion of aggregates

2017-05-05 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic created this revision. Herald added a subscriber: arichardson. Modified MipsABIInfo::classifyArgumentType so that it now coerces aggregate structures only if the size of said aggregate is less than 16/64 bytes, depending on the ABI. https://reviews.llvm.org/D32900 Files:

[PATCH] D31082: [mips][msa] Range adjustment for ldi_b builtin function operand

2017-03-21 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic updated this revision to Diff 92439. smaksimovic added a comment. Added a new test to test/CodeGen/builtins-mips-msa.c, covering the new extended range for ldi.b. https://reviews.llvm.org/D31082 Files: lib/Sema/SemaChecking.cpp test/CodeGen/builtins-mips-msa-error.c

[PATCH] D31082: [mips][msa] Range adjustment for ldi_b builtin function operand

2017-03-17 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic created this revision. Reasoning behind this change was allowing the function to accept all values from range [-128, 255] since all of them can be encoded in an 8bit wide value. This differs from the prior state where only range [-128, 127] was accepted, where values were assumed to

[PATCH] D30693: [mips][msa] Remove range checks for non-immediate sld.[bhwd] instructions

2017-03-09 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic updated this revision to Diff 91158. smaksimovic added a comment. Removed whitespace. https://reviews.llvm.org/D30693 Files: lib/Sema/SemaChecking.cpp test/CodeGen/builtins-mips-msa-error.c test/CodeGen/builtins-mips-msa.c Index: test/CodeGen/builtins-mips-msa.c

[PATCH] D30693: [mips][msa] Remove range checks for non-immediate sld.[bhwd] instructions

2017-03-07 Thread Stefan Maksimovic via Phabricator via cfe-commits
smaksimovic created this revision. Removes immediate range checks for these instructions, since they have GPR rt as their input operand. https://reviews.llvm.org/D30693 Files: lib/Sema/SemaChecking.cpp test/CodeGen/builtins-mips-msa-error.c test/CodeGen/builtins-mips-msa.c Index: