Skip to content
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

Add a rudimentary wasm64 module with intrinsics #1240

Merged
merged 2 commits into from
Oct 30, 2021

Conversation

alexcrichton
Copy link
Member

This follows the x86/x86_64 pattern where wasm64 simply reexports the
wasm32 module for now. The documentation is pretty lacking since this
is just the start as well.

This follows the x86/x86_64 pattern where `wasm64` simply reexports the
`wasm32` module for now. The documentation is pretty lacking since this
is just the start as well.
@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@Amanieu
Copy link
Member

Amanieu commented Oct 28, 2021

The memory intrinsics currently use the i32 versions of the LLVM intrinsics (llvm.wasm.memory.grow.i32 & llvm.wasm.memory.size.i32). Should this be changed to use 64-bit variants on wasm64?

@devsnek
Copy link
Contributor

devsnek commented Oct 28, 2021

I think you need to update some of the intrinsics, here's the changed file from my pr: https://github.com/rust-lang/stdarch/blob/77af60f13156471dc39c806b4be124ef591dc37b/crates/core_arch/src/wasm/memory.rs

@devsnek devsnek mentioned this pull request Oct 28, 2021
@alexcrichton
Copy link
Member Author

Sure, I can update the memory intrinsics as well. FWIW my impression is that the LLVM backend here is still pretty immature, I've gotten crashes in LLVM not compiling in release mode and it also can't compile this repository's tests just yet due to odd relocation errors. I highly doubt this works "as-is" but inching more towards wasm64 I figure is good.

@Amanieu Amanieu merged commit 1181fd4 into rust-lang:master Oct 30, 2021
@alexcrichton alexcrichton deleted the wasm64 branch October 30, 2021 23:52
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