New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JSC][ARMv7] Support callee save FPRs #777
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://bugs.webkit.org/show_bug.cgi?id=240376
Reviewed by NOBODY (OOPS!).
ARMv7 FPRs d8-d15 (also referenced as s16-s32 and q4-q7) are callee
save, but currently JSC is unaware of this. This does not currently
cause problems as they are not used, but will be used by the Wasm
JITs.In preparation for the 32-bit ports of the Wasm JITs, this patch:
- Teaches JSC about callee save FPRs on ARMv7
- To achieve the above, we need to modify RegisterAtOffsetList as GPRs
and FPRs have different sizes on JSVALUE32_64 platforms- Changes offlineasm and MacroAssemblerARMv7 to use d15 as the FP
scratch register
Can you describe why d15 is picked for FP scratch register?
It is callee-save register, and usually we pick caller-save register for scratch.
- Adds the ARMv7 specific registers to
RegisterSet::macroScratchRegisters()
- assembler/ARMv7Registers.h:
- assembler/MacroAssemblerARMv7.h:
- b3/air/AirCode.cpp:
(JSC::B3::Air::Code::calleeSaveRegisterAtOffsetList const):
(JSC::B3::Air::Code::dump const):- b3/testb3_7.cpp:
(testInfiniteLoopDoesntCauseBadHoisting):- bytecode/CodeBlock.cpp:
(JSC::CodeBlock::llintBaselineCalleeSaveSpaceAsVirtualRegisters):
(JSC::CodeBlock::calleeSaveSpaceAsVirtualRegisters):
(JSC::roundCalleeSaveSpaceAsVirtualRegisters): Deleted.- bytecode/ValueRecovery.h:
(JSC::ValueRecovery::calleeSaveGPRDisplacedInJSStack):
(JSC::ValueRecovery::calleeSaveRegDisplacedInJSStack): Deleted.- dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):- dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::calleeSaveSlot):- ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):- interpreter/Interpreter.cpp:
(JSC::UnwindFunctor::copyCalleeSavesToEntryFrameCalleeSavesBuffer const):- jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::restoreCalleeSavesFromEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::restoreCalleeSavesFromVMEntryFrameCalleeSavesBufferImpl):
(JSC::AssemblyHelpers::copyCalleeSavesToEntryFrameCalleeSavesBufferImpl):
(JSC::AssemblyHelpers::emitSave):
(JSC::AssemblyHelpers::emitRestore):
(JSC::AssemblyHelpers::emitSaveCalleeSavesFor):
(JSC::AssemblyHelpers::emitRestoreCalleeSavesFor):
(JSC::AssemblyHelpers::copyLLIntBaselineCalleeSavesFromFrameOrRegisterToEntryFrameCalleeSavesBuffer):
(JSC::AssemblyHelpers::emitSaveOrCopyLLIntBaselineCalleeSavesFor):- jit/CallFrameShuffleData.cpp:
(JSC::CallFrameShuffleData::setupCalleeSaveRegisters):- jit/CallFrameShuffler.h:
(JSC::CallFrameShuffler::snapshot const):- jit/CallFrameShuffler32_64.cpp:
(JSC::CallFrameShuffler::emitDisplace):- jit/FPRInfo.h:
- jit/GPRInfo.h:
- jit/RegisterAtOffsetList.cpp:
(JSC::RegisterAtOffsetList::RegisterAtOffsetList):- jit/RegisterAtOffsetList.h:
(JSC::RegisterAtOffsetList::registerCount const):
(JSC::RegisterAtOffsetList::sizeOfAreaInBytes const):
(JSC::RegisterAtOffsetList::adjustOffsets):
(JSC::RegisterAtOffsetList::size const): Deleted.
(JSC::RegisterAtOffsetList::at): Deleted.- jit/RegisterSet.cpp:
(JSC::RegisterSet::macroScratchRegisters):
(JSC::RegisterSet::vmCalleeSaveRegisters):- llint/LowLevelInterpreter.asm:
- offlineasm/arm.rb:
- wasm/js/JSToWasm.cpp:
(JSC::Wasm::createJSToWasmWrapper):- wasm/js/WasmToJS.cpp:
(JSC::Wasm::wasmToJS):- wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):
I expanded the commit message to explain this. |
Fixed the other comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
f6e563b
to
49a1ecc
Compare
7b96a1b
to
ed693bd
Compare
No reviewer information in commit message, blocking PR #777 |
No reviewer information in commit message, blocking PR #777 |
0d82d46
to
60a5bb3
Compare
Committed r294794 (250952@main): https://commits.webkit.org/250952@main Reviewed commits have been landed. Closing PR #777 and removing active labels. |
60a5bb3