-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
cranelift: Fix trampoline args for b1 types #3102
Conversation
b* are written as rust |
So, I'm guessing the solution here would be to write these as u128's in
To ensure that we always clear all bytes, but I'm not sure how this would work on big endian systems.
Aren't larger boolean sizes meant to work as bitmasks? That is the general impression that I got so far, but I haven't seen anything concrete about this. |
A b16 would be either stored as |
c9e692f
to
ecb72cc
Compare
I updated this to write out the full u128 slot as 1 or 0, but lets wait on some feedback about writing it as all ones instead |
Here's context from the docs:
I've had some conversations about this with @sunfishcode and @cfallin in the past--I'll let them comment here. FWIW, I think the approach in ecb72cc of storing a 0 or a 1 to represent a boolean is fine. |
Just clearing some backlog and seeing this now -- sorry for the delay! A few points:
If we are going to do the fully generic thing for bools of all widths, the proper approach I think is to write all-ones ( |
Our DataValues only have one size of booleans so we are always going to have this mismatch of sizes
ecb72cc
to
8862499
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.
Sorry for the delay -- thanks for the updates! LGTM now.
Hey,
We're now having issues with this on the fuzzer, since we introduced b1 types in #3094.
The assert was complaining because we identify
DataValue::B
's asB8
's. I think we are ok disabling this assert for bools, because we are always going to have a size mismatch, and this check is not meaningful for this type.Fixing trampoline bool args is tracked in #2237