-
Notifications
You must be signed in to change notification settings - Fork 13k
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
support wasm inline assembly in naked_asm!
#135648
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
@rustbot ping wasm |
This comment was marked as outdated.
This comment was marked as outdated.
Hey WASM notification group! This issue or PR could use some WebAssembly-specific (In case it's useful, here are some instructions for tackling these sorts of |
To clarify how the wasm32-unknown-unknown ABI is broken: For each ABI we implement there is supposed to be some code adjusting the |
// FIXME: remove this branch once the wasm32-unknown-unknown ABI is fixed | ||
bug!( | ||
"cannot use memory args (the wasm32-unknown-unknown ABI is broken, see https://github.com/rust-lang/rust/issues/115666" | ||
); |
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.
Would it be possible to refer to WasmCAbi::Legacy
whenever these bug!
statements are emitted? That should help ensure that when #133952 lands this'll all get naturally updated.
Additionally, would it be possible to attach a span of some kind to this bug!
or the unreachable!
statements (or asserts)? In case this triggers and ICE that might make it much easier to track down what the cause is
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.
sure, I added some let _ = WasmCAbi::Legacy;
statements that will make noise when the WasmCAbi
enum gets removed, and the bug!
s are now tied to the span of the surrounding naked function.
1cb81d2
to
7cf6260
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.
Looks great to me! (although someone else should probably also sign off on this how knows more about naked functions and naked_asm than I)
r=me with the above changes |
e894314
to
bcf478b
Compare
@bors r=bjorn3 |
support wasm inline assembly in `naked_asm!` fixes rust-lang#135518 Webassembly was overlooked previously, but now `naked_asm!` and `#[naked]` functions work on the webassembly targets. Or, they almost do right now. I guess this is no surprise, but the `wasm32-unknown-unknown` target causes me some trouble. I'll add some inline comments with more details. r? `@bjorn3` cc `@daxpedda,` `@tgross35`
support wasm inline assembly in `naked_asm!` fixes rust-lang#135518 Webassembly was overlooked previously, but now `naked_asm!` and `#[naked]` functions work on the webassembly targets. Or, they almost do right now. I guess this is no surprise, but the `wasm32-unknown-unknown` target causes me some trouble. I'll add some inline comments with more details. r? ``@bjorn3`` cc ``@daxpedda,`` ``@tgross35``
support wasm inline assembly in `naked_asm!` fixes rust-lang#135518 Webassembly was overlooked previously, but now `naked_asm!` and `#[naked]` functions work on the webassembly targets. Or, they almost do right now. I guess this is no surprise, but the `wasm32-unknown-unknown` target causes me some trouble. I'll add some inline comments with more details. r? ```@bjorn3``` cc ```@daxpedda,``` ```@tgross35```
Rollup of 10 pull requests Successful merges: - rust-lang#132232 (CI: build FreeBSD artifacts on FreeBSD 13.4) - rust-lang#135625 ([cfg_match] Document the use of expressions.) - rust-lang#135638 (Make it possible to build GCC on CI) - rust-lang#135648 (support wasm inline assembly in `naked_asm!`) - rust-lang#135707 (Shorten linker output even more when `--verbose` is not present) - rust-lang#135750 (Add an example of using `carrying_mul_add` to write wider multiplication) - rust-lang#135779 (CI: free disk on linux arm runner) - rust-lang#135793 (Ignore `mermaid.min.js`) - rust-lang#135810 (Add Kobzol on vacation) - rust-lang#135814 (ci: use ghcr buildkit image) r? `@ghost` `@rustbot` modify labels: rollup
support wasm inline assembly in `naked_asm!` fixes rust-lang#135518 Webassembly was overlooked previously, but now `naked_asm!` and `#[naked]` functions work on the webassembly targets. Or, they almost do right now. I guess this is no surprise, but the `wasm32-unknown-unknown` target causes me some trouble. I'll add some inline comments with more details. r? ````@bjorn3```` cc ````@daxpedda,```` ````@tgross35````
Rollup of 8 pull requests Successful merges: - rust-lang#135557 (Point at invalid utf-8 span on user's source code) - rust-lang#135596 (Properly note when query stack is being cut off) - rust-lang#135638 (Make it possible to build GCC on CI) - rust-lang#135648 (support wasm inline assembly in `naked_asm!`) - rust-lang#135826 (Misc. `rustc_resolve` cleanups) - rust-lang#135827 (CI: free disk with in-tree script instead of GitHub Action) - rust-lang#135850 (Update the `wasm-component-ld` tool) - rust-lang#135855 (Only assert the `Parser` size on specific arches) r? `@ghost` `@rustbot` modify labels: rollup
fixes #135518
Webassembly was overlooked previously, but now
naked_asm!
and#[naked]
functions work on the webassembly targets.Or, they almost do right now. I guess this is no surprise, but the
wasm32-unknown-unknown
target causes me some trouble. I'll add some inline comments with more details.r? @bjorn3
cc @daxpedda, @tgross35