Improved test17 and finetuned factorio profile to disable FASTROUND on Dynarec

This commit is contained in:
ptitSeb 2023-04-01 13:18:23 +02:00
parent 52f8fa1d5b
commit e710bbcec8
5 changed files with 22 additions and 3 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

Binary file not shown.

View File

@ -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;
}