Commit 4028106d authored by Julian Kranz's avatar Julian Kranz

X86 RREIL Translator

- Finished to add semantics of: VBROADCAST
parent 36edd95d
......@@ -471,11 +471,16 @@ main:
#shld $42, %ax, %bx
#shld $99, %ecx, %edx
shld %cl, %rax, %rbx
#shld %cl, %rax, %rbx
shrd $42, %ax, %bx
shrd $99, %ecx, %edx
shrd %cl, %rax, %rbx
#shrd $42, %ax, %bx
#shrd $99, %ecx, %edx
#shrd %cl, %rax, %rbx
vbroadcastss (%rax), %xmm1
vbroadcastss (%rax), %ymm1
vbroadcastsd (%rax), %ymm1
vbroadcastf128 (%rax), %ymm1
#vmovd %xmm5, %ebx
......
......@@ -2444,7 +2444,6 @@ val sem-shld-shrd s1-shifter s2-shifter x = do
af <- fAF;
pf <- fPF;
temp-dst <- mktemp;
_if (/gtu size (var temp-count) (imm size)) _then do
undef 1 cf;
......@@ -2554,6 +2553,32 @@ end
## U>>
## V>>
val sem-vbroadcast v = do
x <- return (
case v of
VA2 x: x
end
);
src-size <- sizeof1 x.opnd2;
src <- read src-size x.opnd2;
dst-size <- sizeof1 x.opnd1;
dst <- lval dst-size x.opnd1;
temp-dst <- mktemp;
let
val m i = do
offset <- return (src-size*i);
mov src-size (at-offset temp-dst offset) src
end
in
vector-apply dst-size src-size m
end;
write-extend '1' dst-size dst (var temp-dst)
end
## W>>
## X>>
......
......@@ -1602,9 +1602,9 @@ val semantics insn =
| VBLENDPS x: sem-undef-varity x
| VBLENDVPD x: sem-undef-varity x
| VBLENDVPS x: sem-undef-varity x
| VBROADCASTF128 x: sem-undef-varity x
| VBROADCASTSD x: sem-undef-varity x
| VBROADCASTSS x: sem-undef-varity x
| VBROADCASTF128 v: sem-vbroadcast v
| VBROADCASTSD v: sem-vbroadcast v
| VBROADCASTSS v: sem-vbroadcast v
| VCMPEQB x: sem-undef-varity x
| VCMPEQD x: sem-undef-varity x
| VCMPEQW x: sem-undef-varity 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