https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212
--- Comment #339 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> --- (In reply to John Paul Adrian Glaubitz from comment #335) > (In reply to Kazumoto Kojima from comment #334) > > Created attachment 59216 [details] > > a patch to fix ICE in c#331 > > > > The patch preallocates R0 for those Sid memory patterns so as to shorten the > > live range of R0. Tested target libgcc and libstdc++v3 build and c > > testsuilte only. > > Thanks a lot. I'll give it a try. > > FWIW, the backend has improved quite a lot over the past weeks. The > Dreamcast people reported good results as well! I can confirm that the patch from comment #334 fixes the problem and the build of WebKit now proceeds much further than it used to in the past for a long time. I have not observed any more issues with register spilling, but it seems that I have uncovered a miscompilation bug which leads to the generation of invalid assembler: /usr/bin/g++-15 -DBUILDING_GTK__=1 -DBUILDING_JavaScriptCore -DBUILDING_WEBKIT=1 -DBUILDING_WITH_CMAKE=1 -DGETTEXT_PACKAGE=\"WebKitGTK-4.1\" -DHAVE_CONFIG_H=1 -DJSC_GLIB_API_ENABLED -DJavaScriptCore_EXPORTS -DPAS_BMALLOC=1 -DSTATICALLY_LINKED_WITH_WTF -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCore/Headers -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3 -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/API -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/assembler -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/b3 -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/b3/air -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/bindings -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/builtins -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/bytecode -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/bytecompiler -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/dfg -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/disassembler -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/disassembler/ARM64 -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/disassembler/zydis/Zydis -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/domjit -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/ftl -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/fuzzilli -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/heap -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/debugger -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/inspector -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/inspector/agents -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/inspector/augmentable -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/inspector/remote -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/interpreter -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/jit -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/llint -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/parser -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/profiler -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/runtime -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/tools -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/wasm -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/wasm/js -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/yarr -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCore/DerivedSources -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCore/DerivedSources/inspector -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCore/DerivedSources/runtime -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCore/DerivedSources/yarr -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/API/glib -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCoreGLib/DerivedSources -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCoreGLib/DerivedSources/jsc -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCoreGLib/Headers -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/Source/JavaScriptCore/inspector/remote/glib -I/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/WTF/Headers -isystem /usr/include/glib-2.0 -isystem /usr/lib/sh4-linux-gnu/glib-2.0/include -isystem /usr/include/sysprof-6 -fdiagnostics-color=always -Wextra -Wall -pipe -fmax-errors=20 -Wno-odr -Wno-stringop-overread -Wno-stringop-overflow -Wno-nonnull -Wno-array-bounds -Wno-expansion-to-defined -Wno-noexcept-type -Wno-psabi -Wno-misleading-indentation -Wno-maybe-uninitialized -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wno-tautological-compare -fasynchronous-unwind-tables -fdebug-types-section -g1 -O2 -ffile-prefix-map=/home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -DNDEBUG -DG_DISABLE_CAST_CHECKS -fno-strict-aliasing -fno-exceptions -fno-rtti -fcoroutines -ffunction-sections -fdata-sections -fPIC -fvisibility=hidden -ffp-contract=off -pthread -std=c++23 -MD -MT Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-36.cpp.o -MF Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-36.cpp.o.d -o Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-36.cpp.o -c /home/glaubitz/webkit2gtk-sh4-new-new/webkit2gtk-2.46.0/build-soup3/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-36.cpp (...) {standard input}: Assembler messages: {standard input}:6139: Error: syntax error in @(disp,[Rn, gbr, pc]) {standard input}:6139: Error: invalid operands for opcode {standard input}:54249: Error: syntax error in @(disp,[Rn, gbr, pc]) {standard input}:54249: Error: invalid operands for opcode {standard input}:59575: Error: syntax error in @(disp,[Rn, gbr, pc]) {standard input}:59575: Error: invalid operands for opcode {standard input}:61031: Error: syntax error in @(disp,[Rn, gbr, pc]) {standard input}:61031: Error: invalid operands for opcode I will upload the preprocessed source in the next comment.