From: Florian Krohm Date: Sat, 11 May 2013 15:05:04 +0000 (+0000) Subject: s390: valgrind side support for PFPO. New hwcap added. X-Git-Tag: svn/VALGRIND_3_9_0~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30f32f46d29bde44d81fb2ad9ae7622b2d8ed968;p=thirdparty%2Fvalgrind.git s390: valgrind side support for PFPO. New hwcap added. See companion patch VEX r2719. Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com). Part of fixing BZ #307113 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13387 --- diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 7ba19c915b..256b793e83 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1252,6 +1252,7 @@ Bool VG_(machine_get_hwcaps)( void ) { False, S390_FAC_STCKF, VEX_HWCAPS_S390X_STCKF, "STCKF" }, { False, S390_FAC_FPEXT, VEX_HWCAPS_S390X_FPEXT, "FPEXT" }, { False, S390_FAC_LSC, VEX_HWCAPS_S390X_LSC, "LSC" }, + { False, S390_FAC_PFPO, VEX_HWCAPS_S390X_PFPO, "PFPO" }, }; /* Set hwcaps according to the detected facilities */ diff --git a/none/tests/s390x/Makefile.am b/none/tests/s390x/Makefile.am index af07eccece..fdbd760e70 100644 --- a/none/tests/s390x/Makefile.am +++ b/none/tests/s390x/Makefile.am @@ -19,7 +19,7 @@ INSN_TESTS = clc clcle cvb cvd icm lpr tcxb lam_stam xc mvst add sub mul \ spechelper-icm-1 spechelper-icm-2 spechelper-tmll \ spechelper-tm laa if BUILD_DFP_TESTS - INSN_TESTS += dfp-1 dfp-2 dfp-3 dfp-4 dfptest dfpext dfpconv srnmt + INSN_TESTS += dfp-1 dfp-2 dfp-3 dfp-4 dfptest dfpext dfpconv srnmt pfpo endif check_PROGRAMS = $(INSN_TESTS) \ @@ -44,7 +44,8 @@ EXTRA_DIST = \ dfptest.stderr.exp dfptest.stdout.exp dfptest.vgtest \ dfpext.stderr.exp dfpext.stdout.exp dfpext.vgtest \ dfpconv.stderr.exp dfpconv.stdout.exp dfpconv.vgtest \ - srnmt.stderr.exp srnmt.stdout.exp srnmt.vgtest + srnmt.stderr.exp srnmt.stdout.exp srnmt.vgtest \ + pfpo.stderr.exp pfpo.stdout.exp pfpo.vgtest AM_CFLAGS += @FLAG_M64@ AM_CXXFLAGS += @FLAG_M64@ diff --git a/none/tests/s390x/pfpo.c b/none/tests/s390x/pfpo.c new file mode 100644 index 0000000000..2c669a4bec --- /dev/null +++ b/none/tests/s390x/pfpo.c @@ -0,0 +1,217 @@ +#include +#include +#include "dfp_utils.h" +#define __STDC_WANT_DEC_FP__ 1 +#include + +#ifndef PFPO_FUNCTIONS +#define PFPO_FUNCTIONS +#define PFPO_F64_TO_D64 0x01090600 +#define PFPO_D64_TO_F64 0x01060900 +#define PFPO_F64_TO_D128 0x010A0600 +#define PFPO_D128_TO_F64 0x01060A00 +#define PFPO_F128_TO_D128 0x010A0700 +#define PFPO_D128_TO_F128 0x01070A00 +#endif + +/* Test BFP <-> DFP conversions */ + +void pfpo_test(unsigned long fn_code) +{ + register _Decimal64 d64 asm("f0"); + register unsigned long fn asm("0") = fn_code; + register unsigned int ret asm("1"); + int cc; + + asm volatile( + ".short 0x010a\n\t" + "ipm %2\n\t" + "srl %2,28\n\t" + :"=f"(d64),"=d"(ret), "=d" (cc) + :"d"(fn) + ); + printf("pfpo test: function=%lx ret=%d cc=%d\n", fn_code, ret, cc); +} + +void pfpo_f64_to_d64(double src, uint8_t rm) +{ + register double f64 asm("f4") = src; + register _Decimal64 d64 asm("f0"); + register unsigned long fn asm("0") = PFPO_F64_TO_D64 | (rm & 0xf); + register unsigned int ret asm("1"); + _Decimal64 dest; + unsigned int ret_code; + int cc; + asm volatile( + ".short 0x010a\n\t" + "ipm %2\n\t" + "srl %2,28\n\t" + :"=f"(d64), "=d"(ret), "=d" (cc) + :"f"(f64), "d"(fn) + ); + ret_code = ret; + dest = d64; + + printf("round=%x %lf -> ", rm, src); + DFP_VAL_PRINT(dest, _Decimal64); + printf(" ret=%d cc=%d\n", ret_code, cc); +} + +void pfpo_d64_to_f64(_Decimal64 src, uint8_t rm) +{ + register _Decimal64 d64 asm("f4") = src; + register double f64 asm("f0"); + register unsigned long fn asm("0") = PFPO_D64_TO_F64 | (rm & 0xf); + register unsigned int ret asm("1"); + double dest; + unsigned int ret_code; + int cc; + asm volatile( + ".short 0x010a\n\t" + "ipm %2\n\t" + "srl %2,28\n\t" + :"=f"(f64), "=d"(ret), "=d" (cc) + :"f"(d64), "d"(fn) + ); + ret_code = ret; + dest = f64; + + printf("round=%x ", rm); + DFP_VAL_PRINT(src, _Decimal64); + printf(" -> %lf ret=%d cc=%d\n", dest, ret_code, cc); +} + +void pfpo_f64_to_d128(double src, uint8_t rm) +{ + register double f64 asm("f4") = src; + register _Decimal128 d128 asm("f0"); + register unsigned long fn asm("0") = PFPO_F64_TO_D128 | (rm & 0xf); + register unsigned int ret asm("1"); + _Decimal128 dest; + unsigned int ret_code; + int cc; + asm volatile( + ".short 0x010a\n\t" + "ipm %2\n\t" + "srl %2,28\n\t" + :"=f"(d128), "=d"(ret), "=d" (cc) + :"f"(f64), "d"(fn) + ); + ret_code = ret; + dest = d128; + + printf("round=%x %lf -> ", rm, src); + DFP_VAL_PRINT(dest, _Decimal128); + printf(" ret=%d cc=%d\n", ret_code, cc); +} + +void pfpo_d128_to_f64(_Decimal128 src, uint8_t rm) +{ + register _Decimal128 d128 asm("f4") = src; + register double f64 asm("f0"); + register unsigned long fn asm("0") = PFPO_D128_TO_F64 | (rm & 0xf); + register unsigned int ret asm("1"); + double dest; + unsigned int ret_code; + int cc; + asm volatile( + ".short 0x010a\n\t" + "ipm %2\n\t" + "srl %2,28\n\t" + :"=f"(f64), "=d"(ret), "=d" (cc) + :"f"(d128), "d"(fn) + ); + ret_code = ret; + dest = f64; + + printf("round=%x ", rm); + DFP_VAL_PRINT(src, _Decimal128); + printf(" -> %lf ret=%d cc=%d\n", dest, ret_code, cc); +} + +void pfpo_f128_to_d128(long double src, uint8_t rm) +{ + register long double f128 asm("f4") = src; + register _Decimal128 d128 asm("f0"); + register unsigned long fn asm("0") = PFPO_F128_TO_D128 | (rm & 0xf); + register unsigned int ret asm("1"); + _Decimal128 dest; + unsigned int ret_code; + int cc; + asm volatile( + ".short 0x010a\n\t" + "ipm %2\n\t" + "srl %2,28\n\t" + :"=f"(d128), "=d"(ret), "=d" (cc) + :"f"(f128), "d"(fn) + ); + ret_code = ret; + dest = d128; + + printf("round=%x %Lf -> ", rm, src); + DFP_VAL_PRINT(dest, _Decimal128); + printf(" ret=%d cc=%d\n", ret_code, cc); +} + +void pfpo_d128_to_f128(_Decimal128 src, uint8_t rm) +{ + register _Decimal128 d128 asm("f4") = src; + register long double f128 asm("f0"); + register unsigned long fn asm("0") = PFPO_D128_TO_F128 | (rm & 0xf); + register unsigned int ret asm("1"); + long double dest; + unsigned int ret_code; + int cc; + asm volatile( + ".short 0x010a\n\t" + "ipm %2\n\t" + "srl %2,28\n\t" + :"=f"(f128), "=d"(ret), "=d" (cc) + :"f"(d128), "d"(fn) + ); + ret_code = ret; + dest = f128; + + printf("round=%x ", rm); + DFP_VAL_PRINT(src, _Decimal128); + printf(" -> %Lf ret=%d cc=%d\n", dest, ret_code, cc); +} + +int main() +{ + uint8_t i; + + pfpo_test(0x81090600); /* valid function code */ + pfpo_test(0x81990600); /* invalid function code */ + + for (i = 0; i < 16; i++) { + if (i < 2 || i > 7) { + pfpo_f64_to_d64(123456789999.5656789, i); + pfpo_f64_to_d64(DBL_MIN, i); + pfpo_f64_to_d64(DBL_MAX, i); + + pfpo_d64_to_f64(123456789999.5656789DD, i); + pfpo_d64_to_f64(DEC64_MIN, i); + pfpo_d64_to_f64(DEC64_MAX, i); + + pfpo_f64_to_d128(123456789999.5656789, i); + pfpo_f64_to_d128(DBL_MIN, i); + pfpo_f64_to_d128(DBL_MAX, i); + + pfpo_d128_to_f64(1234567899999999.5656789DL, i); + pfpo_d128_to_f64(DEC128_MIN, i); + pfpo_d128_to_f64(DEC128_MAX, i); + + pfpo_f128_to_d128(1234567812345678912345678912.5656789L, i); + pfpo_f128_to_d128(LDBL_MIN, i); + /* pfpo_f128_to_d128(LDBL_MAX, i); */ + pfpo_f128_to_d128(1.6E+200L, i); + + pfpo_d128_to_f128(1234567812345678912345678912.5656789DL, i); + pfpo_d128_to_f128(DEC128_MIN, i); + /* pfpo_d128_to_f128(DEC128_MAX, i); */ + pfpo_d128_to_f128(1.6E+200DL, i); + } + } + return 0; +} diff --git a/none/tests/s390x/pfpo.stderr.exp b/none/tests/s390x/pfpo.stderr.exp new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/none/tests/s390x/pfpo.stderr.exp @@ -0,0 +1,2 @@ + + diff --git a/none/tests/s390x/pfpo.stdout.exp b/none/tests/s390x/pfpo.stdout.exp new file mode 100644 index 0000000000..61188878cb --- /dev/null +++ b/none/tests/s390x/pfpo.stdout.exp @@ -0,0 +1,182 @@ +pfpo test: function=81090600 ret=0 cc=0 +pfpo test: function=81990600 ret=0 cc=3 +round=0 123456789999.565674 -> 262934b9c7fa7f57 ret=0 cc=1 +round=0 0.000000 -> 92d251ce3ea1d01 ret=0 cc=1 +round=0 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b196 ret=0 cc=1 +round=0 262934b9c7fa7f57 -> 123456789999.565704 ret=0 cc=1 +round=0 3c000000000001 -> 0.000000 ret=0 cc=1 +round=0 77fcff3fcff3fcff -> inf ret=0 cc=1 +round=0 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=0 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca04 ret=0 cc=1 +round=0 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c44 ret=0 cc=1 +round=0 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.500000 ret=0 cc=1 +round=0 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=0 77ffcff3fcff3fcff3fcff3fcff3fcff -> inf ret=0 cc=1 +round=0 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9779 ret=0 cc=1 +round=0 0.000000 -> d2ede220cc32483ba1962ddf1d687d3 ret=0 cc=1 +round=0 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000000 ret=0 cc=1 +round=0 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=0 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=0 2239c0000000000000000016 -> 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 ret=0 cc=1 +round=1 123456789999.565674 -> 262934b9c7fa7f57 ret=0 cc=1 +round=1 0.000000 -> 92d251ce3ea1d01 ret=0 cc=1 +round=1 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b196 ret=0 cc=1 +round=1 262934b9c7fa7f57 -> 123456789999.565704 ret=0 cc=1 +round=1 3c000000000001 -> 0.000000 ret=0 cc=1 +round=1 77fcff3fcff3fcff -> inf ret=0 cc=1 +round=1 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=1 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca04 ret=0 cc=1 +round=1 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c44 ret=0 cc=1 +round=1 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.500000 ret=0 cc=1 +round=1 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=1 77ffcff3fcff3fcff3fcff3fcff3fcff -> inf ret=0 cc=1 +round=1 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9779 ret=0 cc=1 +round=1 0.000000 -> d2ede220cc32483ba1962ddf1d687d3 ret=0 cc=1 +round=1 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000000 ret=0 cc=1 +round=1 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=1 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=1 2239c0000000000000000016 -> 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 ret=0 cc=1 +round=8 123456789999.565674 -> 262934b9c7fa7f57 ret=0 cc=1 +round=8 0.000000 -> 92d251ce3ea1d01 ret=0 cc=1 +round=8 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b196 ret=0 cc=1 +round=8 262934b9c7fa7f57 -> 123456789999.565704 ret=0 cc=1 +round=8 3c000000000001 -> 0.000000 ret=0 cc=1 +round=8 77fcff3fcff3fcff -> inf ret=0 cc=1 +round=8 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=8 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca04 ret=0 cc=1 +round=8 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c44 ret=0 cc=1 +round=8 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.500000 ret=0 cc=1 +round=8 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=8 77ffcff3fcff3fcff3fcff3fcff3fcff -> inf ret=0 cc=1 +round=8 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9779 ret=0 cc=1 +round=8 0.000000 -> d2ede220cc32483ba1962ddf1d687d3 ret=0 cc=1 +round=8 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000000 ret=0 cc=1 +round=8 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=8 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=8 2239c0000000000000000016 -> 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 ret=0 cc=1 +round=9 123456789999.565674 -> 262934b9c7fa7f56 ret=0 cc=1 +round=9 0.000000 -> 92d251ce3ea1d01 ret=0 cc=1 +round=9 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b195 ret=0 cc=1 +round=9 262934b9c7fa7f57 -> 123456789999.565689 ret=0 cc=1 +round=9 3c000000000001 -> 0.000000 ret=0 cc=1 +round=9 77fcff3fcff3fcff -> 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 ret=0 cc=1 +round=9 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=9 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca04 ret=0 cc=1 +round=9 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c43 ret=0 cc=1 +round=9 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.500000 ret=0 cc=1 +round=9 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=9 77ffcff3fcff3fcff3fcff3fcff3fcff -> 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 ret=0 cc=1 +round=9 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9778 ret=0 cc=1 +round=9 0.000000 -> d2ede220cc32483ba1962ddf1d687d2 ret=0 cc=1 +round=9 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000000 ret=0 cc=1 +round=9 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=9 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=9 2239c0000000000000000016 -> 159999999999999999999999999999999981967451960713347652646954378648835054196656431469501071806818470701403544010634248613895135655802310342557603066270931617117849608473951398449804804366242587112112128.000000 ret=0 cc=1 +round=a 123456789999.565674 -> 262934b9c7fa7f57 ret=0 cc=1 +round=a 0.000000 -> 92d251ce3ea1d02 ret=0 cc=1 +round=a 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b196 ret=0 cc=1 +round=a 262934b9c7fa7f57 -> 123456789999.565704 ret=0 cc=1 +round=a 3c000000000001 -> 0.000000 ret=0 cc=1 +round=a 77fcff3fcff3fcff -> inf ret=0 cc=1 +round=a 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=a 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca05 ret=0 cc=1 +round=a 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c44 ret=0 cc=1 +round=a 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.750000 ret=0 cc=1 +round=a 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=a 77ffcff3fcff3fcff3fcff3fcff3fcff -> inf ret=0 cc=1 +round=a 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9779 ret=0 cc=1 +round=a 0.000000 -> d2ede220cc32483ba1962ddf1d687d3 ret=0 cc=1 +round=a 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000001 ret=0 cc=1 +round=a 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=a 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=a 2239c0000000000000000016 -> 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 ret=0 cc=1 +round=b 123456789999.565674 -> 262934b9c7fa7f56 ret=0 cc=1 +round=b 0.000000 -> 92d251ce3ea1d01 ret=0 cc=1 +round=b 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b195 ret=0 cc=1 +round=b 262934b9c7fa7f57 -> 123456789999.565689 ret=0 cc=1 +round=b 3c000000000001 -> 0.000000 ret=0 cc=1 +round=b 77fcff3fcff3fcff -> 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 ret=0 cc=1 +round=b 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=b 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca04 ret=0 cc=1 +round=b 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c43 ret=0 cc=1 +round=b 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.500000 ret=0 cc=1 +round=b 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=b 77ffcff3fcff3fcff3fcff3fcff3fcff -> 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 ret=0 cc=1 +round=b 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9778 ret=0 cc=1 +round=b 0.000000 -> d2ede220cc32483ba1962ddf1d687d2 ret=0 cc=1 +round=b 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000000 ret=0 cc=1 +round=b 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=b 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=b 2239c0000000000000000016 -> 159999999999999999999999999999999981967451960713347652646954378648835054196656431469501071806818470701403544010634248613895135655802310342557603066270931617117849608473951398449804804366242587112112128.000000 ret=0 cc=1 +round=c 123456789999.565674 -> 262934b9c7fa7f57 ret=0 cc=1 +round=c 0.000000 -> 92d251ce3ea1d01 ret=0 cc=1 +round=c 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b196 ret=0 cc=1 +round=c 262934b9c7fa7f57 -> 123456789999.565704 ret=0 cc=1 +round=c 3c000000000001 -> 0.000000 ret=0 cc=1 +round=c 77fcff3fcff3fcff -> inf ret=0 cc=1 +round=c 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=c 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca04 ret=0 cc=1 +round=c 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c44 ret=0 cc=1 +round=c 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.500000 ret=0 cc=1 +round=c 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=c 77ffcff3fcff3fcff3fcff3fcff3fcff -> inf ret=0 cc=1 +round=c 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9779 ret=0 cc=1 +round=c 0.000000 -> d2ede220cc32483ba1962ddf1d687d3 ret=0 cc=1 +round=c 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000000 ret=0 cc=1 +round=c 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=c 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=c 2239c0000000000000000016 -> 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 ret=0 cc=1 +round=d 123456789999.565674 -> 262934b9c7fa7f57 ret=0 cc=1 +round=d 0.000000 -> 92d251ce3ea1d01 ret=0 cc=1 +round=d 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b196 ret=0 cc=1 +round=d 262934b9c7fa7f57 -> 123456789999.565704 ret=0 cc=1 +round=d 3c000000000001 -> 0.000000 ret=0 cc=1 +round=d 77fcff3fcff3fcff -> inf ret=0 cc=1 +round=d 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=d 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca04 ret=0 cc=1 +round=d 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c44 ret=0 cc=1 +round=d 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.500000 ret=0 cc=1 +round=d 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=d 77ffcff3fcff3fcff3fcff3fcff3fcff -> inf ret=0 cc=1 +round=d 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9779 ret=0 cc=1 +round=d 0.000000 -> d2ede220cc32483ba1962ddf1d687d3 ret=0 cc=1 +round=d 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000000 ret=0 cc=1 +round=d 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=d 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=d 2239c0000000000000000016 -> 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 ret=0 cc=1 +round=e 123456789999.565674 -> 262934b9c7fa7f57 ret=0 cc=1 +round=e 0.000000 -> 92d251ce3ea1d02 ret=0 cc=1 +round=e 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b196 ret=0 cc=1 +round=e 262934b9c7fa7f57 -> 123456789999.565704 ret=0 cc=1 +round=e 3c000000000001 -> 0.000000 ret=0 cc=1 +round=e 77fcff3fcff3fcff -> inf ret=0 cc=1 +round=e 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=e 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca05 ret=0 cc=1 +round=e 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c44 ret=0 cc=1 +round=e 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.750000 ret=0 cc=1 +round=e 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=e 77ffcff3fcff3fcff3fcff3fcff3fcff -> inf ret=0 cc=1 +round=e 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9779 ret=0 cc=1 +round=e 0.000000 -> d2ede220cc32483ba1962ddf1d687d3 ret=0 cc=1 +round=e 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000001 ret=0 cc=1 +round=e 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=e 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=e 2239c0000000000000000016 -> 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 ret=0 cc=1 +round=f 123456789999.565674 -> 262934b9c7fa7f56 ret=0 cc=1 +round=f 0.000000 -> 92d251ce3ea1d01 ret=0 cc=1 +round=f 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 46cffbcecb45b196 ret=0 cc=1 +round=f 262934b9c7fa7f57 -> 123456789999.565689 ret=0 cc=1 +round=f 3c000000000001 -> 0.000000 ret=0 cc=1 +round=f 77fcff3fcff3fcff -> 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 ret=0 cc=1 +round=f 123456789999.565674 -> 22050000000028e56f3cffb97734b8a5 ret=0 cc=0 +round=f 0.000000 -> 29b2d251ce3ea1d016ac1a4cb976ca04 ret=0 cc=1 +round=f 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 -> 264cffbcecb45b195e20c55d13765c43 ret=0 cc=1 +round=f 220640000000049c5de0ff3fe9fd5bcf -> 1234567899999999.750000 ret=0 cc=1 +round=f 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=f 77ffcff3fcff3fcff3fcff3fcff3fcff -> 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000 ret=0 cc=1 +round=f 1234567812345678912345678912.565679 -> 2606934b9d1c71778671c5de19cb9778 ret=0 cc=1 +round=f 0.000000 -> d2ede220cc32483ba1962ddf1d687d2 ret=0 cc=1 +round=f 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 -> 2631f0000000000000000001 ret=0 cc=1 +round=f 2606934b9d1c71778671c5de19cb9779 -> 1234567812345678912345678912.565679 ret=0 cc=1 +round=f 840000000000000000001 -> 0.000000 ret=0 cc=1 +round=f 2239c0000000000000000016 -> 160000000000000000000000000000000011451533404631639467034099542619685764485103465972941918495930191370342312699297155536760176106261431760279282994113469896575542029761393840336009893684180428123013120.000000 ret=0 cc=1 diff --git a/none/tests/s390x/pfpo.vgtest b/none/tests/s390x/pfpo.vgtest new file mode 100644 index 0000000000..0f1f5b9c41 --- /dev/null +++ b/none/tests/s390x/pfpo.vgtest @@ -0,0 +1,2 @@ +prog: pfpo +prereq: test -e pfpo && ../../../tests/s390x_features s390x-pfpo diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 265e22a6a5..a25b189eed 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -227,6 +227,8 @@ static int go(char *feature, char *cpu) match = facilities & FAC_BIT(37); } else if (strcmp(feature, "s390x-dfp") == 0 ) { match = facilities & FAC_BIT(42); + } else if (strcmp(feature, "s390x-pfpo") == 0 ) { + match = facilities & FAC_BIT(44); } else { return 2; // Unrecognised feature. }