-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update wasm threads proposal tests and fix cmpxchg_u #19200
Update wasm threads proposal tests and fix cmpxchg_u #19200
Conversation
https://bugs.webkit.org/show_bug.cgi?id=263292 rdar://117102231 Reviewed by NOBODY (OOPS!). In WebAssembly/threads#195, it was documented that JSC implements cmpxchg_u without wrapping the expected value. Previously, the spec tests and reference interpreter followed this interpretation, but the spec text, SpiderMonkey and v8 did the wrapping. The spec tests were updated, and this new behaviour is simpler anyway, so let's just do it. * JSTests/wasm/spec-tests/atomic.wast.js: Added. * JSTests/wasm/spec-tests/binary-leb128.wast.js: * JSTests/wasm/spec-tests/binary.wast.js: * JSTests/wasm/spec-tests/br_table.wast.js: * JSTests/wasm/spec-tests/elem.wast.js: * JSTests/wasm/spec-tests/float_literals.wast.js: * JSTests/wasm/threads-spec-tests/atomic-signed.wast.js: * Source/JavaScriptCore/llint/WebAssembly64.asm: * Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::B3IRGenerator::emitAtomicCompareExchange): * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJIT::emitAtomicCompareExchange):
EWS run on current version of this PR (hash 6b5f203) |
// elem.wast:688 | ||
register("module4", $module4) | ||
|
||
// elem.wast:690 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to figure out why we fail this
@@ -671,7 +671,7 @@ run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x0 | |||
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7e\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x24\x31\x04\x69\x6e\x69\x74\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x02\x40\x42\xf0\xe1\xc3\x87\x8f\x9e\xbc\xf8\x70\x10\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // run(() => call($1, "init", [int64("-1_085_102_592_571_150_096")])) | |||
|
|||
// atomic-signed.wast:402 | |||
assert_return(() => call($1, "i32.atomic.rmw8.cmpxchg_u", [0, -252_645_136, 17]), 240); | |||
// assert_return(() => call($1, "i32.atomic.rmw8.cmpxchg_u", [0, -252_645_136, 17]), 240); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is no longer included upstream, so I just commented out the bad tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update the IPInt while we're at it? Note, there's no testing in automation for IPInt so you'll have to run the spec tests by hand with --useWasmIPInt=1
6b5f203
6b5f203