Skip to content

Commit

Permalink
Add proccontrol/src/loadLibrary/codegen-ppc.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 9664117 commit 11d9ac4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
14 changes: 14 additions & 0 deletions docs/dyninstAPI/developer/codegen.h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,17 @@ codegen.h
.. cpp:enumerator:: cgNOP
.. cpp:enumerator:: cgTrap
.. cpp:enumerator:: cgIllegal


Notes
*****

On PowerPC, user code can use up to 288 bytes under the stack pointer;
we skip past this so that we don't mess things up. System code can further
use 224 bytes more under the stack pointer. To be safe, we move down the
stack pointer by 512 bytes.

.. code:: c
#define STACKSKIP 512
6 changes: 0 additions & 6 deletions proccontrol/src/loadLibrary/codegen-ppc.C
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ using namespace NS_power;
using namespace ProcControlAPI;
using namespace std;

// User code can use up to 288 bytes under the stack pointer;
// we skip past this so that we don't mess things up.
//
// And system code can further use 224 bytes more under the stack pointer.
//
// To be safe, we move down the stack pointer by 512
#define STACKSKIP 512

bool Codegen::generateCallPPC32(Address addr, const std::vector<Address> &args) {
Expand Down

0 comments on commit 11d9ac4

Please sign in to comment.