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

Merge 860b6edfa9b344fbf8c500c17158c8212ea87d1c into 18.x #83197

Closed
brad0 opened this issue Feb 27, 2024 · 3 comments
Closed

Merge 860b6edfa9b344fbf8c500c17158c8212ea87d1c into 18.x #83197

brad0 opened this issue Feb 27, 2024 · 3 comments

Comments

@brad0
Copy link
Contributor

brad0 commented Feb 27, 2024

MIPS: fix emitDirectiveCpsetup on N32 (#80534)

In gas, .cpsetup may expand to one of two code sequences (one is related to __gnu_local_gp), depending on -mno-shared and -msym32.
Since Clang doesn't support -mno-shared or -msym32, .cpsetup expands to one code sequence.
The N32 condition incorrectly leads to the incorrect __gnu_local_gp code sequence.

00000000 <t1>:
   0:   ffbc0008        sd      gp,8(sp)
   4:   3c1c0000        lui     gp,0x0
                        4: R_MIPS_HI16  __gnu_local_gp
   8:   279c0000        addiu   gp,gp,0
                        8: R_MIPS_LO16  __gnu_local_gp

Fixes: #52785

@brad0
Copy link
Contributor Author

brad0 commented Feb 27, 2024

/cherry-pick 860b6ed

@llvmbot llvmbot closed this as completed Feb 27, 2024
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in LLVM Release Status Feb 27, 2024
@llvmbot
Copy link
Member

llvmbot commented Feb 27, 2024

/pull-request #83198

@llvmbot
Copy link
Member

llvmbot commented Feb 27, 2024

@llvm/issue-subscribers-backend-mips

Author: Brad Smith (brad0)

MIPS: fix emitDirectiveCpsetup on N32 (#80534)

In gas, .cpsetup may expand to one of two code sequences (one is related to __gnu_local_gp), depending on -mno-shared and -msym32.
Since Clang doesn't support -mno-shared or -msym32, .cpsetup expands to one code sequence.
The N32 condition incorrectly leads to the incorrect __gnu_local_gp code sequence.

00000000 &lt;t1&gt;:
   0:   ffbc0008        sd      gp,8(sp)
   4:   3c1c0000        lui     gp,0x0
                        4: R_MIPS_HI16  __gnu_local_gp
   8:   279c0000        addiu   gp,gp,0
                        8: R_MIPS_LO16  __gnu_local_gp

Fixes: #52785

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants