-
Notifications
You must be signed in to change notification settings - Fork 111
don't legalize f32 calls when emulated function pointers #195
Conversation
…ed table is ok either way
Looks like this breaks |
Hi, I can't get the testsuite to fail:
I get this result with and without patching myfastcomp. |
I don't recall a recent fix for this, but maybe I forgot... Where is that test, btw? Trying to run it on incoming, I don't see it. |
The test is the one you referenced just above, it's in emscripten (not in fastcomp).
There's a recent commit in fastcomp 1af410b that might be related, but I didn't check. |
Thanks @Beuc, I think I had a typo or something before... not sure how I didn't find it... Testing it now, it does pass in the main test suite, but if you set ``EMULATED_FUNCTION_POINTERS`, which is the relevant mode for this, then it fails. I actually see it fail that way even before this PR, but we should get that passing before landing this, as it's directly relevant - and I'm not sure if we have another test that covers this. |
(it took me a few tries to type it correctly as well, haha) Got it - one needs to modify |
The test failure looks like emscripten/#6759 - float parameters currently don't work well in WASM+EMULATED_FUNCTION_POINTER_CASTS. |
Running the test directly:
Without this PR applied, if I patch-up the generated test.js like this:
or even like this:
I get the expected behavior for With this PR applied, the generated JS is like my first patch-up, but the test.wasm is vastly different. |
This issue may go away thanks to emscripten-core/emscripten#7656 , as it changes how we do emulated function pointers. If not, it should also just work in the LLVM wasm backend, which we hope to suggest people switch to soon (as that doesn't have any special emulated function pointers mode). |
Is the LLVM wasm backend still incompatible with Emterpreter? |
|
The emulated table is ok either way, it doesn't need legal calls like real wasm calls do.
This may fix emscripten-core/emscripten#5436, but should be tested carefully before landing.