[MIPS64] Fix mips64 emulator bugs
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | affected |
People
(Reporter: zhaojiazhong-hf, Assigned: zhaojiazhong-hf)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Currently the mips64 emulator have some bugs to be fixed, I will try to fix them and make sure the mips64el r2 emulator work.
Assignee | ||
Comment 1•4 years ago
|
||
Currently there are unaligned operations that will cause the emulator crash, and lth made a workaround with MIPS_UNALIGNED=1 environmen variable. I will fix other bugs first with this workaround.
Assignee | ||
Comment 2•4 years ago
|
||
- Add some new function prototypes support
- Add wsbh/dsbh/dshd instructions support
- Sign-extend ins/lwr instructions' result
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
With the first patch and MIPS_UNALIGNED workaround, the mips64el release build emulator test results:
- jit-test: 8368 passed, 55 failed.
- jstests: 43456 passed, 38 failed.
And according to the error message, there may be two or three bugs still remain in the emulator.
Comment 4•4 years ago
|
||
This seems like a real improvement, thanks for taking care of it.
FWIW, running tests locally on my x64 workstation with the mips64 emulator and this patch applied, like you I still see some failures still (altogether 400 failures, out of about 2200 tests in total) in the wasm and asm.js test suites:
Segfaults:
FAIL - wasm/large-memory.js
FAIL - wasm/memory-partial-oob-store.js
FAIL - wasm/memory.js
FAIL - wasm/exceptions/reftypes.js
Assertion failure: rt != scratch, at /home/lhansen/m-u/js/src/jit/mips64/MacroAssembler-mips64.cpp:439 (several hundred times)
FAIL - wasm/atomic.js
Hit MOZ_CRASH() at /home/lhansen/m-u/js/src/jit/mips64/Simulator-mips64.cpp:1805
FAIL - wasm/exceptions/instructions.js
Hit MOZ_CRASH() at /home/lhansen/m-u/js/src/jit/mips64/Simulator-mips64.cpp:1792
FAIL - wasm/exceptions/instructions.js
Hit MOZ_CRASH() at /home/lhansen/m-u/js/src/jit/mips64/Simulator-mips64.cpp:3934
FAIL - wasm/exceptions/instructions.js
Hit MOZ_CRASH() at /home/lhansen/m-u/js/src/jit/mips64/Simulator-mips64.cpp:593
FAIL - wasm/exceptions/reftypes.js
Hit MOZ_CRASH() at /home/lhansen/m-u/js/src/jit/mips64/Simulator-mips64.cpp:593
FAIL - wasm/exceptions/throw-to-js.js
Hit MOZ_CRASH() at /home/lhansen/m-u/js/src/jit/mips64/Simulator-mips64.cpp:3486
FAIL - wasm/exceptions/throw-to-js.js
Script terminated by interrupt handler.
FAIL - wasm/timeout/stack-overflow.js
/home/lhansen/m-u/js/src/jit-test/tests/asm.js/testMathLib.js:173:9 Error: Assertion failed: got -42, expected 0
Stack:
@/home/lhansen/m-u/js/src/jit-test/tests/asm.js/testMathLib.js:173:9
FAIL - asm.js/testMathLib.js
Assignee | ||
Comment 5•4 years ago
|
||
(In reply to Lars T Hansen [:lth] from comment #4)
FWIW, running tests locally on my x64 workstation with the mips64 emulator and this patch applied, like you I still see some failures still (altogether 400 failures, out of about 2200 tests in total) in the wasm and asm.js test suites:
The assert failure should be fixed by D110086, and I will look into other failures.
Assignee | ||
Comment 6•4 years ago
|
||
(In reply to Zhao Jiazhong from comment #5)
(In reply to Lars T Hansen [:lth] from comment #4)
FWIW, running tests locally on my x64 workstation with the mips64 emulator and this patch applied, like you I still see some failures still (altogether 400 failures, out of about 2200 tests in total) in the wasm and asm.js test suites:
The assert failure should be fixed by D110086, and I will look into other failures.
Sorry, I pasted a wrong url, and it seems I can't edit the message any more, the address should be https://phabricator.services.mozilla.com/D110086.
Comment 8•4 years ago
|
||
bugherder |
Comment 9•4 years ago
|
||
Reopening, as I think the intent here was to leave-open while we're waiting for other fixes.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 10•3 years ago
|
||
(In reply to Lars T Hansen [:lth] from comment #9)
Reopening, as I think the intent here was to leave-open while we're waiting for other fixes.
Closing this bug as we do not want bugs to be associated with patches which have a span over multiple versions of Firefox.
Please open a follow-up bug if you intent to land another set of patches.
Description
•