Skip to content

[WiP] Initial changes to support wasm64 in emcc - #12658

Merged
aardappel merged 1 commit into
emscripten-core:masterfrom
aardappel:master
Nov 17, 2020
Merged

[WiP] Initial changes to support wasm64 in emcc#12658
aardappel merged 1 commit into
emscripten-core:masterfrom
aardappel:master

Conversation

@aardappel

Copy link
Copy Markdown
Collaborator

No description provided.

@aardappel
aardappel requested a review from kripken October 30, 2020 16:49
@welcome

welcome Bot commented Oct 30, 2020

Copy link
Copy Markdown

Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS.

@sbc100

sbc100 commented Oct 30, 2020

Copy link
Copy Markdown
Collaborator

Wow! Is this really your first emscripten change! How exciting for you :)

@aardappel

Copy link
Copy Markdown
Collaborator Author

This is unfinished, but useful to maybe have a quick look to see what I am all doing wrong ;)

In particular, the libc changes probably shouldn't land as-is, but they indicate what was required to make this work.

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly great!

What do we think about that name "memory64" vs "wasm64" (which is used in the llvm world)?

Comment thread emcc.py
Comment thread system/include/libc/alltypes.h.in Outdated
Comment thread system/include/wasi/api.h
Comment thread system/lib/compiler-rt/stack_ops64.s Outdated
Comment thread tests/minimal_webgl/CMakeLists.txt Outdated
Comment thread tools/cache.py
@aardappel

aardappel commented Oct 30, 2020

Copy link
Copy Markdown
Collaborator Author

@sbc100 in the future, we're going to have a world where a single Wasm module can potentially access both a 32-bit and 64-bit memory at the same time, and load/store operations just match the memory they access. Thus, from a Wasm perspective, this is a memory property, not an "architecture". We have already used the term "memory64" thru-out the WABT and Binaryen implementations. To verify wether a load/store is correct, these tools look up the associated memory.

Of course, LLVM doesn't understand such a concept, and thinks in terms of architectures that hold for the entire program, so there "wasm64" is more appropriate. I personally like this term better also, since 99% of programmers are not going to understand the subtleties around Wasm memories. But it is a useful distinction for us.

@sbc100

sbc100 commented Oct 30, 2020

Copy link
Copy Markdown
Collaborator

sgtm!

@kripken kripken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exciting stuff!

Comment thread src/settings.js Outdated
Comment thread tools/cache.py
Comment thread tools/building.py Outdated
Comment thread tests/minimal_webgl/CMakeLists.txt Outdated

@kripken kripken left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm minus minor comments.

Comment thread tools/system_libs.py Outdated
Comment thread tests/test_core.py

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm % a couple more comments!

Comment thread emcc.py Outdated
Comment thread system/include/wasi/api.h
Comment thread system/lib/compiler-rt/stack_ops.S
Comment thread system/lib/pthread/library_pthread_stub.c Outdated
@aardappel
aardappel merged commit 528a6ab into emscripten-core:master Nov 17, 2020
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.

3 participants