Closed Bug 1701159 Opened 4 years ago Closed 3 years ago

[MIPS64] Fix mips64 emulator bugs

Categories

(Core :: JavaScript Engine: JIT, task, P1)

Other
Linux
task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- affected

People

(Reporter: zhaojiazhong-hf, Assigned: zhaojiazhong-hf)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently the mips64 emulator have some bugs to be fixed, I will try to fix them and make sure the mips64el r2 emulator work.

Blocks: 1639895

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.

  • Add some new function prototypes support
  • Add wsbh/dsbh/dshd instructions support
  • Sign-extend ins/lwr instructions' result
Assignee: nobody → zhaojiazhong-hf

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.

Summary: [MIPS64] FIx mips64 emulator bugs → [MIPS64] Fix mips64 emulator bugs

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

(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.

(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.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

Reopening, as I think the intent here was to leave-open while we're waiting for other fixes.

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: FIXED → ---
Keywords: leave-open
Severity: -- → N/A
Priority: -- → P1

(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.

Status: REOPENED → RESOLVED
Closed: 4 years ago3 years ago
Keywords: leave-open
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: