-
Notifications
You must be signed in to change notification settings - Fork 670
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
Bindgen produces incorrect bindings to functions with 80-bit long doubles (f80) #2378
Comments
GKFX
changed the title
Bindgen should not produce bindings to functions with 80-bit long doubles (f80)
Bindgen produces incorrect bindings to functions with 80-bit long doubles (f80)
Dec 31, 2022
Hmmm... interesting. Could it be that we're assuming that |
Related to #1851 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input C
Bindgen Invocation
bindgen float_to_ld.h
Actual Results
This code fills up and overflows the x87 floating point stack, which doesn't crash the application but results in the stack containing nonsense values rather than the values 8.0, 9.0 expected. (This can be observed with
gdb -ex start -ex 'layout asm' -ex 'tui reg float' float_to_ld
.) Also the return values in the buffer are not the actual return values of the function as the wrong registers are being used.As a more minor annoyance, even if the functions aren't used,
rustc
emits the warningnote: 128-bit integers don't currently have a known stable ABI
.Expected Results
Either no bindings should be generated, or inline wrapper functions using inline assembly should be generated which correctly implement the calling convention. Given that Rust has no support for
f80
, simply omitting the bindings seems like the most pragmatic solution.The text was updated successfully, but these errors were encountered: