Skip to content

Commit

Permalink
unittests/ASM: Ensure REX.W prefixed instructions from H0F3A are tested
Browse files Browse the repository at this point in the history
We just want to ensure these instructions are decoded, the regular tests
are ensuring that the behaviour is correct.
  • Loading branch information
Sonicadvance1 committed Dec 31, 2024
1 parent 92a8822 commit cb5195e
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions unittests/ASM/FEX_bugs/H0F3AREXBug.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
%ifdef CONFIG
{}
%endif

; FEX-Emu had a bug in decoding the H0F3A instruction table.
; It would accidentally require REX.W to not be set on the suite of instructions that ignore the flag.
; This just executes all instructions from H0F3A that ignore the REX.W flag, to ensure it decodes.

o64 palignr mm0, mm1, 0
o64 roundps xmm0, xmm1, 0
o64 roundpd xmm0, xmm1, 0
o64 roundss xmm0, xmm1, 0
o64 roundsd xmm0, xmm1, 0
o64 blendps xmm0, xmm1, 0
o64 blendpd xmm0, xmm1, 0
o64 palignr xmm0, xmm1, 0
o64 pextrb eax, xmm0, 0
o64 pextrw eax, xmm0, 0
o64 extractps eax, xmm0, 0
o64 extractps eax, xmm0, 0
o64 pinsrb xmm0, eax, 0
o64 insertps xmm0, xmm1, 0
o64 dpps xmm0, xmm1, 0
o64 dppd xmm0, xmm1, 0
o64 mpsadbw xmm0, xmm1, 0
o64 pclmulqdq xmm0, xmm1, 0
o64 pcmpestrm xmm0, xmm1, 0
o64 pcmpestri xmm0, xmm1, 0
o64 pcmpistrm xmm0, xmm1, 0
o64 pcmpistri xmm0, xmm1, 0
o64 sha1rnds4 xmm0, xmm1, 0
o64 aeskeygenassist xmm0, xmm1, 0

hlt

0 comments on commit cb5195e

Please sign in to comment.