-
Notifications
You must be signed in to change notification settings - Fork 719
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
wasm2c: support the custom-page-sizes proposal #2508
Open
keithw
wants to merge
1
commit into
main
Choose a base branch
from
w2c-custom-page-sizes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keithw
force-pushed
the
w2c-per-memory-strategy
branch
2 times, most recently
from
November 11, 2024 09:36
6c60b37
to
167eae8
Compare
keithw
force-pushed
the
w2c-custom-page-sizes
branch
from
November 11, 2024 09:38
22a441d
to
102a439
Compare
keithw
force-pushed
the
w2c-per-memory-strategy
branch
from
November 11, 2024 09:48
167eae8
to
985d89d
Compare
keithw
force-pushed
the
w2c-custom-page-sizes
branch
2 times, most recently
from
November 11, 2024 09:56
abc2180
to
5386b49
Compare
keithw
force-pushed
the
w2c-per-memory-strategy
branch
from
November 11, 2024 09:57
985d89d
to
5604e96
Compare
keithw
force-pushed
the
w2c-custom-page-sizes
branch
from
November 11, 2024 09:58
5386b49
to
dd73c28
Compare
keithw
force-pushed
the
w2c-per-memory-strategy
branch
from
November 11, 2024 10:01
5604e96
to
4e60e9c
Compare
keithw
force-pushed
the
w2c-custom-page-sizes
branch
from
November 11, 2024 10:01
dd73c28
to
a5c6e43
Compare
keithw
force-pushed
the
w2c-per-memory-strategy
branch
from
November 12, 2024 18:41
4e60e9c
to
8abbc62
Compare
keithw
added a commit
that referenced
this pull request
Dec 4, 2024
(Sequenced behind #2506) This PR allows "software-bounds-checked" memories and "guard-page-checked" memories to coexist in the same module. It creates two versions of every memory operation: an unrestricted version (that works with any memory) and a `_default32` version (for memories with default page size and i32 indexing). The unrestricted version calls `MEMCHECK_GENERAL`, which does a 64-bit software `RANGE_CHECK` to check that the operation reads/writes within the bounds of the memory. The `_default32` version calls `MEMCHECK_DEFAULT32`, which is the same as the old `MEMCHECK`: if the runtime declares `WASM_RT_MEMCHECK_GUARD_PAGES`, it will do nothing. Otherwise it will do a 32-bit software `RANGE_CHECK` (which seems to be one less instruction than the 64-bit `RANGE_CHECK`). This is a stepping stone to supporting custom-page-sizes (which will need to be software bounds-checked) (#2508).
Base automatically changed from
w2c-per-memory-strategy
to
w2c-harmonize-types
December 4, 2024 20:37
keithw
added a commit
that referenced
this pull request
Dec 4, 2024
(Sequenced behind #2506) This PR allows "software-bounds-checked" memories and "guard-page-checked" memories to coexist in the same module. It creates two versions of every memory operation: an unrestricted version (that works with any memory) and a `_default32` version (for memories with default page size and i32 indexing). The unrestricted version calls `MEMCHECK_GENERAL`, which does a 64-bit software `RANGE_CHECK` to check that the operation reads/writes within the bounds of the memory. The `_default32` version calls `MEMCHECK_DEFAULT32`, which is the same as the old `MEMCHECK`: if the runtime declares `WASM_RT_MEMCHECK_GUARD_PAGES`, it will do nothing. Otherwise it will do a 32-bit software `RANGE_CHECK` (which seems to be one less instruction than the 64-bit `RANGE_CHECK`). This is a stepping stone to supporting custom-page-sizes (which will need to be software bounds-checked) (#2508).
keithw
force-pushed
the
w2c-harmonize-types
branch
from
December 4, 2024 20:37
6fd3383
to
89ba648
Compare
keithw
added a commit
that referenced
this pull request
Dec 6, 2024
(Sequenced behind #2506) This PR allows "software-bounds-checked" memories and "guard-page-checked" memories to coexist in the same module. It creates two versions of every memory operation: an unrestricted version (that works with any memory) and a `_default32` version (for memories with default page size and i32 indexing). The unrestricted version calls `MEMCHECK_GENERAL`, which does a 64-bit software `RANGE_CHECK` to check that the operation reads/writes within the bounds of the memory. The `_default32` version calls `MEMCHECK_DEFAULT32`, which is the same as the old `MEMCHECK`: if the runtime declares `WASM_RT_MEMCHECK_GUARD_PAGES`, it will do nothing. Otherwise it will do a 32-bit software `RANGE_CHECK` (which seems to be one less instruction than the 64-bit `RANGE_CHECK`). This is a stepping stone to supporting custom-page-sizes (which will need to be software bounds-checked) (#2508).
keithw
force-pushed
the
w2c-harmonize-types
branch
from
December 6, 2024 14:40
89ba648
to
648efc8
Compare
keithw
added a commit
that referenced
this pull request
Dec 18, 2024
…hecks per-memory (#2507) The PR updates the bulk memory operations (memory.fill, memory.copy, table.fill, etc.) to support 64-bit addresses and counts. Previously these functions only took u32's, even with memory64 enabled. (#2506) This PR also allows "software-bounds-checked" memories and "guard-page-checked" memories to coexist in the same module. It creates two versions of every memory operation: an unrestricted version (that works with any memory) and a _default32 version (for memories with default page size and i32 indexing). (#2507) #2506 and #2507 have been squashed together to avoid a performance regression. This is a stepping stone to supporting custom-page-sizes (which will need to be software-bounds-checked) (#2508).
keithw
force-pushed
the
w2c-custom-page-sizes
branch
from
December 18, 2024 03:14
a5c6e43
to
6f5face
Compare
@sbc100 @shravanrn This is now ripe for review against the main branch. |
sbc100
approved these changes
Jan 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Sequenced behind #2507)
This adds support for the custom-page-sizes proposal to wasm2c. It passes the custom-page-sizes tests (including the ones in WebAssembly/custom-page-sizes#31 that haven't made it to the testsuite repo and WABT yet).