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
091e4e84
Commit
091e4e84
authored
Sep 17, 2014
by
Julian Kranz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of bitbucket.org:simona/gdsl-toolkit
parents
5657e780
30887f9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
detail/codegen/c1/runtime.c
detail/codegen/c1/runtime.c
+4
-7
No files found.
detail/codegen/c1/runtime.c
View file @
091e4e84
...
...
@@ -552,18 +552,16 @@ int main (int argc, char** argv) {
while
(
gdsl_get_ip
(
s
)
-
base_address
<
buf_size
)
{
size_t
size
;
size_t
address
=
0
;
if
(
setjmp
(
*
gdsl_err_tgt
(
s
))
==
0
)
{
if
(
run_translate
)
{
#ifdef HAVE_TRANS
address
=
gdsl_get_ip
(
s
);
opt_result_t
block
=
gdsl_decode_translate_block_optimized
(
s
,
decode_options
,
gdsl_int_max
(
s
),
optimization_options
);
obj_t
res
=
gdsl_rreil_pretty
(
s
,
block
->
rreil
);
string_t
str
=
gdsl_merge_rope
(
s
,
res
);
if
(
print_addr
)
printf
(
"0x%016lx:
\n
"
,
address
);
if
(
print_addr
)
printf
(
"0x%016lx:
\n
"
,
gdsl_get_ip
(
s
)
);
fputs
(
str
,
stdout
);
#else
fputs
(
"GDSL modules contain no semantic translation
\n
"
,
stdout
);
...
...
@@ -571,11 +569,10 @@ int main (int argc, char** argv) {
#endif
}
else
{
#ifdef HAVE_DECODE
address
=
gdsl_get_ip
(
s
);
obj_t
instr
=
gdsl_decode
(
s
,
decode_options
);
obj_t
res
=
gdsl_pretty
(
s
,
instr
);
string_t
str
=
gdsl_merge_rope
(
s
,
res
);
if
(
print_addr
)
printf
(
"%016lx "
,
address
);
if
(
print_addr
)
printf
(
"%016lx "
,
gdsl_get_ip
(
s
)
);
fputs
(
str
,
stdout
);
#else
fputs
(
"GDSL modules contain no decoder function
\n
"
,
stdout
);
...
...
@@ -583,9 +580,9 @@ int main (int argc, char** argv) {
#endif
}
}
else
{
fprintf
(
stdout
,
"exception at address 0x%lx: %s"
,
address
,
gdsl_get_error_message
(
s
));
fprintf
(
stdout
,
"exception at address 0x%lx: %s"
,
gdsl_get_ip
(
s
)
,
gdsl_get_error_message
(
s
));
size_t
step
=
(
s
->
token_addr_inv
>
0
?
(
size_t
)
s
->
token_addr_inv
+
1
:
1u
);
gdsl_seek
(
s
,
address
+
step
);
gdsl_seek
(
s
,
gdsl_get_ip
(
s
)
+
step
);
}
fputs
(
"
\n
"
,
stdout
);
size
=
gdsl_heap_residency
(
s
);
...
...
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