Files
betterxen/crates/loader/tests/x86/float.txt
T
jelly013 4f4d977807 cpu: add exact SSE and SSE2 floating point
Add the scalar and packed binary32 and binary64 arithmetic, compares and
conversions, computed exactly and rounded once in software. Follow MXCSR
rounding, sticky flags, denormals-are-zero, flush-to-zero, tininess after
rounding and x86 NaN selection. Stop on unmasked exceptions without a
result. Host floating point is not used, and no form is lowered to NEON.

Verify 6,824 vectors computed with exact fractions by an independent Python
reference in both engines, and round-to-nearest results against the host.
List the behaviour that is implemented but left unasserted.

Refs #127, #128

Signed-off-by: jelly013 <22855910+jelly013@users.noreply.github.com>
2026-11-24 13:11:07 +01:00

173 lines
8.5 KiB
Plaintext

f3 41 0f 58 d9 | addss xmm3, xmm9
f3 0f 58 5c be 10 | addss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 41 0f 5c d9 | subss xmm3, xmm9
f3 0f 5c 5c be 10 | subss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 41 0f 59 d9 | mulss xmm3, xmm9
f3 0f 59 5c be 10 | mulss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 41 0f 5e d9 | divss xmm3, xmm9
f3 0f 5e 5c be 10 | divss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 41 0f 5d d9 | minss xmm3, xmm9
f3 0f 5d 5c be 10 | minss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 41 0f 5f d9 | maxss xmm3, xmm9
f3 0f 5f 5c be 10 | maxss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 41 0f 51 d9 | sqrtss xmm3, xmm9
f3 0f 51 5c be 10 | sqrtss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 41 0f c2 d9 00 | cmpss xmm3, xmm9, 0
f3 0f c2 5c be 10 00 | cmpss xmm3, dword ptr [rsi + 4*rdi + 16], 0
f3 41 0f c2 d9 01 | cmpss xmm3, xmm9, 1
f3 0f c2 5c be 10 01 | cmpss xmm3, dword ptr [rsi + 4*rdi + 16], 1
f3 41 0f c2 d9 02 | cmpss xmm3, xmm9, 2
f3 0f c2 5c be 10 02 | cmpss xmm3, dword ptr [rsi + 4*rdi + 16], 2
f3 41 0f c2 d9 03 | cmpss xmm3, xmm9, 3
f3 0f c2 5c be 10 03 | cmpss xmm3, dword ptr [rsi + 4*rdi + 16], 3
f3 41 0f c2 d9 04 | cmpss xmm3, xmm9, 4
f3 0f c2 5c be 10 04 | cmpss xmm3, dword ptr [rsi + 4*rdi + 16], 4
f3 41 0f c2 d9 05 | cmpss xmm3, xmm9, 5
f3 0f c2 5c be 10 05 | cmpss xmm3, dword ptr [rsi + 4*rdi + 16], 5
f3 41 0f c2 d9 06 | cmpss xmm3, xmm9, 6
f3 0f c2 5c be 10 06 | cmpss xmm3, dword ptr [rsi + 4*rdi + 16], 6
f3 41 0f c2 d9 07 | cmpss xmm3, xmm9, 7
f3 0f c2 5c be 10 07 | cmpss xmm3, dword ptr [rsi + 4*rdi + 16], 7
f2 41 0f 58 d9 | addsd xmm3, xmm9
f2 0f 58 5c be 10 | addsd xmm3, qword ptr [rsi + 4*rdi + 16]
f2 41 0f 5c d9 | subsd xmm3, xmm9
f2 0f 5c 5c be 10 | subsd xmm3, qword ptr [rsi + 4*rdi + 16]
f2 41 0f 59 d9 | mulsd xmm3, xmm9
f2 0f 59 5c be 10 | mulsd xmm3, qword ptr [rsi + 4*rdi + 16]
f2 41 0f 5e d9 | divsd xmm3, xmm9
f2 0f 5e 5c be 10 | divsd xmm3, qword ptr [rsi + 4*rdi + 16]
f2 41 0f 5d d9 | minsd xmm3, xmm9
f2 0f 5d 5c be 10 | minsd xmm3, qword ptr [rsi + 4*rdi + 16]
f2 41 0f 5f d9 | maxsd xmm3, xmm9
f2 0f 5f 5c be 10 | maxsd xmm3, qword ptr [rsi + 4*rdi + 16]
f2 41 0f 51 d9 | sqrtsd xmm3, xmm9
f2 0f 51 5c be 10 | sqrtsd xmm3, qword ptr [rsi + 4*rdi + 16]
f2 41 0f c2 d9 00 | cmpsd xmm3, xmm9, 0
f2 0f c2 5c be 10 00 | cmpsd xmm3, qword ptr [rsi + 4*rdi + 16], 0
f2 41 0f c2 d9 01 | cmpsd xmm3, xmm9, 1
f2 0f c2 5c be 10 01 | cmpsd xmm3, qword ptr [rsi + 4*rdi + 16], 1
f2 41 0f c2 d9 02 | cmpsd xmm3, xmm9, 2
f2 0f c2 5c be 10 02 | cmpsd xmm3, qword ptr [rsi + 4*rdi + 16], 2
f2 41 0f c2 d9 03 | cmpsd xmm3, xmm9, 3
f2 0f c2 5c be 10 03 | cmpsd xmm3, qword ptr [rsi + 4*rdi + 16], 3
f2 41 0f c2 d9 04 | cmpsd xmm3, xmm9, 4
f2 0f c2 5c be 10 04 | cmpsd xmm3, qword ptr [rsi + 4*rdi + 16], 4
f2 41 0f c2 d9 05 | cmpsd xmm3, xmm9, 5
f2 0f c2 5c be 10 05 | cmpsd xmm3, qword ptr [rsi + 4*rdi + 16], 5
f2 41 0f c2 d9 06 | cmpsd xmm3, xmm9, 6
f2 0f c2 5c be 10 06 | cmpsd xmm3, qword ptr [rsi + 4*rdi + 16], 6
f2 41 0f c2 d9 07 | cmpsd xmm3, xmm9, 7
f2 0f c2 5c be 10 07 | cmpsd xmm3, qword ptr [rsi + 4*rdi + 16], 7
41 0f 58 d9 | addps xmm3, xmm9
0f 58 5c be 10 | addps xmm3, xmmword ptr [rsi + 4*rdi + 16]
41 0f 5c d9 | subps xmm3, xmm9
0f 5c 5c be 10 | subps xmm3, xmmword ptr [rsi + 4*rdi + 16]
41 0f 59 d9 | mulps xmm3, xmm9
0f 59 5c be 10 | mulps xmm3, xmmword ptr [rsi + 4*rdi + 16]
41 0f 5e d9 | divps xmm3, xmm9
0f 5e 5c be 10 | divps xmm3, xmmword ptr [rsi + 4*rdi + 16]
41 0f 5d d9 | minps xmm3, xmm9
0f 5d 5c be 10 | minps xmm3, xmmword ptr [rsi + 4*rdi + 16]
41 0f 5f d9 | maxps xmm3, xmm9
0f 5f 5c be 10 | maxps xmm3, xmmword ptr [rsi + 4*rdi + 16]
41 0f 51 d9 | sqrtps xmm3, xmm9
0f 51 5c be 10 | sqrtps xmm3, xmmword ptr [rsi + 4*rdi + 16]
41 0f c2 d9 00 | cmpps xmm3, xmm9, 0
0f c2 5c be 10 00 | cmpps xmm3, xmmword ptr [rsi + 4*rdi + 16], 0
41 0f c2 d9 01 | cmpps xmm3, xmm9, 1
0f c2 5c be 10 01 | cmpps xmm3, xmmword ptr [rsi + 4*rdi + 16], 1
41 0f c2 d9 02 | cmpps xmm3, xmm9, 2
0f c2 5c be 10 02 | cmpps xmm3, xmmword ptr [rsi + 4*rdi + 16], 2
41 0f c2 d9 03 | cmpps xmm3, xmm9, 3
0f c2 5c be 10 03 | cmpps xmm3, xmmword ptr [rsi + 4*rdi + 16], 3
41 0f c2 d9 04 | cmpps xmm3, xmm9, 4
0f c2 5c be 10 04 | cmpps xmm3, xmmword ptr [rsi + 4*rdi + 16], 4
41 0f c2 d9 05 | cmpps xmm3, xmm9, 5
0f c2 5c be 10 05 | cmpps xmm3, xmmword ptr [rsi + 4*rdi + 16], 5
41 0f c2 d9 06 | cmpps xmm3, xmm9, 6
0f c2 5c be 10 06 | cmpps xmm3, xmmword ptr [rsi + 4*rdi + 16], 6
41 0f c2 d9 07 | cmpps xmm3, xmm9, 7
0f c2 5c be 10 07 | cmpps xmm3, xmmword ptr [rsi + 4*rdi + 16], 7
66 41 0f 58 d9 | addpd xmm3, xmm9
66 0f 58 5c be 10 | addpd xmm3, xmmword ptr [rsi + 4*rdi + 16]
66 41 0f 5c d9 | subpd xmm3, xmm9
66 0f 5c 5c be 10 | subpd xmm3, xmmword ptr [rsi + 4*rdi + 16]
66 41 0f 59 d9 | mulpd xmm3, xmm9
66 0f 59 5c be 10 | mulpd xmm3, xmmword ptr [rsi + 4*rdi + 16]
66 41 0f 5e d9 | divpd xmm3, xmm9
66 0f 5e 5c be 10 | divpd xmm3, xmmword ptr [rsi + 4*rdi + 16]
66 41 0f 5d d9 | minpd xmm3, xmm9
66 0f 5d 5c be 10 | minpd xmm3, xmmword ptr [rsi + 4*rdi + 16]
66 41 0f 5f d9 | maxpd xmm3, xmm9
66 0f 5f 5c be 10 | maxpd xmm3, xmmword ptr [rsi + 4*rdi + 16]
66 41 0f 51 d9 | sqrtpd xmm3, xmm9
66 0f 51 5c be 10 | sqrtpd xmm3, xmmword ptr [rsi + 4*rdi + 16]
66 41 0f c2 d9 00 | cmppd xmm3, xmm9, 0
66 0f c2 5c be 10 00 | cmppd xmm3, xmmword ptr [rsi + 4*rdi + 16], 0
66 41 0f c2 d9 01 | cmppd xmm3, xmm9, 1
66 0f c2 5c be 10 01 | cmppd xmm3, xmmword ptr [rsi + 4*rdi + 16], 1
66 41 0f c2 d9 02 | cmppd xmm3, xmm9, 2
66 0f c2 5c be 10 02 | cmppd xmm3, xmmword ptr [rsi + 4*rdi + 16], 2
66 41 0f c2 d9 03 | cmppd xmm3, xmm9, 3
66 0f c2 5c be 10 03 | cmppd xmm3, xmmword ptr [rsi + 4*rdi + 16], 3
66 41 0f c2 d9 04 | cmppd xmm3, xmm9, 4
66 0f c2 5c be 10 04 | cmppd xmm3, xmmword ptr [rsi + 4*rdi + 16], 4
66 41 0f c2 d9 05 | cmppd xmm3, xmm9, 5
66 0f c2 5c be 10 05 | cmppd xmm3, xmmword ptr [rsi + 4*rdi + 16], 5
66 41 0f c2 d9 06 | cmppd xmm3, xmm9, 6
66 0f c2 5c be 10 06 | cmppd xmm3, xmmword ptr [rsi + 4*rdi + 16], 6
66 41 0f c2 d9 07 | cmppd xmm3, xmm9, 7
66 0f c2 5c be 10 07 | cmppd xmm3, xmmword ptr [rsi + 4*rdi + 16], 7
41 0f 2f d9 | comiss xmm3, xmm9
0f 2f 5c be 10 | comiss xmm3, dword ptr [rsi + 4*rdi + 16]
41 0f 2e d9 | ucomiss xmm3, xmm9
0f 2e 5c be 10 | ucomiss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 45 0f 2d c9 | cvtss2si r9d, xmm9
f3 44 0f 2d 4c be 10 | cvtss2si r9d, dword ptr [rsi + 4*rdi + 16]
f3 4d 0f 2d c9 | cvtss2si r9, xmm9
f3 4c 0f 2d 4c be 10 | cvtss2si r9, dword ptr [rsi + 4*rdi + 16]
f3 45 0f 2c c9 | cvttss2si r9d, xmm9
f3 44 0f 2c 4c be 10 | cvttss2si r9d, dword ptr [rsi + 4*rdi + 16]
f3 4d 0f 2c c9 | cvttss2si r9, xmm9
f3 4c 0f 2c 4c be 10 | cvttss2si r9, dword ptr [rsi + 4*rdi + 16]
f3 41 0f 2a d9 | cvtsi2ss xmm3, r9d
f3 0f 2a 5c be 10 | cvtsi2ss xmm3, dword ptr [rsi + 4*rdi + 16]
f3 49 0f 2a d9 | cvtsi2ss xmm3, r9
f3 48 0f 2a 5c be 10 | cvtsi2ss xmm3, qword ptr [rsi + 4*rdi + 16]
66 41 0f 2f d9 | comisd xmm3, xmm9
66 0f 2f 5c be 10 | comisd xmm3, qword ptr [rsi + 4*rdi + 16]
66 41 0f 2e d9 | ucomisd xmm3, xmm9
66 0f 2e 5c be 10 | ucomisd xmm3, qword ptr [rsi + 4*rdi + 16]
f2 45 0f 2d c9 | cvtsd2si r9d, xmm9
f2 44 0f 2d 4c be 10 | cvtsd2si r9d, qword ptr [rsi + 4*rdi + 16]
f2 4d 0f 2d c9 | cvtsd2si r9, xmm9
f2 4c 0f 2d 4c be 10 | cvtsd2si r9, qword ptr [rsi + 4*rdi + 16]
f2 45 0f 2c c9 | cvttsd2si r9d, xmm9
f2 44 0f 2c 4c be 10 | cvttsd2si r9d, qword ptr [rsi + 4*rdi + 16]
f2 4d 0f 2c c9 | cvttsd2si r9, xmm9
f2 4c 0f 2c 4c be 10 | cvttsd2si r9, qword ptr [rsi + 4*rdi + 16]
f2 41 0f 2a d9 | cvtsi2sd xmm3, r9d
f2 0f 2a 5c be 10 | cvtsi2sd xmm3, dword ptr [rsi + 4*rdi + 16]
f2 49 0f 2a d9 | cvtsi2sd xmm3, r9
f2 48 0f 2a 5c be 10 | cvtsi2sd xmm3, qword ptr [rsi + 4*rdi + 16]
f3 41 0f 5a d9 | cvtss2sd xmm3, xmm9
f3 0f 5a 5c be 10 | cvtss2sd xmm3, dword ptr [rsi + 4*rdi + 16]
f2 41 0f 5a d9 | cvtsd2ss xmm3, xmm9
f2 0f 5a 5c be 10 | cvtsd2ss xmm3, qword ptr [rsi + 4*rdi + 16]
41 0f 5a d9 | cvtps2pd xmm3, xmm9
0f 5a 5c be 10 | cvtps2pd xmm3, qword ptr [rsi + 4*rdi + 16]
66 41 0f 5a d9 | cvtpd2ps xmm3, xmm9
66 0f 5a 5c be 10 | cvtpd2ps xmm3, xmmword ptr [rsi + 4*rdi + 16]
41 0f 5b d9 | cvtdq2ps xmm3, xmm9
0f 5b 5c be 10 | cvtdq2ps xmm3, xmmword ptr [rsi + 4*rdi + 16]
f3 41 0f e6 d9 | cvtdq2pd xmm3, xmm9
f3 0f e6 5c be 10 | cvtdq2pd xmm3, qword ptr [rsi + 4*rdi + 16]
66 41 0f 5b d9 | cvtps2dq xmm3, xmm9
66 0f 5b 5c be 10 | cvtps2dq xmm3, xmmword ptr [rsi + 4*rdi + 16]
f3 41 0f 5b d9 | cvttps2dq xmm3, xmm9
f3 0f 5b 5c be 10 | cvttps2dq xmm3, xmmword ptr [rsi + 4*rdi + 16]
f2 41 0f e6 d9 | cvtpd2dq xmm3, xmm9
f2 0f e6 5c be 10 | cvtpd2dq xmm3, xmmword ptr [rsi + 4*rdi + 16]
66 41 0f e6 d9 | cvttpd2dq xmm3, xmm9
66 0f e6 5c be 10 | cvttpd2dq xmm3, xmmword ptr [rsi + 4*rdi + 16]