Commit e4346c09 authored by Julian Kranz's avatar Julian Kranz

X86 RREIL Translator

- Added semantics of: PUSHA, PUSHAD
parent cff29c8d
......@@ -1781,6 +1781,38 @@ val sem-push x = do
ps-push x.opnd-sz (var temp)
val sem-pusha-pushad x = do
temp <- mktemp;
reg-sp <- return (register-by-size low SP_ x.opnd-sz);
reg-sp-sem <- return (semantic-register-of reg-sp);
mov x.opnd-sz temp (var reg-sp-sem);
reg-a <- return (register-by-size low A x.opnd-sz);
reg-a-sem <- return (semantic-register-of reg-a);
ps-push x.opnd-sz (var reg-a-sem);
reg-c <- return (register-by-size low C x.opnd-sz);
reg-c-sem <- return (semantic-register-of reg-c);
ps-push x.opnd-sz (var reg-c-sem);
reg-d <- return (register-by-size low D x.opnd-sz);
reg-d-sem <- return (semantic-register-of reg-d);
ps-push x.opnd-sz (var reg-d-sem);
reg-b <- return (register-by-size low B x.opnd-sz);
reg-b-sem <- return (semantic-register-of reg-b);
ps-push x.opnd-sz (var reg-b-sem);
ps-push x.opnd-sz (var temp);
reg-bp <- return (register-by-size low BP_ x.opnd-sz);
reg-bp-sem <- return (semantic-register-of reg-bp);
ps-push x.opnd-sz (var reg-bp-sem);
reg-si <- return (register-by-size low SI_ x.opnd-sz);
reg-si-sem <- return (semantic-register-of reg-si);
ps-push x.opnd-sz (var reg-si-sem);
reg-di <- return (register-by-size low DI_ x.opnd-sz);
reg-di-sem <- return (semantic-register-of reg-di);
ps-push x.opnd-sz (var reg-di-sem)
val sem-pushf x = do
mask <- return 0x0000000000fcffff;
flags <- rflags;
......@@ -1470,8 +1470,8 @@ val semantics insn =
| PUNPCKLQDQ x: sem-punpckl 64 x
| PUNPCKLWD x: sem-punpckl 16 x
| PUSH x: sem-push x
| PUSHA x: sem-undef-arity0 x
| PUSHAD x: sem-undef-arity0 x
| PUSHA x: sem-pusha-pushad x
| PUSHAD x: sem-pusha-pushad x
| PUSHF x: sem-pushf x
| PUSHFD x: sem-pushf x
| PUSHFQ x: sem-pushf 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