Revert "Enable WasmLLInt on ARMv7"
Unreviewed.
This reverts commit 2a12d06fc13f7c3bbcf8d204d6f760ab222d75d9.
2a12d06fc13f7c3bbcf8d204d6f760ab222d75d9 breaks WASM on 64-bit platforms.
Canonical link: https://commits.webkit.org/251068@main
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@294965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/wasm/WasmBinding.cpp b/Source/JavaScriptCore/wasm/WasmBinding.cpp
index 3272899..edc70be 100644
--- a/Source/JavaScriptCore/wasm/WasmBinding.cpp
+++ b/Source/JavaScriptCore/wasm/WasmBinding.cpp
@@ -29,7 +29,6 @@
#if ENABLE(WEBASSEMBLY)
#include "CCallHelpers.h"
-#include "DisallowMacroScratchRegisterUsage.h"
#include "LinkBuffer.h"
#include "WasmCallingConvention.h"
#include "WasmInstance.h"
@@ -42,21 +41,18 @@
{
// FIXME: Consider uniquify the stubs based on signature + index to see if this saves memory.
// https://bugs.webkit.org/show_bug.cgi?id=184157
+
+ const PinnedRegisterInfo& pinnedRegs = PinnedRegisterInfo::get();
JIT jit;
GPRReg scratch = wasmCallingConvention().prologueScratchGPRs[0];
-#if USE(JSVALUE32_64)
- GPRReg baseMemory = wasmCallingConvention().prologueScratchGPRs[1];
- GPRReg sizeRegAsScratch = wasmCallingConvention().prologueScratchGPRs[2];
-#else
- const PinnedRegisterInfo& pinnedRegs = PinnedRegisterInfo::get();
GPRReg baseMemory = pinnedRegs.baseMemoryPointer;
- GPRReg sizeRegAsScratch = pinnedRegs.boundsCheckingSizeRegister;
-#endif
ASSERT(baseMemory != GPRReg::InvalidGPRReg);
+ ASSERT(baseMemory != scratch);
+ ASSERT(pinnedRegs.boundsCheckingSizeRegister != baseMemory);
+ ASSERT(pinnedRegs.boundsCheckingSizeRegister != scratch);
+ GPRReg sizeRegAsScratch = pinnedRegs.boundsCheckingSizeRegister;
ASSERT(sizeRegAsScratch != GPRReg::InvalidGPRReg);
- ASSERT(scratch != GPRReg::InvalidGPRReg);
- ASSERT(noOverlap(scratch, baseMemory, sizeRegAsScratch));
// B3's call codegen ensures that the JSCell is a WebAssemblyFunction.
jit.loadWasmContextInstance(sizeRegAsScratch); // Old Instance*
@@ -69,7 +65,6 @@
jit.loadPtr(JIT::Address(sizeRegAsScratch, Instance::offsetOfCachedStackLimit()), sizeRegAsScratch);
jit.storePtr(sizeRegAsScratch, JIT::Address(baseMemory, Instance::offsetOfCachedStackLimit()));
-#if !CPU(ARM) // ARM has no pinned registers for Wasm Memory, so no need to set them up
// FIXME the following code assumes that all Wasm::Instance have the same pinned registers. https://bugs.webkit.org/show_bug.cgi?id=162952
// Set up the callee's baseMemory register as well as the memory size registers.
{
@@ -77,7 +72,6 @@
jit.loadPtr(JIT::Address(baseMemory, Wasm::Instance::offsetOfCachedMemory()), baseMemory); // Wasm::Memory::TaggedArrayStoragePtr<void> (void*).
jit.cageConditionallyAndUntag(Gigacage::Primitive, baseMemory, pinnedRegs.boundsCheckingSizeRegister, wasmCallingConvention().prologueScratchGPRs[1]);
}
-#endif
// Tail call into the callee WebAssembly function.
jit.loadPtr(JIT::Address(scratch), scratch);