S/390: Use proper rounding mode for DFP to BFD conversions
According to IEEE 754 2008 4.3 'Rounding-direction attributes' the
rounding mode of the target format needs to be used. By not setting
the value so far we have always used the DFP rounding mode.
gcc/ChangeLog:
2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
constants.
("trunc<BFP:mode><DFP_ALL:mode>2")
("trunc<DFP_ALL:mode><BFP:mode>2")
("extend<BFP:mode><DFP_ALL:mode>2")
("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
according to the target operand type.
gcc/testsuite/ChangeLog:
2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
* gcc.target/s390/dfp_to_bfp_rounding.c: New test.
From-SVN: r264234