-
Notifications
You must be signed in to change notification settings - Fork 163
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
Further clarify treatment of bitfields in the floating-point calling convention #100
base: master
Are you sure you want to change the base?
Conversation
e880400
to
4ae2746
Compare
…convention This patch reflects the observed behaviour from GCC, as discussed in issue riscv-non-isa#99. Fixes riscv-non-isa#99.
4ae2746
to
05519a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this might not be the best technical solution, but simply documenting what the GCC port happens to do here still seems preferable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a correct description of how gcc is implementing this.
Zero-size bitfields are not ignored, so `struct { float f; int64_t i : 32; int | ||
0;`} would be passed according to the integer calling convention. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, actually, #99 (comment) suggests GCC has since changed ABI for zero-size bitfields, meaning I think this sentence (and the diff above to add a special special case on top of the special case) should go. @jim-wilson do you agree?
I think this is redundant now that GCC's was updated to fix the corner-case around zero-size bitfields and floating point values. Does anyone disagree? |
This patch reflects the observed behaviour from GCC, as discussed in
issue #99.
Note: this is a solution to #99 but not necessarily the best one (see my comment in that thread). Alternatively, we could always ignore zero-width bitfields when considering eligibility for passing according to the floating point calling convention which seems more consistent even if it doesn't fully match what GCC currently does.