Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
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 Toolchain
Commits
9e544f8c
Commit
9e544f8c
authored
3 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fixed pin-alignment code to force a pin alignment."
This reverts commit
ed60f36d
.
parent
ed60f36d
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
zipr/src/pinner_x86.cpp
+2
-3
2 additions, 3 deletions
zipr/src/pinner_x86.cpp
zipr/src/zipr.cpp
+13
-0
13 additions, 0 deletions
zipr/src/zipr.cpp
with
15 additions
and
3 deletions
zipr/src/pinner_x86.cpp
+
2
−
3
View file @
9e544f8c
...
...
@@ -139,7 +139,6 @@ void ZiprPinnerX86_t::AddPinnedInstructions()
if
(
insn
->
getIndirectBranchTargetAddress
()
==
nullptr
)
continue
;
/*
if
(
insn
->
getIndirectBranchTargetAddress
()
->
getVirtualOffset
()
==
0
)
{
// Unpinned IBT. Create dollop and add it to placement
...
...
@@ -147,12 +146,10 @@ void ZiprPinnerX86_t::AddPinnedInstructions()
m_dollop_mgr
.
addNewDollops
(
insn
);
continue
;
}
*/
// deal with unassigned IBTAs.
if
(
insn
->
getIndirectBranchTargetAddress
()
->
getVirtualOffset
()
==
0
)
{
cout
<<
"Setting pin for instruction "
<<
hex
<<
insn
->
getBaseID
()
<<
":"
<<
insn
->
getDisassembly
()
<<
" to "
<<
hex
<<
next_pin_addr
<<
"
\n
"
;
insn
->
getIndirectBranchTargetAddress
()
->
setVirtualOffset
(
next_pin_addr
);
next_pin_addr
=
round_up_to
(
next_pin_addr
+
5
,
pin_align_factor
);
// sizeof pin is 5, but keep aligned.
}
...
...
@@ -1462,6 +1459,8 @@ void ZiprPinnerX86_t::OptimizePinnedInstructions()
{
if
(
m_verbose
)
{
//DISASM d;
//Disassemble(uu.getInstrution(),d);
auto
d
=
DecodedInstruction_t
::
factory
(
uu
.
getInstrution
());
printf
(
"Converting 5-byte pinned jump at %p-%p to patch to %d:%s
\n
"
,
(
void
*
)
addr
,(
void
*
)(
addr
+
4
),
uu
.
getInstrution
()
->
getBaseID
(),
d
->
getDisassembly
().
c_str
()
/*.CompleteInstr*/
);
...
...
This diff is collapsed.
Click to expand it.
zipr/src/zipr.cpp
+
13
−
0
View file @
9e544f8c
...
...
@@ -597,7 +597,20 @@ void ZiprImpl_t::FindFreeRanges(const std::string &name)
new_padding_scoop_name
=
"zipr_scoop_"
+
to_string
(
new_padding_scoop_start
);
/*
DataScoop_t *new_padding_scoop = nullptr;
AddressID_t *new_padding_scoop_start_addr = nullptr,
*new_padding_scoop_end_addr = nullptr;
new_padding_scoop_start_addr = new AddressID_t();
new_padding_scoop_start_addr->setVirtualOffset(new_padding_scoop_start);
m_firp->getAddresses().insert(new_padding_scoop_start_addr);
*/
auto
new_padding_scoop_start_addr
=
m_firp
->
addNewAddress
(
m_firp
->
getFile
()
->
getBaseID
(),
new_padding_scoop_start
);
/*
new_padding_scoop_end_addr = new AddressID_t();
new_padding_scoop_end_addr->setVirtualOffset(new_padding_scoop_end);
m_firp->getAddresses().insert(new_padding_scoop_end_addr);
*/
auto
new_padding_scoop_end_addr
=
m_firp
->
addNewAddress
(
m_firp
->
getFile
()
->
getBaseID
(),
new_padding_scoop_end
);
cout
<<
"Gap filling with a scoop between 0x"
...
...
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