| Fix build when JIT is disabled on 32bit systems |
| |
| This fixes a compile time assert |
| js/src/wasm/WasmFrame.cpp:57:3: error: static_assert failed due to requirement '(__builtin_offsetof(js::wasm::DebugFrame, frame_) + sizeof(js::wasm::Frame)) % Alignment == 0' "Aligned after pushing DebugFrame" |
| static_assert((offsetof(DebugFrame, frame_) + sizeof(Frame)) % Alignment == 0, |
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| |
| Upstream-Status: Pending |
| Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| |
| --- a/js/src/wasm/WasmFrame.h |
| +++ b/js/src/wasm/WasmFrame.h |
| @@ -230,6 +230,8 @@ class DebugFrame { |
| // Avoid -Wunused-private-field warnings. |
| protected: |
| #if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_ARM) || \ |
| + (defined(JS_CODEGEN_NONE) && \ |
| + (defined(__riscv) && __riscv_xlen == 32) || defined(__mips__)) || \ |
| defined(JS_CODEGEN_X86) || defined(__wasi__) |
| // See alignmentStaticAsserts(). For MIPS32, ARM32 and X86 DebugFrame is only |
| // 4-byte aligned, so we add another word to get up to 8-byte |