Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libtcg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton
libtcg
Commits
a68d3857
Commit
a68d3857
authored
10 months ago
by
Anton
Browse files
Options
Downloads
Patches
Plain Diff
libtcg: Remove startaddress arg. from translate
parent
b6430927
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/libtcg/libtcg.h
+1
-1
1 addition, 1 deletion
include/libtcg/libtcg.h
libtcg/libtcg.c
+4
-3
4 additions, 3 deletions
libtcg/libtcg.c
with
5 additions
and
4 deletions
include/libtcg/libtcg.h
+
1
−
1
View file @
a68d3857
...
...
@@ -400,7 +400,7 @@ LIBTCG_EXPORT(const char *, libtcg_get_instruction_name, (LibTcgO
LIBTCG_EXPORT
(
LibTcgHelperInfo
,
libtcg_get_helper_info
,
(
LibTcgInstruction
*
insn
));
LIBTCG_EXPORT
(
LibTcgContext
*
,
libtcg_context_create
,
(
LibTcgDesc
*
desc
));
LIBTCG_EXPORT
(
void
,
libtcg_context_destroy
,
(
LibTcgContext
*
context
));
LIBTCG_EXPORT
(
LibTcgInstructionList
,
libtcg_translate
,
(
LibTcgContext
*
context
,
const
unsigned
char
*
buffer
,
uint64_t
start_address
,
size_t
size
,
uint64_t
virtual_address
,
uint32_t
translate_flags
));
LIBTCG_EXPORT
(
LibTcgInstructionList
,
libtcg_translate
,
(
LibTcgContext
*
context
,
const
unsigned
char
*
buffer
,
size_t
size
,
uint64_t
virtual_address
,
uint32_t
translate_flags
));
LIBTCG_EXPORT
(
void
,
libtcg_instruction_list_destroy
,
(
LibTcgContext
*
context
,
LibTcgInstructionList
));
LIBTCG_EXPORT
(
uint8_t
*
,
libtcg_env_ptr
,
(
LibTcgContext
*
context
));
LIBTCG_EXPORT
(
void
,
libtcg_dump_instruction_to_buffer
,
(
LibTcgInstruction
*
insn
,
char
*
buf
,
size_t
size
));
...
...
This diff is collapsed.
Click to expand it.
libtcg/libtcg.c
+
4
−
3
View file @
a68d3857
...
...
@@ -66,6 +66,7 @@ static inline void *vaddr_to_buf_ptr(CPUArchState *env, abi_ptr ptr, size_t type
CPUState
*
cpu
=
env_cpu
(
env
);
BytecodeRegion
*
region
=
cpu
->
opaque
;
uint64_t
offset
=
(
uintptr_t
)
ptr
-
region
->
virtual_address
;
assert
(
offset
+
type_size
<=
region
->
size
);
return
(
void
*
)
((
uintptr_t
)
region
->
buffer
+
offset
);
}
...
...
@@ -171,7 +172,6 @@ void libtcg_context_destroy(LibTcgContext *context)
LibTcgInstructionList
libtcg_translate
(
LibTcgContext
*
context
,
const
unsigned
char
*
buffer
,
uint64_t
start_address
,
size_t
size
,
uint64_t
virtual_address
,
uint32_t
translate_flags
)
...
...
@@ -180,7 +180,7 @@ LibTcgInstructionList libtcg_translate(LibTcgContext *context,
BytecodeRegion
region
=
{
.
buffer
=
buffer
,
.
size
=
size
,
.
virtual_address
=
start
_address
,
.
virtual_address
=
virtual
_address
,
};
context
->
cpu
->
opaque
=
&
region
;
...
...
@@ -197,10 +197,11 @@ LibTcgInstructionList libtcg_translate(LibTcgContext *context,
/* Set flags */
#ifdef TARGET_ARM
if
(
translate_flags
&
LIBTCG_TRANSLATE_ARM_THUMB
)
{
CPUARMTBFlags
arm_flags
=
{};
CPUARMTBFlags
arm_flags
=
{
flags
,
cs_base
};
/* flags |= THUMB; */
DP_TBFLAG_AM32
(
arm_flags
,
THUMB
,
1
);
flags
=
arm_flags
.
flags
;
cs_base
=
arm_flags
.
flags2
;
}
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment