[riscv64] Simulator build fails on macOS with an ambiguous call to setCallResult
Categories
(Core :: JavaScript Engine: JIT, defect, P2)
Tracking
()
People
(Reporter: andrew, Assigned: andrew)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 external file)
Building the JS shell with --enable-simulator=riscv64 on a macOS host fails:
js/src/jit/riscv64/Simulator-riscv64.cpp: error: call to member function 'setCallResult' is ambiguous
ABI_FUNCTION_TYPE_RISCV64_SIM_DISPATCH
note: expanded from macro 'ABI_FUNCTION_TYPE_RISCV64_SIM_DISPATCH'
setCallResult(ret);
note: candidate function: void Simulator::setCallResult(int64_t res)
note: candidate function: void Simulator::setCallResult(__int128_t res)
The dispatch generated by GenerateABIFunctionType.py since bug 1975350 passes the result of a native call with a General return type, an intptr_t, straight to setCallResult, which has int64_t and __int128 overloads. On Linux intptr_t and int64_t are both long, but on macOS int64_t is long long, so the long result converts equally well to either overload.
Bug 1967367 fixed the same problem in the loong64 and mips64 simulators with a Darwin-only setCallResult(intptr_t) overload. For riscv64 the generator can instead convert General results with I64, as it already does for Int32 results.
| Assignee | ||
Comment 1•11 days ago
|
||
The generated simulator dispatch passed General results, which are
intptr_t, straight to setCallResult, which has int64_t and __int128
overloads. On macOS intptr_t is long and int64_t is long long, so the
call is ambiguous and the riscv64 simulator does not compile. Convert
General results with I64, as Int32 results already are.
Updated•11 days ago
|
Comment 2•11 days ago
|
||
Set release status flags based on info from the regressing bug 1975350
Updated•11 days ago
|
Updated•11 days ago
|
Comment 3•9 days ago
|
||
Set release status flags based on info from the regressing bug 1975350
Updated•9 days ago
|
Updated•5 days ago
|
Comment 5•5 days ago
|
||
| bugherder | ||
Description
•