Commit 531fc01a authored by Julian Kranz's avatar Julian Kranz

X86 RREIL Translator

- Continued to add semantics for: BT
- Added semantics for: OR
- Bug fixes
parent c56c85bb
...@@ -593,7 +593,16 @@ val sem-bt x = do ...@@ -593,7 +593,16 @@ val sem-bt x = do
shr base-sz shifted base (var offset-ext); shr base-sz shifted base (var offset-ext);
cf <- fCF; cf <- fCF;
mov 1 cf (var shifted) mov 1 cf (var shifted);
ov <- fOF;
sf <- fSF;
af <- fAF;
pf <- fPF;
undef 1 ov;
undef 1 sf;
undef 1 af;
undef 1 pf
end end
val sem-call x = do val sem-call x = do
...@@ -801,7 +810,7 @@ val sem-movsx x = do ...@@ -801,7 +810,7 @@ val sem-movsx x = do
temp <- mktemp; temp <- mktemp;
movsx sz-dst temp sz-src src; movsx sz-dst temp sz-src src;
commit sz-dst dst src commit sz-dst dst (var temp)
end end
val sem-movzx x = do val sem-movzx x = do
...@@ -813,13 +822,36 @@ val sem-movzx x = do ...@@ -813,13 +822,36 @@ val sem-movzx x = do
temp <- mktemp; temp <- mktemp;
movzx sz-dst temp sz-src src; movzx sz-dst temp sz-src src;
commit sz-dst dst src commit sz-dst dst (var temp)
end end
val sem-nop x = do val sem-nop x = do
return void return void
end end
val sem-or x = do
sz <- sizeof2 x.opnd1 x.opnd2;
dst <- write sz x.opnd1;
src0 <- read sz x.opnd1;
src1 <- read sz x.opnd2;
temp <- mktemp;
orb sz temp src0 src1;
ov <- fOF;
mov 1 ov (imm 0);
cf <- fCF;
mov 1 cf (imm 0);
sf <- fSF;
cmplts sz sf (var temp) (imm 0);
zf <- fZF;
cmpeq sz zf (var temp) (imm 0);
emit-parity-flag (var temp);
af <- fAF;
undef 1 af;
commit sz dst (var temp)
end
val ps-pop opnd-sz opnd = do val ps-pop opnd-sz opnd = do
stack-addr-sz <- runtime-stack-address-size; stack-addr-sz <- runtime-stack-address-size;
...@@ -1722,7 +1754,7 @@ val semantics insn = ...@@ -1722,7 +1754,7 @@ val semantics insn =
| NEG x: sem-undef-arity1 x | NEG x: sem-undef-arity1 x
| NOP x: sem-nop x | NOP x: sem-nop x
| NOT x: sem-undef-arity1 x | NOT x: sem-undef-arity1 x
| OR x: sem-undef-arity2 x | OR x: sem-or x
| ORPD x: sem-undef-arity2 x | ORPD x: sem-undef-arity2 x
| ORPS x: sem-undef-arity2 x | ORPS x: sem-undef-arity2 x
| OUT x: sem-undef-arity2 x | OUT 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