Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Backend
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Open Source Software
Zipr Backend
Commits
8ff5f29f
Commit
8ff5f29f
authored
9 years ago
by
whh8b
Browse files
Options
Downloads
Patches
Plain Diff
DWCIS takes optional parameter to account for jump.
parent
3ef03f71
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/zipr_utils.h
+1
-1
1 addition, 1 deletion
include/zipr_utils.h
src/utils.cpp
+5
-2
5 additions, 2 deletions
src/utils.cpp
with
6 additions
and
3 deletions
include/zipr_utils.h
+
1
−
1
View file @
8ff5f29f
...
...
@@ -4,6 +4,6 @@
namespace
Utils
{
extern
size_t
CALLBACK_TRAMPOLINE_SIZE
;
int
DetermineWorstCaseInsnSize
(
libIRDB
::
Instruction_t
*
);
int
DetermineWorstCaseInsnSize
(
libIRDB
::
Instruction_t
*
,
bool
account_for_jump
=
true
);
}
#endif
This diff is collapsed.
Click to expand it.
src/utils.cpp
+
5
−
2
View file @
8ff5f29f
...
...
@@ -4,7 +4,7 @@ namespace zipr {
namespace
Utils
{
size_t
CALLBACK_TRAMPOLINE_SIZE
=
9
;
using
namespace
libIRDB
;
int
DetermineWorstCaseInsnSize
(
Instruction_t
*
insn
)
int
DetermineWorstCaseInsnSize
(
Instruction_t
*
insn
,
bool
account_for_jump
)
{
int
required_size
=
0
;
...
...
@@ -64,7 +64,10 @@ int DetermineWorstCaseInsnSize(Instruction_t* insn)
}
// add an extra 5 for a "trampoline" in case we have to end this fragment early
return
required_size
+
5
;
if
(
account_for_jump
)
return
required_size
+
5
;
else
return
required_size
;
}
}
}
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