Skip to content

Commit

Permalink
Update e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-conway committed Feb 13, 2023
1 parent 806780d commit 385f0c1
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 22 deletions.
59 changes: 59 additions & 0 deletions tests/e2e/qemu/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4388,10 +4388,16 @@ punpckldq: a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab
punpckldq: a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=0f76255a007c62c2085427f8085427f8
packsswb : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=7f7f80807f7f7f80807f807f7f7f807f
packsswb : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=8080807f7f7f7f7f7f80807f7c7f7f7f
pcmpgtb : a=456723c698694873 b=1f297ccd58bad7ab r=ffff000000ffffff
pcmpgtb : a=007c62c2085427f8 b=0f76255a085427f8 r=00ffff0000000000
pcmpgtb : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=00ffffff00ffff00ffff000000ffffff
pcmpgtb : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=ff000000ffff000000ffff0000000000
pcmpgtw : a=456723c698694873 b=1f297ccd58bad7ab r=ffff00000000ffff
pcmpgtw : a=007c62c2085427f8 b=0f76255a085427f8 r=0000ffff00000000
pcmpgtw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=0000ffff0000ffffffff00000000ffff
pcmpgtw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=ffff0000ffff00000000ffff00000000
pcmpgtd : a=456723c698694873 b=1f297ccd58bad7ab r=ffffffff00000000
pcmpgtd : a=007c62c2085427f8 b=0f76255a085427f8 r=0000000000000000
pcmpgtd : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=0000000000000000ffffffff00000000
pcmpgtd : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=ffffffffffffffff0000000000000000
packuswb : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=ffff0000ffffff0000ff00ffffff00ff
Expand All @@ -4404,10 +4410,16 @@ punpckhdq: a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab
punpckhdq: a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=c233e9e8231be9e8c4c9439acde7438d
packssdw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=7fff80007fff7fff800080007fff8000
packssdw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=800080007fff7fff7fff80007fff7fff
pcmpeqb : a=456723c698694873 b=1f297ccd58bad7ab r=0000000000000000
pcmpeqb : a=007c62c2085427f8 b=0f76255a085427f8 r=00000000ffffffff
pcmpeqb : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=00000000000000000000000000000000
pcmpeqb : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=0000ffff0000ff0000000000ffffffff
pcmpeqw : a=456723c698694873 b=1f297ccd58bad7ab r=0000000000000000
pcmpeqw : a=007c62c2085427f8 b=0f76255a085427f8 r=00000000ffffffff
pcmpeqw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=00000000000000000000000000000000
pcmpeqw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=0000ffff0000000000000000ffffffff
pcmpeqd : a=456723c698694873 b=1f297ccd58bad7ab r=0000000000000000
pcmpeqd : a=007c62c2085427f8 b=0f76255a085427f8 r=00000000ffffffff
pcmpeqd : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=00000000000000000000000000000000
pcmpeqd : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=000000000000000000000000ffffffff
paddq : a=456723c698694873 b=1f297ccd58bad7ab r=6490a093f124201e
Expand Down Expand Up @@ -4448,6 +4460,8 @@ psubsw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab
psubsw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=60e80000091efff3f1063d6800000000
pminsw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=dc511efb944ae1461f2923c69869d7ab
pminsw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=c233e9e8c4c9438d007c255a085427f8
por : a=456723c698694873 b=1f297ccd58bad7ab r=5f6f7fcfd8fbdffb
por : a=007c62c2085427f8 b=0f76255a085427f8 r=0f7e67da085427f8
por : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=ddf35effbdebf9ee5f6f7fcfd8fbdffb
por : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=e33be9e8cdef439f0f7e67da085427f8
paddsb : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=1d437afa802d3932647f7f93f0231f1e
Expand All @@ -4468,25 +4482,44 @@ pmaddwd : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab
pmaddwd : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=f96e96a11d6d10310e703f5c0682dbd0
psadbw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=000000000000035b000000000000021c
psadbw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=00000000000000eb00000000000000ba
psubb : a=456723c698694873 b=1f297ccd58bad7ab r=263ea7f940af71c8
psubb : a=007c62c2085427f8 b=0f76255a085427f8 r=f1063d6800000000
psubb : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=9b5f3e04eb6777a6263ea7f940af71c8
psubb : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=61e80000091e00f3f1063d6800000000
psubw : a=456723c698694873 b=1f297ccd58bad7ab r=263ea6f93faf70c8
psubw : a=007c62c2085427f8 b=0f76255a085427f8 r=f1063d6800000000
psubw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=9a5f3e04ea6777a6263ea6f93faf70c8
psubw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=60e80000091efff3f1063d6800000000
psubd : a=456723c698694873 b=1f297ccd58bad7ab r=263da6f93fae70c8
psubd : a=007c62c2085427f8 b=0f76255a085427f8 r=f1063d6800000000
psubd : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=9a5f3e04ea6677a6263da6f93fae70c8
psubd : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=60e80000091dfff3f1063d6800000000
psubq : a=456723c698694873 b=1f297ccd58bad7ab r=263da6f93fae70c8
psubq : a=007c62c2085427f8 b=0f76255a085427f8 r=f1063d6800000000
psubq : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=9a5f3e03ea6677a6263da6f93fae70c8
psubq : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=60e80000091dfff3f1063d6800000000
paddb : a=456723c698694873 b=1f297ccd58bad7ab r=64909f93f0231f1e
paddb : a=007c62c2085427f8 b=0f76255a085427f8 r=0ff2871c10a84ef0
paddb : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=1d437afa3d2d393264909f93f0231f1e
paddb : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=e54ed2d091b086270ff2871c10a84ef0
paddw : a=456723c698694873 b=1f297ccd58bad7ab r=6490a093f123201e
paddw : a=007c62c2085427f8 b=0f76255a085427f8 r=0ff2881c10a84ff0
paddw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=1e437bfa3e2d3a326490a093f123201e
paddw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=e54ed3d092b087270ff2881c10a84ff0
paddd : a=456723c698694873 b=1f297ccd58bad7ab r=6490a093f124201e
paddd : a=007c62c2085427f8 b=0f76255a085427f8 r=0ff2881c10a84ff0
paddd : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=1e437bfa3e2e3a326490a093f124201e
paddd : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=e54fd3d092b087270ff2881c10a84ff0
pavgb : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=8fa23dfd9f979d99324850ca7892908f
pavgb : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=7327e9e8c9d843940879448e085427f8
pavgw : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=8f223dfd9f179d193248504a7892900f
pavgw : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=72a7e9e8c958439407f9440e085427f8
pinsrw : r=0000000048730000
pinsrw : r=0000000056780000
pinsrw : r=72a7e9e84873439407f9440e085427f8
pinsrw : r=72a7e9e85678439407f9440e085427f8
pextrw : r=0000944a
pmovmskb : r=00000018
pmovmskb : r=00009918
punpcklqdq: a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=1f297ccd58bad7ab456723c698694873
punpcklqdq: a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=0f76255a085427f8007c62c2085427f8
Expand Down Expand Up @@ -4516,6 +4549,8 @@ unpckhps : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab
unpckhps : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=c233e9e8231be9e8c4c9439acde7438d
unpckhpd : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab r=41f21efba9e3e146dc515cff944a58ec
unpckhpd : a=231be9e8cde7438d007c62c2085427f8 b=c233e9e8c4c9439a0f76255a085427f8 r=c233e9e8c4c9439a231be9e8cde7438d
shufps : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab ib=78 r=1f297ccd41f21efb944a58ec98694873
shufpd : a=dc515cff944a58ec456723c698694873 b=41f21efba9e3e1461f297ccd58bad7ab ib=02 r=41f21efba9e3e146456723c698694873
pshufd : a=dc515cff944a58ec456723c698694873 ib=78 r=456723c6dc515cff944a58ec98694873
pshufd : a=231be9e8cde7438d007c62c2085427f8 ib=78 r=007c62c2231be9e8cde7438d085427f8
pshuflw : a=dc515cff944a58ec456723c698694873 ib=78 r=dc515cff944a58ec9869456723c64873
Expand Down Expand Up @@ -4594,6 +4629,30 @@ psllq : a=dc515cff944a58ec456723c698694873 ib=07 r=28ae7fca252c7600b391e34c34
psllq : a=456723c698694873 ib=07 r=b391e34c34a43980
psllq : a=231be9e8cde7438d007c62c2085427f8 ib=07 r=8df4f466f3a1c6803e3161042a13fc00
psllq : a=007c62c2085427f8 ib=07 r=3e3161042a13fc00
psllw : a=456723c698694873 b=0000000000000010 r=0000000000000000
psllw : a=007c62c2085427f8 b=0000000000000010 r=0000000000000000
psllw : a=456723c698694873 b=0000000000000007 r=b380e30034803980
psllw : a=007c62c2085427f8 b=0000000000000007 r=3e0061002a00fc00
psrlw : a=456723c698694873 b=0000000000000010 r=0000000000000000
psrlw : a=007c62c2085427f8 b=0000000000000010 r=0000000000000000
psrlw : a=456723c698694873 b=0000000000000007 r=008a004701300090
psrlw : a=007c62c2085427f8 b=0000000000000007 r=000000c50010004f
pslld : a=456723c698694873 b=0000000000000020 r=0000000000000000
pslld : a=007c62c2085427f8 b=0000000000000020 r=0000000000000000
pslld : a=456723c698694873 b=0000000000000007 r=b391e30034a43980
pslld : a=007c62c2085427f8 b=0000000000000007 r=3e3161002a13fc00
psrld : a=456723c698694873 b=0000000000000020 r=0000000000000000
psrld : a=007c62c2085427f8 b=0000000000000020 r=0000000000000000
psrld : a=456723c698694873 b=0000000000000007 r=008ace470130d290
psrld : a=007c62c2085427f8 b=0000000000000007 r=0000f8c50010a84f
psllq : a=456723c698694873 b=0000000000000020 r=9869487300000000
psllq : a=007c62c2085427f8 b=0000000000000020 r=085427f800000000
psllq : a=456723c698694873 b=0000000000000007 r=b391e34c34a43980
psllq : a=007c62c2085427f8 b=0000000000000007 r=3e3161042a13fc00
psrlq : a=456723c698694873 b=0000000000000020 r=00000000456723c6
psrlq : a=007c62c2085427f8 b=0000000000000020 r=00000000007c62c2
psrlq : a=456723c698694873 b=0000000000000007 r=008ace478d30d290
psrlq : a=007c62c2085427f8 b=0000000000000007 r=0000f8c58410a84f
movmskpd : a=dc515cff944a58ec456723c698694873 r=00000002
movmskpd : a=231be9e8cde7438d007c62c2085427f8 r=00000000
ucomiss : a=2.000000 b=-1.000000 cc=0000
Expand Down
81 changes: 59 additions & 22 deletions tests/e2e/qemu/qemu-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -2306,6 +2306,22 @@ static uint64_t __attribute__((aligned(16))) test_values[4][2] = {
}\
}

