Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start: A handful of MIPS fixes #20822

Merged
merged 4 commits into from
Jul 29, 2024
Merged

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Jul 27, 2024

These are required for the changes in #20823 to actually work.

@andrewrk
Copy link
Member

Those are some handy PR review comments. Why not make them code comments, commit messages, or both?

alexrp added 4 commits July 29, 2024 10:04
It's actually important for the ABI that r25 (t9) contains the address of the
called function, so that this standard prologue sequence works:

    lui $2, %hi(_gp_disp)
    addiu $2, $2, %lo(_gp_disp)
    addu $gp, $2, $t9

(This is a bit similar to the ToC situation on powerpc that was fixed in
7bc7896.)
Accesses to this global variable can require relocations on some platforms (e.g.
MIPS). If we do it before PIE relocations have been applied, we'll crash.
At this stage, we're not ready to make calls yet on some architectures (e.g. MIPS).
@alexrp alexrp force-pushed the start-mips-fixes branch from 7d984b4 to d633b35 Compare July 29, 2024 08:08
@alexrp
Copy link
Member Author

alexrp commented Jul 29, 2024

Those are some handy PR review comments. Why not make them code comments, commit messages, or both?

Done.

@andrewrk andrewrk enabled auto-merge July 29, 2024 18:36
@andrewrk andrewrk merged commit 7342017 into ziglang:master Jul 29, 2024
10 checks passed
@alexrp alexrp deleted the start-mips-fixes branch July 29, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants