Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gdsl-toolkit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tanzeem Haque
gdsl-toolkit
Commits
56f5be95
Commit
56f5be95
authored
Mar 14, 2013
by
Julian Kranz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X86 RREIL Translator
- Started to implement the "temp list"
parent
9b28a174
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
+26
-9
specifications/rreil/rreil.ml
specifications/rreil/rreil.ml
+23
-4
specifications/x86/x86-rreil-translator-m-z.ml
specifications/x86/x86-rreil-translator-m-z.ml
+0
-2
specifications/x86/x86-rreil-translator.ml
specifications/x86/x86-rreil-translator.ml
+3
-3
No files found.
specifications/rreil/rreil.ml
View file @
56f5be95
...
...
@@ -109,11 +109,30 @@ val var x = SEM_LIN_VAR x
val
lin
sz
l
=
SEM_LIN
{
size
=
sz
,
opnd1
=
l
}
val
address
sz
addr
=
{
size
=
sz
,
address
=
addr
}
type
temp_list
=
TLIST_CONS
of
{
hd
:
sem_var
,
tl
:
temp_list
}
|
TLIST_NIL
val
temp_id
x
=
case
x
of
VIRT_T
v
:
v
end
val
mktemp
=
do
t
<-
query
$
tmp
;
t'
<-
return
(
t
+
1
);
update
@
{
tmp
=
t'
};
return
{
id
=
VIRT_T
t
,
offset
=
0
}
#
t
<-
query
$
tmp
;
#
t'
<-
return
(
t
+
1
);
#
update
@
{
tmp
=
t'
};
#
return
{
id
=
VIRT_T
t
,
offset
=
0
}
l
<-
query
$
tmp
;
t'
<-
return
(
case
l
of
TLIST_CONS
x
:
_var
(
VIRT_T
((
temp_id
x
.
hd
.
id
)
+
1
))
|
TLIST_NIL
:
_var
(
VIRT_T
0
)
end
);
l'
<-
return
(
TLIST_CONS
{
hd
=
t'
,
tl
=
l
});
update
@
{
tmp
=
l'
};
return
t'
end
val
mklabel
=
do
...
...
specifications/x86/x86-rreil-translator-m-z.ml
View file @
56f5be95
...
...
@@ -922,8 +922,6 @@ val sem-pmcombine-opnd avx-encoded element-size combiner mover1 mover2 opnd1 opn
src2
<-
read
size
opnd3
;
dst
<-
lval
size
opnd1
;
println
mover1
;
temp
-
src1
<-
mktemp
;
mov
size
temp
-
src1
src1
;
temp
-
src2
<-
mktemp
;
...
...
specifications/x86/x86-rreil-translator.ml
View file @
56f5be95
...
...
@@ -2256,14 +2256,14 @@ val semantics insn =
#
s
/
\
(
.*
\
)
|
\
(
\
S
*
\
)
:.*/
\
1
|
\
2
x
:
sem
-
undef
-
arity0
x
/
g
val
translate
insn
=
do
update
@
{
stack
=
SEM_NIL
,
tmp
=
0
,
lab
=
0
,
mode64
=
'
1
'
};
do
update
@
{
stack
=
SEM_NIL
,
tmp
=
TLIST_NIL
,
lab
=
0
,
mode64
=
'
1
'
};
semantics
insn
;
stack
<-
query
$
stack
;
return
(
rreil
-
stmts
-
rev
stack
)
end
val
translate
-
bottom
-
up
insn
=
do
update
@
{
stack
=
SEM_NIL
,
tmp
=
0
,
lab
=
0
};
do
update
@
{
stack
=
SEM_NIL
,
tmp
=
TLIST_NIL
,
lab
=
0
};
semantics
insn
;
stack
<-
query
$
stack
;
return
stack
...
...
@@ -2271,7 +2271,7 @@ val translate-bottom-up insn =
val
transInstr
=
do
ic
<-
query
$
ins_count
;
update
@
{
tmp
=
0
,
ins_count
=
ic
+
1
};
update
@
{
tmp
=
TLIST_NIL
,
ins_count
=
ic
+
1
};
insn
<-
decode
;
semantics
insn
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment