The GP register can be clobbered by the callback, so save it in S1 while
invoking the callback function.
Details
Details
- Reviewers
jmallett - Commits
- rS328893: Fix makecontext() on MIPS O32.
- the various makecontext tests now pass on o32 instead of core dumping when trying to call ctx_done due to a trashed GP.
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 14751 Build 14872: arc lint + arc unit
Event Timeline
Comment Actions
I take full blame, and acknowledge spending too much time in code with -G0, and thus being somewhat lazy about gp's treatment.
I'd say that because there are a bunch of different ABI semantics here, the comment could be modified to be more explicit about s1 being callee-saved in o32, while gp is callee-saved in n32 and n64, or something.
Thank you! It's good as-is, or with a comment which is more explicit about register saving responsibility.