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
e22d4182
Commit
e22d4182
authored
2 years ago
by
Anton Johansson
Committed by
Anton
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Export `libtcg_dump_instruction_to_buffer`
parent
7efaa905
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
+12
-13
12 additions, 13 deletions
include/libtcg/libtcg.h
libtcg/libtcg.c
+6
-5
6 additions, 5 deletions
libtcg/libtcg.c
with
18 additions
and
18 deletions
include/libtcg/libtcg.h
+
12
−
13
View file @
e22d4182
...
...
@@ -316,9 +316,6 @@ typedef struct LibTinyCodeInstructionList {
* as well.
*/
void
libtcg_dump_instruction_to_buffer
(
LibTinyCodeInstruction
*
insn
,
char
*
buf
,
size_t
size
);
const
char
*
libtcg_get_instruction_name
(
LibTinyCodeOpcode
opcode
);
LibTinyCodeCallInfo
libtcg_get_call_info
(
LibTinyCodeInstruction
*
insn
);
...
...
@@ -357,11 +354,12 @@ typedef struct LibTinyCodeContext LibTinyCodeContext;
typedef ret LIBTCG_FUNC_TYPE(name) params
/* Funciton typedef */
LIBTCG_EXPORT
(
LibTinyCodeContext
*
,
libtcg_context_create
,
(
LibTinyCodeDesc
*
desc
));
LIBTCG_EXPORT
(
void
,
libtcg_context_destroy
,
(
LibTinyCodeContext
*
context
));
LIBTCG_EXPORT
(
LibTinyCodeInstructionList
,
libtcg_translate
,
(
LibTinyCodeContext
*
context
,
const
unsigned
char
*
buffer
,
size_t
size
,
uint64_t
virtual_address
));
LIBTCG_EXPORT
(
void
,
libtcg_instruction_list_destroy
,
(
LibTinyCodeContext
*
context
,
LibTinyCodeInstructionList
));
LIBTCG_EXPORT
(
uint8_t
*
,
libtcg_env_ptr
,
(
LibTinyCodeContext
*
context
));
LIBTCG_EXPORT
(
LibTinyCodeContext
*
,
libtcg_context_create
,
(
LibTinyCodeDesc
*
desc
));
LIBTCG_EXPORT
(
void
,
libtcg_context_destroy
,
(
LibTinyCodeContext
*
context
));
LIBTCG_EXPORT
(
LibTinyCodeInstructionList
,
libtcg_translate
,
(
LibTinyCodeContext
*
context
,
const
unsigned
char
*
buffer
,
size_t
size
,
uint64_t
virtual_address
));
LIBTCG_EXPORT
(
void
,
libtcg_instruction_list_destroy
,
(
LibTinyCodeContext
*
context
,
LibTinyCodeInstructionList
));
LIBTCG_EXPORT
(
uint8_t
*
,
libtcg_env_ptr
,
(
LibTinyCodeContext
*
context
));
LIBTCG_EXPORT
(
void
,
libtcg_dump_instruction_to_buffer
,
(
LibTinyCodeInstruction
*
insn
,
char
*
buf
,
size_t
size
));
/*
* struct to help load functions we expose,
...
...
@@ -369,11 +367,12 @@ LIBTCG_EXPORT(uint8_t *, libtcg_env_ptr, (LibT
*/
typedef
struct
LibTcgInterface
{
// Functions
LIBTCG_FUNC_TYPE
(
libtcg_context_create
)
*
context_create
;
LIBTCG_FUNC_TYPE
(
libtcg_context_destroy
)
*
context_destroy
;
LIBTCG_FUNC_TYPE
(
libtcg_translate
)
*
translate
;
LIBTCG_FUNC_TYPE
(
libtcg_instruction_list_destroy
)
*
instruction_list_destroy
;
LIBTCG_FUNC_TYPE
(
libtcg_env_ptr
)
*
env_ptr
;
LIBTCG_FUNC_TYPE
(
libtcg_context_create
)
*
context_create
;
LIBTCG_FUNC_TYPE
(
libtcg_context_destroy
)
*
context_destroy
;
LIBTCG_FUNC_TYPE
(
libtcg_translate
)
*
translate
;
LIBTCG_FUNC_TYPE
(
libtcg_instruction_list_destroy
)
*
instruction_list_destroy
;
LIBTCG_FUNC_TYPE
(
libtcg_env_ptr
)
*
env_ptr
;
LIBTCG_FUNC_TYPE
(
libtcg_dump_instruction_to_buffer
)
*
dump_instruction_to_buffer
;
// CPUState variables
intptr_t
exception_index
;
...
...
This diff is collapsed.
Click to expand it.
libtcg/libtcg.c
+
6
−
5
View file @
e22d4182
...
...
@@ -433,11 +433,12 @@ uint8_t *libtcg_env_ptr(LibTinyCodeContext *context)
LibTcgInterface
libtcg_load
(
void
)
{
return
(
LibTcgInterface
)
{
// Functions
.
context_create
=
libtcg_context_create
,
.
context_destroy
=
libtcg_context_destroy
,
.
translate
=
libtcg_translate
,
.
instruction_list_destroy
=
libtcg_instruction_list_destroy
,
.
env_ptr
=
libtcg_env_ptr
,
.
context_create
=
libtcg_context_create
,
.
context_destroy
=
libtcg_context_destroy
,
.
translate
=
libtcg_translate
,
.
instruction_list_destroy
=
libtcg_instruction_list_destroy
,
.
env_ptr
=
libtcg_env_ptr
,
.
dump_instruction_to_buffer
=
libtcg_dump_instruction_to_buffer
,
// CPUState variables
.
exception_index
=
offsetof
(
ArchCPU
,
parent_obj
)
...
...
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