PPC/s390: [wasm-c-api] Faster C-to-Wasm entry
Port e304d80e09
Original Commit Message:
powered by a new function Execution::CallWasm and a corresponding,
Turbofan-generated CWasmEntry stub. This entirely sidesteps the
traditional Execution::Invoke -> JSEntryStub path.
R=jkummerow@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N
Change-Id: I87c85f3506c4e4dae12e462dd3c7790bc9ab25d1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1680798
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62429}
This commit is contained in:
parent
1a7b24012b
commit
934f375a75
@ -2326,14 +2326,20 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
auto call_descriptor = linkage()->GetIncomingDescriptor();
|
||||
if (frame_access_state()->has_frame()) {
|
||||
if (call_descriptor->IsCFunctionCall()) {
|
||||
__ mflr(r0);
|
||||
if (FLAG_enable_embedded_constant_pool) {
|
||||
__ Push(r0, fp, kConstantPoolRegister);
|
||||
// Adjust FP to point to saved FP.
|
||||
__ subi(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset));
|
||||
if (info()->GetOutputStackFrameType() == StackFrame::C_WASM_ENTRY) {
|
||||
__ StubPrologue(StackFrame::C_WASM_ENTRY);
|
||||
// Reserve stack space for saving the c_entry_fp later.
|
||||
__ addi(sp, sp, Operand(-kSystemPointerSize));
|
||||
} else {
|
||||
__ Push(r0, fp);
|
||||
__ mr(fp, sp);
|
||||
__ mflr(r0);
|
||||
if (FLAG_enable_embedded_constant_pool) {
|
||||
__ Push(r0, fp, kConstantPoolRegister);
|
||||
// Adjust FP to point to saved FP.
|
||||
__ subi(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset));
|
||||
} else {
|
||||
__ Push(r0, fp);
|
||||
__ mr(fp, sp);
|
||||
}
|
||||
}
|
||||
} else if (call_descriptor->IsJSFunctionCall()) {
|
||||
__ Prologue();
|
||||
|
@ -3024,8 +3024,14 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
|
||||
if (frame_access_state()->has_frame()) {
|
||||
if (call_descriptor->IsCFunctionCall()) {
|
||||
__ Push(r14, fp);
|
||||
__ LoadRR(fp, sp);
|
||||
if (info()->GetOutputStackFrameType() == StackFrame::C_WASM_ENTRY) {
|
||||
__ StubPrologue(StackFrame::C_WASM_ENTRY);
|
||||
// Reserve stack space for saving the c_entry_fp later.
|
||||
__ lay(sp, MemOperand(sp, -kSystemPointerSize));
|
||||
} else {
|
||||
__ Push(r14, fp);
|
||||
__ LoadRR(fp, sp);
|
||||
}
|
||||
} else if (call_descriptor->IsJSFunctionCall()) {
|
||||
__ Prologue(ip);
|
||||
if (call_descriptor->PushArgumentCount()) {
|
||||
|
Loading…
Reference in New Issue
Block a user