Commit d0265359 authored by Julian Kranz's avatar Julian Kranz

X86 RREIL Translator

- Added semantics of: (V)PSHUFW
parent b193df88
......@@ -359,17 +359,19 @@ main:
#pshufb %xmm1, %xmm2
#vpshufb %xmm1, %xmm2, %xmm3
pshufd $0x2d, %xmm1, %xmm2
#pshufd $0x2d, %xmm1, %xmm2
#pshufd $0xe1, %xmm1, %xmm2
#vpshufd $0x59, %xmm1, %xmm2
pshufhw $0x2d, %xmm1, %xmm2
#pshufhw $0x2d, %xmm1, %xmm2
#pshufhw $0xe1, %xmm1, %xmm2
#vpshufhw $0x59, %xmm1, %xmm2
pshuflw $0x2d, %xmm1, %xmm2
pshuflw $0xe1, %xmm1, %xmm2
vpshuflw $0x59, %xmm1, %xmm2
#pshuflw $0x2d, %xmm1, %xmm2
#pshuflw $0xe1, %xmm1, %xmm2
#vpshuflw $0x59, %xmm1, %xmm2
pshufw $0x2d, %mm1, %mm2
#vmovd %xmm5, %ebx
......
......@@ -1516,7 +1516,7 @@ val sem-pshuf-vdhwlw avx-encoded element-size low-size high-size x = do
IMM8 x: x
end
);
temp-dst <- mktemp;
if low-size > 0 then
......@@ -1572,6 +1572,12 @@ val sem-pshuf-vdhwlw avx-encoded element-size low-size high-size x = do
end
));
#mov 42 temp (imm index);
#mov 42 temp (imm (zx mask));
#mov 42 temp (imm (zx indices));
#mov 42 temp (imm element-size);
#mov 42 temp (imm i);
mov element-size (at-offset temp-dst offset) (var (at-offset temp-src (index + low-size)))
end
in
......@@ -1590,6 +1596,7 @@ end
val sem-pshufd-vpshufd avx-encoded x = sem-pshuf-vdhwlw avx-encoded 32 0 0 x
val sem-pshufhw-vpshufhw avx-encoded x = sem-pshuf-vdhwlw avx-encoded 16 64 0 x
val sem-pshuflw-vpshuflw avx-encoded x = sem-pshuf-vdhwlw avx-encoded 16 0 64 x
val sem-pshufw x = sem-pshuf-vdhwlw '0' 16 0 0 x
val ps-push opnd-sz opnd = do
mode64 <- mode64?;
......
......@@ -1418,7 +1418,7 @@ val semantics insn =
| PSHUFD x: sem-pshufd-vpshufd '0' x
| PSHUFHW x: sem-pshufhw-vpshufhw '0' x
| PSHUFLW x: sem-pshuflw-vpshuflw '0' x
| PSHUFW x: sem-undef-arity3 x
| PSHUFW x: sem-pshufw x
| PSIGNB x: sem-undef-arity2 x
| PSIGND x: sem-undef-arity2 x
| PSIGNW x: sem-undef-arity2 x
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment