Skip to content

Add a rudimentary wasm64 module with intrinsics - #1240

Merged
Amanieu merged 2 commits into
rust-lang:masterfrom
alexcrichton:wasm64
Oct 30, 2021
Merged

Add a rudimentary wasm64 module with intrinsics#1240
Amanieu merged 2 commits into
rust-lang:masterfrom
alexcrichton:wasm64

Conversation

@alexcrichton

Copy link
Copy Markdown
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
Copy Markdown

r? @Amanieu

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

@Amanieu

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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

@devsnekdevsnek mentioned this pull request Oct 28, 2021
@alexcrichton

Copy link
Copy Markdown
MemberAuthor

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:masterOct 30, 2021
@alexcrichton
alexcrichton deleted the wasm64 branch October 30, 2021 23:52
@ehussehuss mentioned this pull request Nov 13, 2021
Sign up for freeto 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

@alexcrichton@rust-highfive@Amanieu@devsnek