Commit 63d97a22 authored by Julian Kranz's avatar Julian Kranz

X86 RREIL Translator

- Started to add semantics of: (V)PSHUFB
parent 87fe1160
......@@ -1466,6 +1466,22 @@ end
val sem-psadbw x = sem-psadbw-vpsadbw-opnd '0' x.opnd1 x.opnd1 x.opnd2
val sem-vpsadbw x = sem-psadbw-vpsadbw-opnd '1' x.opnd1 x.opnd2 x.opnd3
val sem-pshufb-vpshufb-opnd avx-encoded opnd1 opnd2 opnd3 = do
size <- sizeof1 opnd1;
src <- read size opnd2;
shuffle-control-mask <- read size opnd3;
dst <- lval size opnd1;
temp-scm <- mktemp;
#=> For each index: mov (logb (divb size 8)) temp-scm shuffle-control-mask;
#movzx temp-scm to some size?!
#temp-src2 <- mktemp;
#mov size temp-src2 src2;
temp-dst <- mktemp;
end
val ps-push opnd-sz opnd = do
mode64 <- mode64?;
stack-addr-sz <- runtime-stack-address-size;
......
......@@ -838,7 +838,19 @@ val divb x y =
end
end
;
val logb x =
case x of
256: 8
| 128: 7
| 64: 6
| 32: 5
| 16: 4
| 8: 3
| 4: 2
| 2: 1
| 1: 0
end
val vector-apply size element-size monad = do
limit <- return (divb size element-size);
......
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