Skip to content

Conversation

@asb
Copy link
Collaborator

@asb asb commented Jul 3, 2019

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.

@asb asb force-pushed the bitfield-clarification branch from e880400 to 4ae2746 Compare July 3, 2019 09:54
…convention

This patch reflects the observed behaviour from GCC, as discussed in
issue riscv-non-isa#99.

Fixes riscv-non-isa#99.
Copy link
Contributor

@aswaterman aswaterman left a 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.

Copy link
Collaborator

@jim-wilson jim-wilson left a 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.

jrtc27
jrtc27 previously approved these changes Mar 11, 2021
Comment on lines +224 to +225
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.
Copy link
Collaborator

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?

@jrtc27 jrtc27 dismissed their stale review March 15, 2021 00:45

left comment

@asb
Copy link
Collaborator Author

asb commented Aug 1, 2022

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?

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.

4 participants