Skip to content

GLdispatch: Fix the TOC save in the PPC64LE TSD stubs

Created by: kbrenneman

This is a second crack at fixing the TSD stubs for PPC64LE.

Like #161, this changes the address to save the TOC pointer to be at SP+24 instead of SP+40, to match the ELFv2 spec. In addition, this also changes it to save the TOC pointer in the stub's stack frame instead of the caller's. As far as I can tell, it's now correct at least as far as the TOC pointer is concerned.

I'm not sure about the LR save area, though. The stubs will still save the LR value in the caller's stack frame (like they were doing before with the TOC pointer), but I'm not sure if that's correct. I can't parse the spec any other way, but that still seems weird enough to make me suspect that I'm misreading it. Still, if that turns out to be wrong, then I can fix it in another change.

Merge request reports