diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-04-01 13:18:23 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-04-01 13:18:34 +0200 |
| commit | e710bbcec894882af9a6b4091f90120b8002c0d3 (patch) | |
| tree | 18dd087351758a1b4b8dd83636804cfdfc3bc29e | |
| parent | 52f8fa1d5b687fbd15d8303f7af2c216e19fe9ef (diff) | |
| download | box64-e710bbcec894882af9a6b4091f90120b8002c0d3.tar.gz box64-e710bbcec894882af9a6b4091f90120b8002c0d3.zip | |
Improved test17 and finetuned factorio profile to disable FASTROUND on Dynarec
| -rw-r--r-- | src/tools/rcfile.c | 3 | ||||
| -rw-r--r-- | system/box64.box64rc | 1 | ||||
| -rw-r--r-- | tests/ref17.txt | 6 | ||||
| -rwxr-xr-x | tests/test17 | bin | 254272 -> 254544 bytes | |||
| -rw-r--r-- | tests/test17.c | 15 |
5 files changed, 22 insertions, 3 deletions
diff --git a/src/tools/rcfile.c b/src/tools/rcfile.c index 4687ec50..7b0ccf64 100644 --- a/src/tools/rcfile.c +++ b/src/tools/rcfile.c @@ -32,6 +32,9 @@ static const char default_rcfile[] = "BOX64_CRASHHANDLER=1\n" "BOX64_DYNAREC_STRONGMEM=1\n" "\n" +"[factorio]\n" +"BOX64_DYNAREC_FASTROUND=0\n" +"\n" "[heroic]\n" "BOX64_NOSANDBOX=1\n" "BOX64_MALLOC_HACK=2\n" diff --git a/system/box64.box64rc b/system/box64.box64rc index 4264cfda..765b2132 100644 --- a/system/box64.box64rc +++ b/system/box64.box64rc @@ -51,6 +51,7 @@ BOX64_DYNAREC_SAFEFLAGS=0 BOX64_DYNAREC_BIGBLOCK=2 BOX64_DYNAREC_FORWARD=1024 BOX64_DYNAREC_CALLRET=1 +BOX64_DYNAREC_FASTROUND=0 [heroic] BOX64_NOSANDBOX=1 diff --git a/tests/ref17.txt b/tests/ref17.txt index 97e5ea89..2f5688f2 100644 --- a/tests/ref17.txt +++ b/tests/ref17.txt @@ -491,7 +491,7 @@ subsd(1 2 , 0 -2 ) = 1 2 subsd(1 2 , inf -inf ) = -inf 2 subsd(1 2 , 0x7ff8000000000000 -0 ) = 0xfff8000000000000 2 subsd(0 -2 , 0x7ff8000000000000 -0 ) = 0xfff8000000000000 -2 -subsd(inf -inf , 0x7ff8000000000000 -0 ) = 0xfff8000000000000 -inf +subsd(inf -inf , 0x7ff8000000000000 -0 ) = 0x7ff8000000000000 -inf subsd(1 2 , 2 1 ) = -1 2 subsd(1 2 , -2 0 ) = 3 2 subsd(1 2 , -inf inf ) = inf 2 @@ -534,3 +534,7 @@ maxsd(1 2 , -inf inf ) = 1 2 maxsd(1 2 , -0 0x7ff8000000000000 ) = 1 2 maxsd(0 -2 , -0 0x7ff8000000000000 ) = 0 -2 maxsd(0 -2 , -0 0x7ff8000000000000 ) = 0 -2 +cvtps2pd(1 2 3 -4 ) = 0x1 0x2 0x3 0xfffffffc +cvtps2pd(0 -2 -10 0.5 ) = 0x0 0xfffffffe 0xfffffff6 0x0 +cvtps2pd(inf -inf -inf 1 ) = 0x80000000 0x80000000 0x80000000 0x1 +cvtps2pd(nan -0 nan inf ) = 0x80000000 0x0 0x80000000 0x80000000 diff --git a/tests/test17 b/tests/test17 index 23f9c660..4a28a47f 100755 --- a/tests/test17 +++ b/tests/test17 Binary files differdiff --git a/tests/test17.c b/tests/test17.c index 385b624c..2c0e549d 100644 --- a/tests/test17.c +++ b/tests/test17.c @@ -1,4 +1,4 @@ -// build with gcc -march=corei7 -O2 -g -msse -msse2 test17.c -o test17 +// build with gcc -O2 -g -msse -msse2 -mssse3 -msse4.1 test17.c -o test17 // and -m32 for 32bits version #include <string.h> #include <stdio.h> @@ -353,6 +353,10 @@ printf(N " %g, %g => %g\n", b, a, *(float*)&r); printf("%s(", #C); print_ps(A1); \ printf(", "); print_ps(A2); \ printf(", %d) = ", I); print_ps(a128); printf("\n"); + #define GO1ps2dq(A, C, A1) \ + a128.mm = _mm_##A##_epi32(A1.mf); \ + printf("%s(", #C); print_ps(A1); \ + printf(") = "); print_32(a128); printf("\n"); #define MULITGO2pd(A, B) \ GO2pd(A, B, a128_pd, b128_pd) \ @@ -378,6 +382,12 @@ printf(N " %g, %g => %g\n", b, a, *(float*)&r); GO2ps(A, B, c128_ps, d128_ps) \ GO2ps(A, B, d128_ps, d128_ps) + #define MULTIGO1ps2dq(A, B) \ + GO1ps2dq(A, B, a128_ps) \ + GO1ps2dq(A, B, b128_ps) \ + GO1ps2dq(A, B, c128_ps) \ + GO1ps2dq(A, B, d128_ps) + #define MULITGO2Cps(A, B, I) \ GO2Cps(A, B, a128_ps, b128_ps, I) \ GO2Cps(A, B, b128_ps, c128_ps, I) \ @@ -577,7 +587,7 @@ printf(N " %g, %g => %g\n", b, a, *(float*)&r); MULITGO2ps(min, minps) MULITGO2ps(div, divps) MULITGO2ps(max, maxps) -// MULITGO2Cps(cmp, cmpps, 0) // use avx for some reason + //MULITGO2Cps(cmp, cmpps, 0) // use avx for some reason MULITGO2Cps(shuffle, shufps, 0) MULITGO2Cps(shuffle, shufps, 0x15) MULITGO2Cps(shuffle, shufps, 0xff) @@ -589,6 +599,7 @@ printf(N " %g, %g => %g\n", b, a, *(float*)&r); MULTIGO2sd(min, minsd) MULTIGO2sd(div, divsd) MULTIGO2sd(max, maxsd) + MULTIGO1ps2dq(cvtps, cvtps2pd) return 0; } |