Define WASM_SUPPORTS_HUGE_MEMORY for more 64-bit architectures
Categories
(Core :: JavaScript: WebAssembly, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox117 | --- | fixed |
People
(Reporter: rhunt, Assigned: bvisness, NeedInfo)
References
Details
Attachments
(2 files)
WASM_SUPPORTS_HUGE_MEMORY is only enabled for two specific 64-bit architectures. I don't know of any reason this cannot be enabled for any 64-bit architecture. We should relax this for RISC-V 64, MIPS64. etc.
[1 ] https://searchfox.org/mozilla-central/source/js/src/js-config.mozbuild#10
Reporter | ||
Comment 1•2 years ago
|
||
Ben, can you take a look at this as you were in this area recently?
Assignee | ||
Comment 2•2 years ago
|
||
Comment 3•2 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:bvisness, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
The WebAssembly engine in SpiderMonkey has the ability to remove bounds check from memory accesses by reserving a large enough region of virtual memory for each wasm memory. Internally this is called 'huge memory'.
Ben and I discovered that this was disabled for RISC-V and LoongArch64, and we don't think there is any reason that needs to be the case. I'm needinfo'ing the maintainers of these backends just in case they think there's some reason they should be excluded. The main effect on code generation is that we no longer omit bounds checks. If you don't think there's an issue, let me know and we'll land this patch to enable it on these platforms.
Reporter | ||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Thanks for your information, I found several jit-tests failed on loong64 with wasm huge memory, I will have a look at it.
Updated•2 years ago
|
Comment 8•1 year ago
|
||
bugherder |
Description
•