Closed Bug 1738997 Opened 3 years ago Closed 3 years ago

MacroAssembler-mips-shared-inl.h:720:7: error: no matching member function for call to 'ma_addPtrTestOverflow'

Categories

(Core :: JavaScript: WebAssembly, defect, P3)

defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox94 --- unaffected
firefox95 --- fixed
firefox96 --- fixed

People

(Reporter: glandium, Assigned: lth)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

[task 2021-11-02T21:25:47.210Z] 21:25:47    ERROR -  /builds/worker/checkouts/gecko/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h:720:7: error: no matching member function for call to 'ma_addPtrTestOverflow'
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -        ma_addPtrTestOverflow(dest, dest, src, label);
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -        ^~~~~~~~~~~~~~~~~~~~~
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  /builds/worker/checkouts/gecko/js/src/wasm/WasmBCMemory.cpp:244:8: note: in instantiation of function template specialization 'js::jit::MacroAssembler::branchAddPtr<js::jit::ImmWord>' requested here
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -    masm.branchAddPtr(Assembler::CarryClear, ImmWord(offset), Register64(ptr).reg,
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -         ^
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  /builds/worker/checkouts/gecko/js/src/jit/mips64/MacroAssembler-mips64.h:121:8: note: candidate function not viable: no known conversion from 'js::jit::ImmWord' to 'js::jit::Register' for 3rd argument
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -    void ma_addPtrTestOverflow(Register rd, Register rs, Register rt,
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -         ^
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  /builds/worker/checkouts/gecko/js/src/jit/mips64/MacroAssembler-mips64.h:123:8: note: candidate function not viable: no known conversion from 'js::jit::ImmWord' to 'js::jit::Imm32' for 3rd argument
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -    void ma_addPtrTestOverflow(Register rd, Register rs, Imm32 imm,
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -         ^
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  In file included from Unified_cpp_js_src_wasm0.cpp:20:
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  In file included from /builds/worker/checkouts/gecko/js/src/wasm/WasmBCFrame.cpp:24:
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  In file included from /builds/worker/checkouts/gecko/js/src/jit/MacroAssembler-inl.h:39:
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  In file included from /builds/worker/checkouts/gecko/js/src/jit/mips64/MacroAssembler-mips64-inl.h:14:
[task 2021-11-02T21:25:47.210Z] 21:25:47    ERROR -  /builds/worker/checkouts/gecko/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h:724:7: error: no matching member function for call to 'ma_addPtrTestCarry'
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -        ma_addPtrTestCarry(cond, dest, dest, src, label);
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -        ^~~~~~~~~~~~~~~~~~
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  /builds/worker/checkouts/gecko/js/src/jit/mips64/MacroAssembler-mips64.h:125:8: note: candidate function not viable: no known conversion from 'js::jit::ImmWord' to 'js::jit::Register' for 4th argument
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -    void ma_addPtrTestCarry(Condition cond, Register rd, Register rs, Register rt,
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -         ^
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  /builds/worker/checkouts/gecko/js/src/jit/mips64/MacroAssembler-mips64.h:127:8: note: candidate function not viable: no known conversion from 'js::jit::ImmWord' to 'js::jit::Imm32' for 4th argument
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -    void ma_addPtrTestCarry(Condition cond, Register rd, Register rs, Imm32 imm,
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -         ^
[task 2021-11-02T21:25:47.210Z] 21:25:47     INFO -  2 errors generated.

That's curious, i know for a fact i test-compiled here... I'll investigate.

The problem is that memory64 is not supported on MIPS, but because this is sometimes a run-time test and not a compile-time test the templates get instantiated for i64 pointers anyway, creating (a) dead code and (b) dependence on functions that don't exist. Ideally I would fix this with well-placed ifdefs in WasmBCMemory.cpp but if that turns into a mess I can instead add the necessary masm functions that always MOZ_CRASH.

Assignee: nobody → lhansen
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P3

When ENABLE_WASM_MEMORY64 is not defined, the isMem32() test will
always return true, and there should be no 64-bit case - instead, that
case could just MOZ_CRASH. This prevents the expansion of templates
for 64-bit code (which would be dead) and means we don't have to
provide masm stubs on platforms that don't support memory64.

Set release status flags based on info from the regressing bug 1736365

Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8151d6a70877
Add missing MEMORY64 ifdefs. r=yury
Regressions: 1739375
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch

Lars, do we ware about having this fix in beta or can I mark 95 as wontfix? Thanks

Flags: needinfo?(lhansen)

Let's ask Mike that question. (Certainly it wouldn't hurt to uplift it.)

Flags: needinfo?(lhansen) → needinfo?(mh+mozilla)

Linux distros that have mips64el ports will need the patch whether it's uplifted or not.

Flags: needinfo?(mh+mozilla)

Comment on attachment 9249008 [details]
Bug 1738997 - Add missing MEMORY64 ifdefs. r?yury

Beta/Release Uplift Approval Request

  • User impact if declined: MIPS distros will need to take patch manually.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It's just ifdeffery; either it compiles, in which case it works, or it does not compile.
  • String changes made/needed:
Attachment #9249008 - Flags: approval-mozilla-beta?

Comment on attachment 9249008 [details]
Bug 1738997 - Add missing MEMORY64 ifdefs. r?yury

Approved for 95 beta 5, thanks.

Attachment #9249008 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: