]> git.ipfire.org Git - thirdparty/gcc.git/commit
S/390: Define macros for rounding mode constants
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Mar 2016 07:24:41 +0000 (07:24 +0000)
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Mar 2016 07:24:41 +0000 (07:24 +0000)
commit2a2264529ea78519946e4e573e85226c0521ce45
treeff8ea622f6b57f8864a346ec9013099a62faf4f1
parent2be7449ba1444a53282d56b050bb6ff8d7ac5fd1
S/390: Define macros for rounding mode constants

This patch replaces a few magic numbers used for floating point
rounding modes with macros.  This is mostly a NoOp change apart from:

fixuns_truncdddi2, fixuns_trunctddi2, fixuns_trunc<mode>si2: Replace 5
with DFP_RND_TOWARD_0 (which is 9).

5 as well as 9 represent round towards 0 with the difference that for
5 the new DFP quantum exception is enabled as well.  This exception
isn't IEEE754 and we do not have an interface to enable and test it
anyway.  So we do not intend to enable it.  This so far should not
have any noticable effect since the quantum exception was not
observable through the Posix functions.

Some pattern ("fix_trunc<mode>di2") is already using rounding mode 9
correctly.

gcc/ChangeLog:

2016-03-11  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390.md (BFP_RND_*, DFP_RND_*): Add new constant
definitions for BFP and DFP rounding modes.
("fixuns_truncdddi2", "fixuns_trunctddi2")
("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2")
("fix_trunc<DSF:mode><GPR:mode>2", "fix_trunc<mode>di2")
("fix_trunctf<mode>2"): Use the new constants instead of magic
numbers.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234133 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/s390/s390.md