Summary: | REGRESSION(257865@main): "B3Validate.cpp:455:43: error: ‘toB3Type’ was not declared in this scope" with ENABLE(WEBASSEMBLY_B3JIT) disabled | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jeremy Bicha <jbicha> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | berto, bugs-noreply, justin_michaud, mcatanzaro, webkit-bug-importer, xypron.glpk |
Priority: | P3 | Keywords: | Gtk, InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | PC | ||
OS: | Linux |
Description
Jeremy Bicha
2023-02-22 09:28:27 PST
Try this: diff --git a/Source/JavaScriptCore/b3/B3Validate.cpp b/Source/JavaScriptCore/b3/B3Validate.cpp index 5e8caa8c79f8..0e47cbb43868 100644 --- a/Source/JavaScriptCore/b3/B3Validate.cpp +++ b/Source/JavaScriptCore/b3/B3Validate.cpp @@ -43,6 +43,7 @@ #include "B3Variable.h" #include "B3VariableValue.h" #include "B3WasmBoundsCheckValue.h" +#include <wasm/WasmTypeDefinition.h> #include <wtf/HashSet.h> #include <wtf/StringPrintStream.h> #include <wtf/text/CString.h> Sorry, just kidding. Ignore that and try this instead: diff --git a/Source/JavaScriptCore/b3/B3Validate.cpp b/Source/JavaScriptCore/b3/B3Validate.cpp index 5e8caa8c79f8..f7161389e291 100644 --- a/Source/JavaScriptCore/b3/B3Validate.cpp +++ b/Source/JavaScriptCore/b3/B3Validate.cpp @@ -43,6 +43,7 @@ #include "B3Variable.h" #include "B3VariableValue.h" #include "B3WasmBoundsCheckValue.h" +#include "WasmTypeDefinition.h" #include <wtf/HashSet.h> #include <wtf/StringPrintStream.h> #include <wtf/text/CString.h> My colleague said that with that change, he now gets this error: [1450/6825] cd /<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources && /usr/bin/cmake -E env CMAKE_CXX_COMPILER_ID=GNU GCC_OFFLINEASM_SOURCE_MAP=OFF /us r/bin/ruby /<<PKGBUILDDIR>>/Source/JavaScriptCore/offlineasm/asm.rb -I/<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources/ /<<PKGBUILDDIR>>/Source/Java ScriptCore/llint/LowLevelInterpreter.asm /<<PKGBUILDDIR>>/build-soup2/bin/LLIntOffsetsExtractor /<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources/LLI ntAssembly.h normal --binary-format=ELF && /usr/bin/cmake -E touch_nocreate /<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources/LLIntAssembly.h FAILED: JavaScriptCore/DerivedSources/LLIntAssembly.h /<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources/LLIntAssembly.h cd /<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources && /usr/bin/cmake -E env CMAKE_CXX_COMPILER_ID=GNU GCC_OFFLINEASM_SOURCE_MAP=OFF /usr/bin/ruby / <<PKGBUILDDIR>>/Source/JavaScriptCore/offlineasm/asm.rb -I/<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources/ /<<PKGBUILDDIR>>/Source/JavaScriptCore/l lint/LowLevelInterpreter.asm /<<PKGBUILDDIR>>/build-soup2/bin/LLIntOffsetsExtractor /<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources/LLIntAssembly.h normal --binary-format=ELF && /usr/bin/cmake -E touch_nocreate /<<PKGBUILDDIR>>/build-soup2/JavaScriptCore/DerivedSources/LLIntAssembly.h /<<PKGBUILDDIR>>/Source/JavaScriptCore/offlineasm/ast.rb:958:in `lowerDefault': Unhandled opcode storev at WebAssembly.asm:512 (due to WebAssembly.asm:512) (L oweringError) (In reply to Jeremy Bicha from comment #3) > /<<PKGBUILDDIR>>/Source/JavaScriptCore/offlineasm/ast.rb:958:in > `lowerDefault': Unhandled opcode storev at WebAssembly.asm:512 (due to > WebAssembly.asm:512) (L > oweringError) I suggest reporting a second bug for this. Don't know how to help with that. With +#include "WasmTypeDefinition.h" we get the original error ‘toB3Type’ was not declared in this scope toB3Type is defined in Source/JavaScriptCore/wasm/WasmTypeDefinition.h only if WEBASSEMBLY_B3JIT is enabled. Hence I looked at Source/WTF/wtf/PlatformEnable.h which controls if ENABLE_WEBASSEMBLY_B3JIT is enabled. But the following leads to a new error (Unhandled opcode storev at WebAssembly.asm:512): --- a/Source/WTF/wtf/PlatformEnable.h +++ b/Source/WTF/wtf/PlatformEnable.h @@ -713,7 +713,7 @@ #define ENABLE_B3_JIT 1 #endif · -#if ENABLE(WEBASSEMBLY) && ENABLE(JIT) && CPU(ARM) +#if ENABLE(WEBASSEMBLY) && ENABLE(JIT) && (CPU(ARM) || CPU(RISCV64)) #undef ENABLE_B3_JIT Is WEBASSEMBLY already supported for riscv64? Or should we disable it via a CMake command line argument? Commit ef7690477ad8 ("[JSC] RISCV64 support for WebAssembly https://bugs.webkit.org/show_bug.cgi?id=238007") enabled ENABLE_WEBASSEMBLY and disabled ENABLE_WEBASSEMBLY_B3JIT. There is an inconsistency between Source/JavaScriptCore/b3/B3Validate.cpp which uses #if ENABLE(B3_JIT) and the included Source/JavaScriptCore/wasm/WasmTypeDefinition.h which depends on #if ENABLE(WEBASSEMBLY_B3JIT). If B3_JIT cannot be used for webassembly on RISC-V, why is Source/JavaScriptCore/b3/B3Validate.cpp compiled? (In reply to Heinrich Schuchardt from comment #6) > There is an inconsistency between > > Source/JavaScriptCore/b3/B3Validate.cpp > > which uses #if ENABLE(B3_JIT) and the included > > Source/JavaScriptCore/wasm/WasmTypeDefinition.h > > which depends on #if ENABLE(WEBASSEMBLY_B3JIT). > > If B3_JIT cannot be used for webassembly on RISC-V, why is > Source/JavaScriptCore/b3/B3Validate.cpp compiled? Well it's needed for ENABLE(B3_JIT), of course. Looks like this broke in 257865@main "[SIMD] B3/OMG Support" but I don't know what to do about it. Justin, can you take a look please? Is it safe to just add preprocessor guards around the code that you added? What is the easiest way for me to make a RISC-V build? Qemu? I can just fix it if I can get a build going (In reply to Justin Michaud from comment #9) > What is the easiest way for me to make a RISC-V build? Qemu? Probably, but I don't think you should have to worry about that. I would just try to make ENABLE(B3_JIT) && !ENABLE(WEBASSEMBLY_B3JIT) work again . The rest is somebody else's problem. ;) BTW I just found bug #250681 and everything we've discovered here thus far is already mentioned in the first comment there, so I'll mark this one as the duplicate. *** This bug has been marked as a duplicate of bug 250681 *** |