Commit Graph

12 Commits (d31eaabbaf5f45656c10e4bccd3fe6653a7d3ec1)

Author SHA1 Message Date
Ariadne Conill d31eaabbaf update copyright statements, add mailmap 2020-03-27 09:23:49 +00:00
Bobby Bingham 90ff6330e6 ppc32/64: update copyright 2019-04-05 14:18:20 -05:00
Bobby Bingham 29eac4259a ppc32/64: remove unused includes 2019-04-05 14:18:20 -05:00
Bobby Bingham edf69879ea ppc64: remove unnecessary parentheses 2019-04-05 14:18:20 -05:00
Bobby Bingham 40d07758a5 ppc32/64: correct signature of function parameter to makecontext
Because makecontext can pass a set of integer arguments to the provided
function, it is incorrect to require that this function accept no
parameters.
2019-04-05 14:18:20 -05:00
Bobby Bingham a00a05ce29 ppc64: fix incorrect position of parameters within stack frame
On PPC64, there are 4 register-sized stack slots below the parameter save
area, which is different from the 2 stack slots on PPC32.
2019-04-05 14:18:20 -05:00
Bobby Bingham 8ea5f548b9 ppc64: fix makecontext with more than 8 parameters
The ELFv2 ABI used on PPC64 differs from the ELFv1 ABI used on PPC32 here.
On PPC64, once there are any parameters that need to be passed on the
stack, space needs to be reserved on the stack to pass all parameters.
Parameters 0-7 are still only passed by register, but if the callee needs
to spill them, it can use the stack space reserved for the corresponding
parameter to do so.
2019-04-05 14:18:20 -05:00
Bobby Bingham 55168fcb18 ppc32/64: simplify storage of stack parameters
The switch statement is simpler as an if/else, and removing the argp
variable makes the code more symmetric between the register and stack
parameter cases.
2019-04-05 14:18:20 -05:00
Bobby Bingham b500b054c7 ppc32/64: don't store uc_link on the stack
This was previously stored either in the CR (ppc64) or LR (ppc32) save
area of the stack, or to one of the parameter save slots.

In either case, the saved value was unused.  This value is also passed
to __start_context via r31, so there's no need to pass it on the stack.
2019-04-05 14:15:49 -05:00
Bobby Bingham b9bd4045fb ppc32/64: fix back chain pointer
The ABI states that sp[0] should point to the previous stack frame, or be
zero if there is no previous stack frame.  makecontext previously set this
slot to point to the __start_context function, rather than to a valid
stack frame.
2019-04-05 14:15:49 -05:00
William Pitcock 71979e9cf6 arch: ppc64: now working 2018-02-06 08:05:53 +00:00
William Pitcock 9e5aba6b48 arch: add ppc64 port does not work yet 2018-02-06 06:19:44 +00:00