Branch: refs/heads/welton_ppcminiframe
Home: https://github.com/dyninst/dyninst
Commit: 915e090463d23a7fa97a1033c2e7bae51f4a0d08
https://github.com/dyninst/dyninst/commit/915e090463d23a7fa97a1033c2e7bae51f4a0d08
Author: Benjamin Welton <welton@xxxxxxxxxxx>
Date: 2019-02-14 (Thu, 14 Feb 2019)
Changed paths:
M dyninstAPI/src/codegen-power.C
M dyninstAPI/src/codegen-power.h
Log Message:
-----------
Mini-frame long branch type added to PPC Codegen
Commit adds the ability for PPC codegen to create long branches in
cases where there are no free registers besides TAR.
Behavior of codegen before this change is to not attempt to construct
a long branch and use a trap if no free registers are discovered. The
result is traps being inserted that are not anticipated.
With this fix, if a long branch is required between two blocks and there
are no free registers, a mini-frame is created to first save a register to
create a free register slot for immediate calculation. The result is the
following constructed branch.
<mini-frame creation/register save> - 2 instructions
<load immediate into free'd register> - 3-5 instructions
<load register to TAR (TAR is always free as of Power 8/9)> - 1 instruction
<restore register and destroy frame> - 2 instructions
<branch> - 1 instruction
Max instruction count is 11, 1 instruction longer than the previous max.
|