From 5aa276efcbd67f4300ca1a7f809c6e00aadb03da Mon Sep 17 00:00:00 2001 From: Christian Krinitsin Date: Tue, 8 Jul 2025 13:28:15 +0200 Subject: restructure results --- .../zero-shot-user-mode/instruction/1821515 | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 results/classifier/zero-shot-user-mode/instruction/1821515 (limited to 'results/classifier/zero-shot-user-mode/instruction/1821515') diff --git a/results/classifier/zero-shot-user-mode/instruction/1821515 b/results/classifier/zero-shot-user-mode/instruction/1821515 new file mode 100644 index 00000000..1edfedbf --- /dev/null +++ b/results/classifier/zero-shot-user-mode/instruction/1821515 @@ -0,0 +1,44 @@ +instruction: 0.496 +runtime: 0.302 +syscall: 0.202 + + + +qemu-ppc (user) incorrectly converts float(nan)->double(non-nan) + +Noticed on qemu-3.1.0 on GHC test suite where float32 comparisons didn't work on NaNs. +Here is the minimal reproducer: + +```c +// cat a.c +#include +#include +#include + +int main() { + volatile float f1 = NAN; + volatile float f2 = NAN; + printf ("f1 (%e, %#x) >= f2 (%e, %#x): %s\n", + f1, *(volatile uint32_t*)&f1, + f2, *(volatile uint32_t*)&f2, + (f1 >= f2) ? "True" + : "False"); + volatile double d = f1; + printf ("d (%e, %#llx)\n", + d, *(volatile uint64_t*)&d); +} +``` + +``` +# incorrect execution: +$ powerpc-unknown-linux-gnu-gcc -O2 a.c -o a -static && qemu-ppc ./a +f1 (5.104236e+38, 0x7fc00000) >= f2 (5.104236e+38, 0x7fc00000): True +d (5.104236e+38, 0x47f8000000000000) + +# correct execution +$ scp a timberdoodle.ppc64.dev.gentoo.org:~/; ssh timberdoodle.ppc64.dev.gentoo.org ./a +f1 (nan, 0x7fc00000) >= f2 (nan, 0x7fc00000): False +d (nan, 0x7ff8000000000000) +``` + +Note: qemu-ppc handled float32 extension as it was not a NaN (exp=111..1111) but a normalized number. \ No newline at end of file -- cgit v1.2.3