Commit d9cf590a authored by Julian Kranz's avatar Julian Kranz

X86 RREIL Translator

- Added semantics of: AND
parent 77335d9a
......@@ -460,9 +460,13 @@ main:
#rcl %cl, %rax
#rcl $1, %eax
rcr $42, %al
rcr %cl, %rax
rcr $1, %eax
#rcr $42, %al
#rcr %cl, %rax
#rcr $1, %eax
and $12, %al
and (%rax), %rax
and %ebx, %ecx
#vmovd %xmm5, %ebx
......
......@@ -34,6 +34,28 @@ end
#
#end
val sem-and x = do
size <- sizeof1 x.opnd1;
src1 <- read size x.opnd1;
src2 <- read size x.opnd2;
dst <- lval size x.opnd1;
temp <- mktemp;
andb size temp src1 src2;
ov <- fOF;
mov 1 ov (imm 0);
cf <- fCF;
mov 1 cf (imm 0);
sf <- fSF;
mov 1 sf (var (at-offset temp (size - 1)));
zf <- fZF;
cmpeq size zf (var temp) (imm 0);
emit-parity-flag (var temp);
write size dst (var temp)
end
val sem-andpd-opnds avx-encoded opnd1 opnd2 opnd3 = do
#size <- return 128;
size <- sizeof1 opnd1;
......
......@@ -974,7 +974,7 @@ val semantics insn =
| AESENCLAST x: sem-undef-arity2 x
| AESIMC x: sem-undef-arity2 x
| AESKEYGENASSIST x: sem-undef-arity3 x
| AND x: sem-undef-arity2 x
| AND x: sem-and x
| ANDNPD x: sem-undef-arity2 x
| ANDNPS x: sem-undef-arity2 x
| ANDPD x: sem-andpd 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