Commit f155e42d authored by Julian Kranz's avatar Julian Kranz

X86 RREIL Translator

X86 Specification

- Added semantics of: VZEROALL
- Bug fixes
parent 3ed94b88
......@@ -14,7 +14,7 @@ clang-sweep:
clang -pipe -O3 -Wall -static -I. -I../../.. -Wfatal-errors sweep.c ../../../dis.o -DRELAXEDFATAL -o clang-sweep
gcc-sweep:
gcc -g -pipe -O3 -Wall -static -I. -I../../.. -Wfatal-errors sweep.c ../../../dis.o -DRELAXEDFATAL -o gcc-sweep
gcc -pipe -O3 -Wall -static -I. -I../../.. -Wfatal-errors sweep.c ../../../dis.o -DRELAXEDFATAL -o gcc-sweep
cmusl-liveness:
/usr/musl/bin/musl-gcc -pipe -O3 -Wall -static -I. -I../../.. -Wfatal-errors liveness.c ../../../dis.c -DRELAXEDFATAL -o musl-live
......
......@@ -93,12 +93,12 @@ main:
#cdqe
add %rax, %rax
inc %rax
#add %rax, %rax
#inc %rax
blah:
call blah
call blah
#blah:
#call blah
#call blah
#bts %rax, (%rbx)
#btr %rax, %rbx
......@@ -552,6 +552,8 @@ main:
#maskmovdqu %xmm2, %xmm1
#vmaskmovdqu %xmm2, %xmm1
vzeroall
#pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
......
......@@ -2618,6 +2618,47 @@ val sem-vmaskmovp element-size v = do
sem-maskmov element-size x
end
val sem-vzeroall = do
size <- return 256;
mode64 <- mode64?;
xmm0 <- return (semantic-register-of XMM0);
mov size xmm0 (imm 0);
xmm1 <- return (semantic-register-of XMM1);
mov size xmm1 (imm 0);
xmm2 <- return (semantic-register-of XMM2);
mov size xmm2 (imm 0);
xmm3 <- return (semantic-register-of XMM3);
mov size xmm3 (imm 0);
xmm4 <- return (semantic-register-of XMM4);
mov size xmm4 (imm 0);
xmm5 <- return (semantic-register-of XMM5);
mov size xmm5 (imm 0);
xmm6 <- return (semantic-register-of XMM6);
mov size xmm6 (imm 0);
xmm7 <- return (semantic-register-of XMM7);
mov size xmm7 (imm 0);
if mode64 then do
xmm8 <- return (semantic-register-of XMM8);
mov size xmm8 (imm 0);
xmm9 <- return (semantic-register-of XMM9);
mov size xmm9 (imm 0);
xmm10 <- return (semantic-register-of XMM10);
mov size xmm10 (imm 0);
xmm11 <- return (semantic-register-of XMM11);
mov size xmm11 (imm 0);
xmm12 <- return (semantic-register-of XMM12);
mov size xmm12 (imm 0);
xmm13 <- return (semantic-register-of XMM13);
mov size xmm13 (imm 0);
xmm14 <- return (semantic-register-of XMM14);
mov size xmm14 (imm 0);
xmm15 <- return (semantic-register-of XMM15);
mov size xmm15 (imm 0)
end else
return void
end
## W>>
## X>>
......
......@@ -2226,7 +2226,7 @@ val semantics insn =
| VUNPCKLPD x: sem-undef-varity x
| VUNPCKLPS x: sem-undef-varity x
| VXORPS x: sem-undef-varity x
| VZEROALL x: sem-undef-varity x
| VZEROALL v: sem-vzeroall
| VZEROUPPER x: sem-undef-varity x
| WAIT x: sem-undef-arity0 x
| WBINVD x: sem-undef-arity0 x
......
......@@ -351,7 +351,9 @@ val p64 [/rex-p]
| mode64? = p64
| mode32? & rexw? = unop DEC rex/reg32
| mode32? & // rexw? = unop INC rex/reg32
#val p64 [p/vex/0f] = /vex/0f
val p64 [p/vex/0f]
| vndd? = /vex/0f/vexv
| otherwise = /vex/0f
val p64 [p/vex/f2/0f]
| vndd? = /vex/f2/0f/vexv
| otherwise = /vex/f2/0f
......
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