Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zipr-sdk
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Open Source Software
zipr-sdk
Commits
366e9c50
Commit
366e9c50
authored
8 years ago
by
whh8b
Browse files
Options
Downloads
Patches
Plain Diff
Update to new 'composable' plopping semantics.
parent
cb854be0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/dollop_man.h
+1
-1
1 addition, 1 deletion
include/dollop_man.h
include/zipr.h
+2
-2
2 additions, 2 deletions
include/zipr.h
include/zipr_plugin.h
+37
-0
37 additions, 0 deletions
include/zipr_plugin.h
with
40 additions
and
3 deletions
include/dollop_man.h
+
1
−
1
View file @
366e9c50
...
...
@@ -50,7 +50,7 @@ class DollopManager_t {
public:
DollopManager_t
()
{};
virtual
in
t
DetermineWorstCase
InsnSize
(
libIRDB
::
Instruction_t
*
insn
)
=
0
;
virtual
size_
t
DetermineWorstCase
DollopEntrySize
(
DollopEntry_t
*
entry
)
=
0
;
/*
* Add a dollop and all its fallthrough dollops
...
...
This diff is collapsed.
Click to expand it.
include/zipr.h
+
2
−
2
View file @
366e9c50
...
...
@@ -48,8 +48,8 @@ class Zipr_t
/*
* These are public functions that the SDK user way want to use.
*/
virtual
in
t
DetermineWorstCaseInsnSize
(
libIRDB
::
Instruction_t
*
,
bool
account_for_jump
=
true
)
=
0
;
virtual
int
Plugin
DetermineWorstCase
InsnSize
(
libIRDB
::
Instruction
_t
*
,
bool
account_for_jump
=
true
)
=
0
;
virtual
size_
t
DetermineWorstCaseInsnSize
(
libIRDB
::
Instruction_t
*
,
bool
account_for_jump
=
true
)
=
0
;
virtual
size_t
DetermineWorstCase
DollopEntrySize
(
DollopEntry
_t
*
,
bool
account_for_jump
=
true
)
=
0
;
virtual
Zipr_SDK
::
RangeAddress_t
PlopDollopEntry
(
DollopEntry_t
*
,
...
...
This diff is collapsed.
Click to expand it.
include/zipr_plugin.h
+
37
−
0
View file @
366e9c50
...
...
@@ -44,8 +44,45 @@ class ZiprPluginInterface_t
{
return
0
;
}
/*
* InsnPaddingSize()
*
* A plugin that wants to put padding into a
* dollop entry before/after an instruction
* should return the size of that padding in this
* function.
*/
virtual
size_t
InsnPaddingSize
(
libIRDB
::
Instruction_t
*
,
Zipr_t
*
)
{
return
0
;
}
/*
* PlopDollopEntry()
*
* This function is invoked by Zipr for a plugin to
* plop a dollop entry. The entry to plop is given as
* the first parameter. The plugin writer can use
* it's Place() function to determine the beginning
* of the space allocated for this dollop entry.
*
* Because multiple plugins may want to plop the same
* dollop entry, the current address of the instruction
* within the entry is passed as the second parameter.
* If the plugin moves that instruction, it must update
* the parameter. In order to know the length of the
* instruction, there is the third parameter.
*
* Finally, to access the other functions that Zipr
* provides, the fourth parameter is available.
*
* As output, the implementation must provide the
* address of the memory that "concludes" the
* dollop entry.
*/
virtual
RangeAddress_t
PlopDollopEntry
(
Zipr_SDK
::
DollopEntry_t
*
,
RangeAddress_t
&
,
size_t
,
Zipr_t
*
)
{
return
0
;
...
...
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