|
From: <sv...@va...> - 2013-05-11 15:05:14
|
florian 2013-05-11 16:05:04 +0100 (Sat, 11 May 2013)
New Revision: 13387
Log:
s390: valgrind side support for PFPO. New hwcap added.
See companion patch VEX r2719.
Patch by Maran Pakkirisamy (ma...@li...).
Part of fixing BZ #307113
Added files:
trunk/none/tests/s390x/pfpo.c
trunk/none/tests/s390x/pfpo.stderr.exp
trunk/none/tests/s390x/pfpo.stdout.exp
trunk/none/tests/s390x/pfpo.vgtest
Modified directories:
trunk/none/tests/s390x/
Modified files:
trunk/coregrind/m_machine.c
trunk/none/tests/s390x/Makefile.am
trunk/tests/s390x_features.c
Modified: trunk/none/tests/s390x/
Added: trunk/none/tests/s390x/pfpo.vgtest (+2 -0)
===================================================================
--- trunk/none/tests/s390x/pfpo.vgtest 2013-05-11 14:42:08 +01:00 (rev 13386)
+++ trunk/none/tests/s390x/pfpo.vgtest 2013-05-11 16:05:04 +01:00 (rev 13387)
@@ -0,0 +1,2 @@
+prog: pfpo
+prereq: test -e pfpo && ../../../tests/s390x_features s390x-pfpo
Modified: trunk/coregrind/m_machine.c (+1 -0)
===================================================================
--- trunk/coregrind/m_machine.c 2013-05-11 14:42:08 +01:00 (rev 13386)
+++ trunk/coregrind/m_machine.c 2013-05-11 16:05:04 +01:00 (rev 13387)
@@ -1252,6 +1252,7 @@
{ 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 */
Added: trunk/none/tests/s390x/pfpo.stdout.exp (+182 -0)
===================================================================
--- trunk/none/tests/s390x/pfpo.stdout.exp 2013-05-11 14:42:08 +01:00 (rev 13386)
+++ trunk/none/tests/s390x/pfpo.stdout.exp 2013-05-11 16:05:04 +01:00 (rev 13387)
@@ -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
Modified: trunk/none/tests/s390x/Makefile.am (+3 -2)
===================================================================
--- trunk/none/tests/s390x/Makefile.am 2013-05-11 14:42:08 +01:00 (rev 13386)
+++ trunk/none/tests/s390x/Makefile.am 2013-05-11 16:05:04 +01:00 (rev 13387)
@@ -19,7 +19,7 @@
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 @@
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@
Modified: trunk/tests/s390x_features.c (+2 -0)
===================================================================
--- trunk/tests/s390x_features.c 2013-05-11 14:42:08 +01:00 (rev 13386)
+++ trunk/tests/s390x_features.c 2013-05-11 16:05:04 +01:00 (rev 13387)
@@ -227,6 +227,8 @@
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.
}
Added: trunk/none/tests/s390x/pfpo.c (+217 -0)
===================================================================
--- trunk/none/tests/s390x/pfpo.c 2013-05-11 14:42:08 +01:00 (rev 13386)
+++ trunk/none/tests/s390x/pfpo.c 2013-05-11 16:05:04 +01:00 (rev 13387)
@@ -0,0 +1,217 @@
+#include <stdio.h>
+#include <stdint.h>
+#include "dfp_utils.h"
+#define __STDC_WANT_DEC_FP__ 1
+#include <float.h>
+
+#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;
+}
Added: trunk/none/tests/s390x/pfpo.stderr.exp (+2 -0)
===================================================================
--- trunk/none/tests/s390x/pfpo.stderr.exp 2013-05-11 14:42:08 +01:00 (rev 13386)
+++ trunk/none/tests/s390x/pfpo.stderr.exp 2013-05-11 16:05:04 +01:00 (rev 13387)
@@ -0,0 +1,2 @@
+
+
Property changed: trunk/none/tests/s390x (+0 -0)
___________________________________________________________________
Name: svn:ignore
- .deps
add
add_EI
add_GE
allexec
and
and_EI
clc
clcle
cvb
cvd
div
ex_clone
ex_sig
flogr
icm
insert
insert_EI
lam_stam
lpr
Makefile
Makefile.in
mul
mul_GE
mvst
or
or_EI
srst
sub
sub_EI
tcxb
xc
xor
xor_EI
stck
stcke
stckf
op_exception
fgx
condloadstore
fold_And16
stfle
op00
cksm
clcl
mvcl
troo
trot
trto
trtt
tr
tre
clrj
clgrj
crj
cgrj
clij
clgij
cij
cgij
cs
csg
cds
cdsg
cu21
cu21_1
cu24
cu24_1
cu42
cu12
cu12_1
cu14
cu14_1
cu41
ecag
fpext
fpext_warn
fpconv
rounding-1
rounding-2
rounding-3
rounding-4
rounding-5
bfp-1
bfp-2
bfp-3
bfp-4
srnm
srnmb
comp-1
comp-2
ex
exrl
tm
tmll
stmg
test_sig
test_clone
test_fork
clst
mvc
spechelper-algr
spechelper-tmll
spechelper-icm-1
spechelper-icm-2
spechelper-cr
spechelper-ltr
spechelper-alr
spechelper-clr
spechelper-slr
spechelper-slgr
spechelper-or
spechelper-tm
rounding-6
laa
dfp-1
dfp-2
dfp-3
dfp-4
dfptest
dfpext
dfpconv
srnmt
+ .deps
add
add_EI
add_GE
allexec
and
and_EI
clc
clcle
cvb
cvd
div
ex_clone
ex_sig
flogr
icm
insert
insert_EI
lam_stam
lpr
Makefile
Makefile.in
mul
mul_GE
mvst
or
or_EI
srst
sub
sub_EI
tcxb
xc
xor
xor_EI
stck
stcke
stckf
op_exception
fgx
condloadstore
fold_And16
stfle
op00
cksm
clcl
mvcl
troo
trot
trto
trtt
tr
tre
clrj
clgrj
crj
cgrj
clij
clgij
cij
cgij
cs
csg
cds
cdsg
cu21
cu21_1
cu24
cu24_1
cu42
cu12
cu12_1
cu14
cu14_1
cu41
ecag
fpext
fpext_warn
fpconv
rounding-1
rounding-2
rounding-3
rounding-4
rounding-5
bfp-1
bfp-2
bfp-3
bfp-4
srnm
srnmb
comp-1
comp-2
ex
exrl
tm
tmll
stmg
test_sig
test_clone
test_fork
clst
mvc
spechelper-algr
spechelper-tmll
spechelper-icm-1
spechelper-icm-2
spechelper-cr
spechelper-ltr
spechelper-alr
spechelper-clr
spechelper-slr
spechelper-slgr
spechelper-or
spechelper-tm
rounding-6
laa
dfp-1
dfp-2
dfp-3
dfp-4
dfptest
dfpext
dfpconv
srnmt
pfpo
|