]> granicus.if.org Git - clang/commit
[mips] Introducing option -mabs=[legacy/2008]
authorPetar Jovanovic <petar.jovanovic@imgtec.com>
Thu, 24 Aug 2017 16:06:30 +0000 (16:06 +0000)
committerPetar Jovanovic <petar.jovanovic@imgtec.com>
Thu, 24 Aug 2017 16:06:30 +0000 (16:06 +0000)
commit0fc3c2a547b1eed5ec99650f18040bce860dda5a
tree2d7cc70fdb77f821722af6d49916702f5e22e655
parent13e76633bb40c51fb1746d74a3ba0ed4c8d55d6d
[mips] Introducing option -mabs=[legacy/2008]

In patch r205628 using abs.[ds] instruction is forced, as they should behave
in accordance with flags Has2008 and ABS2008. Unfortunately for revisions
prior mips32r6 and mips64r6, abs.[ds] is not generating correct result when
working with NaNs. To generate a sequence which always produce a correct
result but also to allow user more control on how his code is compiled,
option -mabs is added where user can choose legacy or 2008.
By default legacy mode is used on revisions prior R6. Mips32r6 and mips64r6
use abs2008 mode by default.

Patch by Aleksandar Beserminji

Differential Revision: https://reviews.llvm.org/D35982

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311669 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticDriverKinds.td
include/clang/Basic/DiagnosticGroups.td
include/clang/Driver/Options.td
lib/Basic/Targets/Mips.cpp
lib/Basic/Targets/Mips.h
lib/Driver/ToolChains/Arch/Mips.cpp
test/Driver/mips-features.c
test/Driver/mips-mabs-warning.c [new file with mode: 0644]
test/Preprocessor/init.c