#define SHIFT_OP_MM(op,ib)\
{\
int i;\
for(i=0;i<2;i++) {\
a.q[0] = test_values[2*i][0];\
b.q[0] = ib;\
a.q[1] = b.q[1] = 0;\
asm volatile (#op " %2, %0" : "=y" (r.q[0]) : "0" (a.q[0]), "y" (b.q[0]));\
printf("%-9s: a=" FMT64X " b=" FMT64X " r=" FMT64X "\n",\
#op,\
a.q[0],\
b.q[0],\
r.q[0]);\
}\
}

#define SHIFT_OP(op, ib)\
{\
int i;\
Expand Down Expand Up @@ -2505,17 +2521,17 @@ void test_sse(void)
SSE_OP2(punpcklwd);
SSE_OP2(punpckldq);
SSE_OP2(packsswb);
SSE_OP2(pcmpgtb);
SSE_OP2(pcmpgtw);
SSE_OP2(pcmpgtd);
MMX_OP2(pcmpgtb);
MMX_OP2(pcmpgtw);
MMX_OP2(pcmpgtd);
SSE_OP2(packuswb);
SSE_OP2(punpckhbw);
SSE_OP2(punpckhwd);
SSE_OP2(punpckhdq);
SSE_OP2(packssdw);
SSE_OP2(pcmpeqb);
SSE_OP2(pcmpeqw);
SSE_OP2(pcmpeqd);
MMX_OP2(pcmpeqb);
MMX_OP2(pcmpeqw);
MMX_OP2(pcmpeqd);

MMX_OP2(paddq);
MMX_OP2(pmullw);
Expand All @@ -2534,30 +2550,36 @@ void test_sse(void)
SSE_OP2(psubsb);
SSE_OP2(psubsw);
SSE_OP2(pminsw);
SSE_OP2(por);
MMX_OP2(por);
SSE_OP2(paddsb);
SSE_OP2(paddsw);
SSE_OP2(pmaxsw);
MMX_OP2(pxor);
MMX_OP2(pmuludq);
SSE_OP2(pmaddwd);
SSE_OP2(psadbw);
SSE_OP2(psubb);
SSE_OP2(psubw);
SSE_OP2(psubd);
SSE_OP2(psubq);
SSE_OP2(paddb);
SSE_OP2(paddw);
SSE_OP2(paddd);
MMX_OP2(psubb);
MMX_OP2(psubw);
MMX_OP2(psubd);
MMX_OP2(psubq);
MMX_OP2(paddb);
MMX_OP2(paddw);
MMX_OP2(paddd);

SSE_OP2(pavgb);
SSE_OP2(pavgw);

// asm volatile ("pinsrw $1, %1, %0" : "=y" (r.q[0]) : "r" (0x12345678));
// printf("%-9s: r=" FMT64X "\n", "pinsrw", r.q[0]);
a.q[0] = test_values[0][0];
asm volatile ("pinsrw $1, %1, %0" : "=y" (r.q[0]) : "m" (a.l[0]));
printf("%-9s: r=" FMT64X "\n", "pinsrw", r.q[0]);
asm volatile ("pinsrw $1, %1, %0" : "=y" (r.q[0]) : "r" (0x12345678));
printf("%-9s: r=" FMT64X "\n", "pinsrw", r.q[0]);

// asm volatile ("pinsrw $5, %1, %0" : "=x" (r.dq) : "r" (0x12345678));
// printf("%-9s: r=" FMT64X "" FMT64X "\n", "pinsrw", r.q[1], r.q[0]);
a.q[0] = test_values[0][0];
asm volatile ("pinsrw $5, %1, %0" : "=x" (r.dq) : "m" (a.l[0]));
printf("%-9s: r=" FMT64X "" FMT64X "\n", "pinsrw", r.q[1], r.q[0]);
asm volatile ("pinsrw $5, %1, %0" : "=x" (r.dq) : "r" (0x12345678));
printf("%-9s: r=" FMT64X "" FMT64X "\n", "pinsrw", r.q[1], r.q[0]);

a.q[0] = test_values[0][0];
a.q[1] = test_values[0][1];
Expand All @@ -2567,8 +2589,8 @@ void test_sse(void)
asm volatile ("pextrw $5, %1, %0" : "=r" (r.l[0]) : "x" (a.dq));
printf("%-9s: r=%08x\n", "pextrw", r.l[0]);

// asm volatile ("pmovmskb %1, %0" : "=r" (r.l[0]) : "y" (a.q[0]));
// printf("%-9s: r=%08x\n", "pmovmskb", r.l[0]);
asm volatile ("pmovmskb %1, %0" : "=r" (r.l[0]) : "y" (a.q[0]));
printf("%-9s: r=%08x\n", "pmovmskb", r.l[0]);

asm volatile ("pmovmskb %1, %0" : "=r" (r.l[0]) : "x" (a.dq));
printf("%-9s: r=%08x\n", "pmovmskb", r.l[0]);
Expand Down Expand Up @@ -2617,8 +2639,8 @@ void test_sse(void)
SSE_OP2(unpckhps);
SSE_OP2(unpckhpd);

// SHUF_OP(shufps, 0x78);
// SHUF_OP(shufpd, 0x02);
SHUF_OP(shufps, 0x78);
SHUF_OP(shufpd, 0x02);

PSHUF_OP(pshufd, 0x78);
PSHUF_OP(pshuflw, 0x78);
Expand Down Expand Up @@ -2652,6 +2674,21 @@ void test_sse(void)
SHIFT_IM(psllq, 16);
SHIFT_IM(psllq, 7);

SHIFT_OP_MM(psllw, 16);
SHIFT_OP_MM(psllw, 7);
SHIFT_OP_MM(psrlw, 16);
SHIFT_OP_MM(psrlw, 7);

SHIFT_OP_MM(pslld, 32);
SHIFT_OP_MM(pslld, 7);
SHIFT_OP_MM(psrld, 32);
SHIFT_OP_MM(psrld, 7);

SHIFT_OP_MM(psllq, 32);
SHIFT_OP_MM(psllq, 7);
SHIFT_OP_MM(psrlq, 32);
SHIFT_OP_MM(psrlq, 7);

// MOVMSK(movmskps);
MOVMSK(movmskpd);

Expand Down

0 comments on commit 385f0c1

Please sign in to comment.