Skip to content

Commit 188a908

Browse files
author
Mark Lam
committed
Revert "Enable WasmLLInt on ARMv7"
Unreviewed. This reverts commit 2a12d06. 2a12d06 breaks WASM on 64-bit platforms. Canonical link: https://commits.webkit.org/251069@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 6433017 commit 188a908

59 files changed

Lines changed: 1700 additions & 4028 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎JSTests/stress/sampling-profiler-wasm-name-section.js‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// This test is statistical, and without optimizing Wasm tiers the likelihood
2-
// of hitting the deepest expected stack trace is very low, so disable.
3-
// FIXME: remove when 32-bit platforms support optimizing Wasm tiers
4-
//@ skip if ["arm", "mips"].include?($architecture)
5-
//
61
//@ runDefault
72

83
/*

‎JSTests/stress/sampling-profiler-wasm.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//@ skip if $architecture == "arm"
21
//@ runDefault
32

43
if (platformSupportsSamplingProfiler() && $vm.isWasmSupported()) {

‎JSTests/wasm/regress/llint-callee-saves-with-fast-memory.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//@ skip if $architecture == "arm"
21
//@ requireOptions("--useWebAssemblyFastMemory=true")
32

43
import * as assert from '../assert.js';

‎Source/JavaScriptCore/CMakeLists.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,6 @@ set(LLINT_ASM
200200
llint/LowLevelInterpreter32_64.asm
201201
llint/LowLevelInterpreter64.asm
202202
llint/WebAssembly.asm
203-
llint/WebAssembly32_64.asm
204-
llint/WebAssembly64.asm
205203
)
206204

207205
set(OFFLINE_ASM

‎Source/JavaScriptCore/assembler/ARMv7Assembler.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,10 +1991,10 @@ class ARMv7Assembler {
19911991
m_formatter.vfpOp(OP_VCMP, OP_VCMPb, true, VFPOperand(5), rd, VFPOperand(0));
19921992
}
19931993

1994-
void vcvt_signedToFloatingPoint(FPDoubleRegisterID rd, FPSingleRegisterID rm, bool toDouble = true)
1994+
void vcvt_signedToFloatingPoint(FPDoubleRegisterID rd, FPSingleRegisterID rm)
19951995
{
19961996
// boolean values are 64bit (toInt, unsigned, roundZero)
1997-
m_formatter.vfpOp(OP_VCVT_FPIVFP, OP_VCVT_FPIVFPb, toDouble, vcvtOp(false, false, false), rd, rm);
1997+
m_formatter.vfpOp(OP_VCVT_FPIVFP, OP_VCVT_FPIVFPb, true, vcvtOp(false, false, false), rd, rm);
19981998
}
19991999

20002000
void vcvt_floatingPointToSigned(FPSingleRegisterID rd, FPDoubleRegisterID rm)

‎Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,12 +1467,6 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler<Assembler> {
14671467
CRASH();
14681468
}
14691469

1470-
void convertInt32ToFloat(RegisterID src, FPRegisterID dest)
1471-
{
1472-
m_assembler.vmov(fpTempRegister, src, src);
1473-
m_assembler.vcvt_signedToFloatingPoint(dest, fpTempRegisterAsSingle(), /* toDouble: */ false);
1474-
}
1475-
14761470
void convertInt32ToDouble(RegisterID src, FPRegisterID dest)
14771471
{
14781472
m_assembler.vmov(fpTempRegister, src, src);
@@ -2304,14 +2298,6 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler<Assembler> {
23042298
return Call(m_assembler.b(), Call::LinkableNearTail);
23052299
}
23062300

2307-
// FIXME: why is this the same than nearCall() in ARM64? is it right?
2308-
ALWAYS_INLINE Call threadSafePatchableNearCall()
2309-
{
2310-
invalidateAllTempRegisters();
2311-
moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister);
2312-
return Call(m_assembler.blx(dataTempRegister), Call::LinkableNear);
2313-
}
2314-
23152301
ALWAYS_INLINE Call call(PtrTag)
23162302
{
23172303
moveFixedWidthEncoding(TrustedImm32(0), dataTempRegister);
@@ -2336,12 +2322,6 @@ class MacroAssemblerARMv7 : public AbstractMacroAssembler<Assembler> {
23362322
ALWAYS_INLINE Call call(RegisterID target, RegisterID callTag) { return UNUSED_PARAM(callTag), call(target, NoPtrTag); }
23372323
ALWAYS_INLINE Call call(Address address, RegisterID callTag) { return UNUSED_PARAM(callTag), call(address, NoPtrTag); }
23382324

2339-
ALWAYS_INLINE void callOperation(const FunctionPtr<OperationPtrTag> operation)
2340-
{
2341-
move(TrustedImmPtr(operation.executableAddress()), addressTempRegister);
2342-
call(addressTempRegister, OperationPtrTag);
2343-
}
2344-
23452325
ALWAYS_INLINE void ret()
23462326
{
23472327
m_assembler.bx(linkRegister);

‎Source/JavaScriptCore/b3/B3ValueRep.h‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,9 @@ class ValueRep {
126126
ValueRep(Wasm::ValueLocation location)
127127
{
128128
switch (location.kind()) {
129-
case Wasm::ValueLocation::Kind::GPRRegister:
129+
case Wasm::ValueLocation::Kind::Register:
130130
m_kind = Register;
131-
u.reg = location.jsr().payloadGPR();
132-
break;
133-
case Wasm::ValueLocation::Kind::FPRRegister:
134-
m_kind = Register;
135-
u.reg = location.fpr();
131+
u.reg = location.reg();
136132
break;
137133
case Wasm::ValueLocation::Kind::Stack:
138134
m_kind = Stack;

‎Source/JavaScriptCore/bytecode/BytecodeDumper.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ CString BytecodeDumper::formatConstant(Type type, uint64_t constant) const
413413
if (isFuncref(type) || isExternref(type)) {
414414
if (JSValue::decode(constant) == jsNull())
415415
return "null";
416-
return toCString(RawPointer(bitwise_cast<void*>(static_cast<uintptr_t>(constant))));
416+
return toCString(RawPointer(bitwise_cast<void*>(constant)));
417417
}
418418

419419
RELEASE_ASSERT_NOT_REACHED();

‎Source/JavaScriptCore/interpreter/CallFrame.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ namespace JSC {
167167
// to see if it's a cell, and if it's not, we throw an exception.
168168
inline JSValue guaranteedJSValueCallee() const;
169169
inline JSObject* jsCallee() const;
170-
CalleeBits callee() const { return CalleeBits(this[static_cast<int>(CallFrameSlot::callee)].unboxedInt64()); }
171-
SUPPRESS_ASAN CalleeBits unsafeCallee() const { return CalleeBits(this[static_cast<int>(CallFrameSlot::callee)].asanUnsafeUnboxedInt64()); }
170+
CalleeBits callee() const { return CalleeBits(this[static_cast<int>(CallFrameSlot::callee)].pointer()); }
171+
SUPPRESS_ASAN CalleeBits unsafeCallee() const { return CalleeBits(this[static_cast<int>(CallFrameSlot::callee)].asanUnsafePointer()); }
172172
CodeBlock* codeBlock() const;
173173
CodeBlock** addressOfCodeBlock() const { return bitwise_cast<CodeBlock**>(this + static_cast<int>(CallFrameSlot::codeBlock)); }
174174
inline SUPPRESS_ASAN CodeBlock* unsafeCodeBlock() const;

‎Source/JavaScriptCore/interpreter/CalleeBits.h‎

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -39,46 +39,30 @@ class JSCell;
3939
class CalleeBits {
4040
public:
4141
CalleeBits() = default;
42-
CalleeBits(int64_t value)
43-
#if USE(JSVALUE64)
44-
: m_ptr { reinterpret_cast<void*>(value) }
45-
#elif USE(JSVALUE32_64)
46-
: m_ptr { reinterpret_cast<void*>(JSValue::decode(value).payload()) }
47-
, m_tag { JSValue::decode(value).tag() }
48-
#endif
49-
{ }
42+
CalleeBits(void* ptr) : m_ptr(ptr) { }
5043

5144
CalleeBits& operator=(JSCell* cell)
5245
{
5346
m_ptr = cell;
54-
#if USE(JSVALUE32_64)
55-
m_tag = JSValue::CellTag;
56-
#endif
5747
ASSERT(isCell());
5848
return *this;
5949
}
6050

6151
#if ENABLE(WEBASSEMBLY)
6252
static void* boxWasm(Wasm::Callee* callee)
6353
{
64-
#if USE(JSVALUE64)
65-
CalleeBits result { reinterpret_cast<int64_t>(callee) | JSValue::WasmTag };
54+
CalleeBits result(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(callee) | JSValue::WasmTag));
6655
ASSERT(result.isWasm());
6756
return result.rawPtr();
68-
#elif USE(JSVALUE32_64)
69-
return callee; // The pointer is as is, but the corresponding tag field needs to be set to WasmTag separately.
70-
#endif
7157
}
7258
#endif
7359

7460
bool isWasm() const
7561
{
76-
#if !ENABLE(WEBASSEMBLY)
77-
return false;
78-
#elif USE(JSVALUE64)
62+
#if ENABLE(WEBASSEMBLY)
7963
return (reinterpret_cast<uintptr_t>(m_ptr) & JSValue::WasmMask) == JSValue::WasmTag;
80-
#elif USE(JSVALUE32_64)
81-
return m_tag == JSValue::WasmTag;
64+
#else
65+
return false;
8266
#endif
8367
}
8468
bool isCell() const { return !isWasm(); }
@@ -93,21 +77,14 @@ class CalleeBits {
9377
Wasm::Callee* asWasmCallee() const
9478
{
9579
ASSERT(isWasm());
96-
#if USE(JSVALUE64)
9780
return reinterpret_cast<Wasm::Callee*>(reinterpret_cast<uintptr_t>(m_ptr) & ~JSValue::WasmTag);
98-
#elif USE(JSVALUE32_64)
99-
return reinterpret_cast<Wasm::Callee*>(m_ptr);
100-
#endif
10181
}
10282
#endif
10383

10484
void* rawPtr() const { return m_ptr; }
105-
85+
10686
private:
10787
void* m_ptr { nullptr };
108-
#if USE(JSVALUE32_64)
109-
uint32_t m_tag { JSValue::EmptyValueTag };
110-
#endif
11188
};
11289

11390
} // namespace JSC

0 commit comments

Comments
 (0)