RESOLVED FIXED 282901
[RISCV] Using lshift64 in MacroAssembler for RISCV
https://bugs.webkit.org/show_bug.cgi?id=282901
Summary [RISCV] Using lshift64 in MacroAssembler for RISCV
MingZhu Yan
Reported 2024-11-10 10:25:08 PST
Meet this error during compiling on my riscv64gc board. ```txt /home/debian/repo/WebKit/Source/JavaScriptCore/assembler/MacroAssembler.h:1044:9: error: no matching member function for call to 'lshift64’ lshift64(imm, shiftAmount, dest); ^~~~~~~~ ```
Attachments
MingZhu Yan
Comment 1 2024-11-10 10:34:56 PST
Radar WebKit Bug Importer
Comment 2 2024-11-17 10:26:13 PST
EWS
Comment 3 2024-11-19 12:21:54 PST
Committed 286814@main (9eb4f2a6c659): <https://commits.webkit.org/286814@main> Reviewed commits have been landed. Closing PR #36463 and removing active labels.
david.abd+webkit
Comment 4 2024-12-09 02:56:06 PST
I am compiling webkitgtk-2.47.2 and still see this or similar issue. I checked `Source/JavaScriptCore/assembler/MacroAssembler.h` to make sure that the file is OK. It seems there are 6 implementations for lshift32 and 5 for lshift64. I assume it needs `void lshift64(TrustedImm32 imm, RegisterID shiftAmount, RegisterID dest)`, which is not implemented. ARM64 has all 6 implemented. Same for X86_64. I didn't check the rest. Error: ``` builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp In file included from /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28: In file included from /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/bytecode/ArithProfile.h:28: In file included from /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/jit/GPRInfo.h:28: In file included from /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/assembler/MacroAssembler.h:85: /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:4612:17: warning: enumeration value 'Carry' not handled in switch [-Wswitch] 4612 | switch (cond) { | ^~~~ In file included from /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28: In file included from /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/bytecode/ArithProfile.h:28: In file included from /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/jit/GPRInfo.h:28: /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/assembler/MacroAssembler.h:1054:9: error: no matching member function for call to 'lshift64' 1054 | lshift64(imm, shiftAmount, dest); | ^~~~~~~~ /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:678:10: note: candidate function not viable: no known conversion from 'TrustedImm32' to 'RegisterID' (aka 'JSC::RISCV64Registers::RegisterID') for 1st argument 678 | void lshift64(RegisterID src, RegisterID shiftAmount, RegisterID dest) | ^ ~~~~~~~~~~~~~~ /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:695:10: note: candidate function not viable: no known conversion from 'TrustedImm32' to 'Address' for 1st argument 695 | void lshift64(Address src, RegisterID shiftAmount, RegisterID dest) | ^ ~~~~~~~~~~~ /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:688:10: note: candidate function not viable: no known conversion from 'TrustedImm32' to 'RegisterID' (aka 'JSC::RISCV64Registers::RegisterID') for 1st argument 688 | void lshift64(RegisterID src, TrustedImm32 imm, RegisterID dest) | ^ ~~~~~~~~~~~~~~ /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:683:10: note: candidate function not viable: requires 2 arguments, but 3 were provided 683 | void lshift64(TrustedImm32 shiftAmount, RegisterID dest) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/webkitgtk-2.47.2-build/webkitgtk-2.47.2/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:673:10: note: candidate function not viable: requires 2 arguments, but 3 were provided 673 | void lshift64(RegisterID shiftAmount, RegisterID dest) | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated. ```
MingZhu Yan
Comment 5 2024-12-09 06:03:46 PST
MingZhu Yan
Comment 6 2024-12-09 06:10:40 PST
I can also reproduce this error; I might have forgotten to commit it before. I just submitted a new PR that at least allows the build pass
EWS
Comment 7 2024-12-09 09:00:21 PST
Committed 287553@main (c8bc3a81f32f): <https://commits.webkit.org/287553@main> Reviewed commits have been landed. Closing PR #37639 and removing active labels.
david.abd+webkit
Comment 8 2024-12-10 01:24:13 PST
I can confirm that https://github.com/WebKit/WebKit/pull/37639 fixed the compilation error. I still cannot build, but that's another compile issue.
Note You need to log in before you can comment on or make changes to this bug.