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

Modify arg passing info for struct with one int and one fp to match GCC behavior. #74

Merged
merged 1 commit into from
Nov 13, 2018

Conversation

jim-wilson
Copy link
Collaborator

This is in response to an FSF GCC bug report
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86387
which states that GCC doesn't match the ABi in the handling of structs with one int and one fp real.

Unfortunately, addressing this in GCC would cause a non-backward compatible ABI break, and we promised that the ABI would not change when we upstreamed glibc in February. So we instead have to fix this in the ABI.

@aswaterman aswaterman requested a review from palmer-dabbelt July 6, 2018 19:11
@asb
Copy link
Collaborator

asb commented Jul 6, 2018

For the reasons you state, I think this is the pragmatic path forwards.

Perhaps we should have a changelog or errata section so it will be obvious to people reading the document that this detail recently changed?

Copy link
Contributor

@palmer-dabbelt palmer-dabbelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jim. It looks like there's some conflicts, and since you made this from your personal github I can't overwrite it myself. Do you mind fixing this up?

@jim-wilson jim-wilson force-pushed the mixed-struct-passing branch from a5d43fb to f2f85df Compare October 22, 2018 22:50
@jim-wilson
Copy link
Collaborator Author

I updated the patch.

@jim-wilson jim-wilson merged commit f1ce16f into riscv-non-isa:master Nov 13, 2018
@jim-wilson jim-wilson deleted the mixed-struct-passing branch November 13, 2018 22:35
asb added a commit to asb/riscv-elf-psabi-doc that referenced this pull request Mar 22, 2019
…t+fp structs for the FP ABI

Pull request riscv-non-isa#74 clarified that when an int+fp struct is passed in a
GPR+FPR in the floating point ABI, the integer isn't extended to XLEN
(i.e. it is anyext, just as if it were passed on the stack).
Unfortunately, a previous part of the sentence which mandated
sign/zero-extension was left in. This patch removes the contradictory
information.
aswaterman pushed a commit that referenced this pull request Mar 22, 2019
…t+fp structs for the FP ABI (#89)

Pull request #74 clarified that when an int+fp struct is passed in a
GPR+FPR in the floating point ABI, the integer isn't extended to XLEN
(i.e. it is anyext, just as if it were passed on the stack).
Unfortunately, a previous part of the sentence which mandated
sign/zero-extension was left in. This patch removes the contradictory
information.
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.

3 participants