Skip to content

Commit 4b3aafc

Browse files
committed
Revert "git apply WebKit/pull/51369"
This reverts commit 69fa271.
1 parent 69fa271 commit 4b3aafc

File tree

3 files changed

+4
-19
lines changed

3 files changed

+4
-19
lines changed

Source/JavaScriptCore/heap/MachineStackMarker.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,8 @@ static inline int osRedZoneAdjustment()
5959
// See http://people.freebsd.org/~obrien/amd64-elf-abi.pdf Section 3.2.2.
6060
redZoneAdjustment = -128;
6161
#elif CPU(ARM64)
62-
#if OS(DARWIN)
6362
// See https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html#//apple_ref/doc/uid/TP40013702-SW7
6463
redZoneAdjustment = -128;
65-
#elif OS(WINDOWS)
66-
// https://devblogs.microsoft.com/oldnewthing/20220726-00/?p=106898
67-
redZoneAdjustment = -16;
68-
#else
69-
// There is no red zone.
70-
// https://stackoverflow.com/questions/77908878/aarch64-is-there-a-red-zone-on-linux-if-so-16-or-128-bytes
71-
#endif
7264
#endif
7365
return redZoneAdjustment;
7466
}

Source/JavaScriptCore/wasm/WasmBBQJIT.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3151,7 +3151,7 @@ ControlData WARN_UNUSED_RETURN BBQJIT::addTopLevel(BlockSignature signature)
31513151

31523152
m_pcToCodeOriginMapBuilder.appendItem(m_jit.label(), PCToCodeOriginMapBuilder::defaultCodeOrigin());
31533153
m_jit.emitFunctionPrologue();
3154-
emitPushCalleeSaves();
3154+
emitSaveCalleeSaves();
31553155
m_topLevel = ControlData(*this, BlockType::TopLevel, signature, 0);
31563156

31573157
JIT_COMMENT(m_jit, "Store boxed JIT callee");
@@ -3332,7 +3332,7 @@ MacroAssembler::Label BBQJIT::addLoopOSREntrypoint()
33323332
// - Don't need to zero our locals, since they are restored from the OSR entry scratch buffer anyway.
33333333
auto label = m_jit.label();
33343334
m_jit.emitFunctionPrologue();
3335-
emitPushCalleeSaves();
3335+
emitSaveCalleeSaves();
33363336

33373337
m_jit.move(CCallHelpers::TrustedImmPtr(CalleeBits::boxNativeCallee(&m_callee)), wasmScratchGPR);
33383338
static_assert(CallFrameSlot::codeBlock + 1 == CallFrameSlot::callee);
@@ -5318,15 +5318,8 @@ Expected<std::unique_ptr<InternalFunction>, String> parseAndCompileBBQ(Compilati
53185318
return result;
53195319
}
53205320

5321-
void BBQJIT::emitPushCalleeSaves()
5321+
void BBQJIT::emitSaveCalleeSaves()
53225322
{
5323-
size_t stackSizeForCalleeSaves = WTF::roundUpToMultipleOf<stackAlignmentBytes()>(RegisterAtOffsetList::bbqCalleeSaveRegisters().registerCount() * sizeof(UCPURegister));
5324-
#if CPU(X86_64) || CPU(ARM64)
5325-
m_jit.subPtr(GPRInfo::callFrameRegister, TrustedImm32(stackSizeForCalleeSaves), MacroAssembler::stackPointerRegister);
5326-
#else
5327-
m_jit.subPtr(GPRInfo::callFrameRegister, TrustedImm32(stackSizeForCalleeSaves), wasmScratchGPR);
5328-
m_jit.move(wasmScratchGPR, MacroAssembler::stackPointerRegister);
5329-
#endif
53305323
m_jit.emitSaveCalleeSavesFor(&RegisterAtOffsetList::bbqCalleeSaveRegisters());
53315324
}
53325325

Source/JavaScriptCore/wasm/WasmBBQJIT.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2230,7 +2230,7 @@ class BBQJIT {
22302230

22312231
void emitIncrementCallProfileCount(unsigned callProfileIndex);
22322232

2233-
void emitPushCalleeSaves();
2233+
void emitSaveCalleeSaves();
22342234
void emitRestoreCalleeSaves();
22352235

22362236
WasmOrigin origin();

0 commit comments

Comments
 (0)