Commit 3830c15e authored by Julian Kranz's avatar Julian Kranz

X86 RREIL Translator

- Finished to add semantics of: ROL
parent 0b96225b
......@@ -444,9 +444,13 @@ main:
#vpunpckldq %xmm1, %xmm2, %xmm3
#vpunpcklqdq %xmm1, %xmm2, %xmm3
pxor %mm1, %mm2
pxor %xmm1, %xmm2
vpxor %xmm1, %xmm2, %xmm3
#pxor %mm1, %mm2
#pxor %xmm1, %xmm2
#vpxor %xmm1, %xmm2, %xmm3
rol $42, %al
rol %cl, %rax
rol $1, %eax
#vmovd %xmm5, %ebx
......
......@@ -1854,7 +1854,8 @@ val sem-vpxor x = sem-pxor-vpxor-opnd '1' x.opnd1 x.opnd2 x.opnd3
val sem-rol x = do
size <- sizeof1 x.opnd1;
dst <- read size x.opnd1;
src <- read size x.opnd1;
dst <- lval size x.opnd1;
count <- read size x.opnd2;
count-mask <- return (
......@@ -1877,12 +1878,27 @@ val sem-rol x = do
andb size temp-count count (imm count-mask-full);
temp-dst <- mktemp;
movzx (2*size) temp-dst size dst;
movzx (2*size) temp-dst size src;
shl (2*size) temp-dst (var temp-dst) (var temp-count);
orb size temp-dst (var (at-offset temp-dst size)) (var temp-dst);
return void
temp <- mktemp;
sub size temp (imm size) (var temp-count);
shr size temp src (var temp);
cf <- fCF;
mov 1 cf (var temp);
ov <- fOF;
andb size temp count (imm count-mask);
_if (/eq size (var temp) (imm 1)) _then
xorb 1 ov (var (at-offset temp-dst (size - 1))) (var cf)
_else
undef 1 ov
;
write size dst (var temp-dst)
end
val sem-rep-repe-repne size sem fc = do
......
......@@ -1489,7 +1489,7 @@ val semantics insn =
| RDTSCP x: sem-undef-arity0 x
| RET x: sem-ret x
| RET_FAR x: sem-ret-far x
| ROL x: sem-undef-arity2 x
| ROL x: sem-rol x
| ROR x: sem-undef-arity2 x
| ROUNDPD x: sem-undef-arity3 x
| ROUNDPS x: sem-undef-arity3 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