Commit 8224bdf4 authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC/s390: Reland "[no-wasm] Exclude src/wasm from compilation"

Port 3f9ff062

Original Commit Message:

    This is a reland of 80f5dfda. A condition
    in pipeline.cc was inverted, which lead to a CSA verifier error.

    Original change's description:
    > [no-wasm] Exclude src/wasm from compilation
    >
    > This is the biggest chunk, including
    > - all of src/wasm,
    > - torque file for wasm objects,
    > - torque file for wasm builtins,
    > - wasm builtins,
    > - wasm runtime functions,
    > - int64 lowering,
    > - simd scala lowering,
    > - WasmGraphBuilder (TF graph construction for wasm),
    > - wasm frame types,
    > - wasm interrupts,
    > - the JSWasmCall opcode,
    > - wasm backing store allocation.
    >
    > Those components are all recursively entangled, so I found no way to
    > split this change up further.
    >
    > Some includes that were recursively included by wasm headers needed to
    > be added explicitly now.
    >
    > backing-store-unittest.cc is renamed to wasm-backing-store-unittest.cc
    > because it only tests wasm backing stores. This file is excluded from
    > no-wasm builds then.
    >
    > R=jkummerow@chromium.org, jgruber@chromium.org, mlippautz@chromium.org, petermarshall@chromium.org
    >
    > Bug: v8:11238
    > Change-Id: I7558f2d12d2dd6c65128c4de7b79173668c80b2b
    > Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2742955
    > Commit-Queue: Clemens Backes <clemensb@chromium.org>
    > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
    > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    > Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    > Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    > Reviewed-by: Jakob Gruber <jgruber@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#73344}

R=clemensb@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: I006f32407aea051c960f32942f9353f415547116
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2753143Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73357}
parent 33c9fca3
......@@ -21,8 +21,11 @@
#include "src/objects/js-generator.h"
#include "src/objects/smi.h"
#include "src/runtime/runtime.h"
#if V8_ENABLE_WEBASSEMBLY
#include "src/wasm/wasm-linkage.h"
#include "src/wasm/wasm-objects.h"
#endif // V8_ENABLE_WEBASSEMBLY
namespace v8 {
namespace internal {
......@@ -2391,6 +2394,7 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
RelocInfo::CODE_TARGET);
}
#if V8_ENABLE_WEBASSEMBLY
void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
// The function index was put in a register by the jump table trampoline.
// Convert to Smi for the runtime call.
......@@ -2503,6 +2507,12 @@ void Builtins::Generate_WasmDebugBreak(MacroAssembler* masm) {
__ Ret();
}
void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) {
// TODO(v8:10701): Implement for this platform.
__ Trap();
}
#endif // V8_ENABLE_WEBASSEMBLY
void Builtins::Generate_CEntry(MacroAssembler* masm, int result_size,
SaveFPRegsMode save_doubles, ArgvMode argv_mode,
bool builtin_exit_frame) {
......@@ -2800,11 +2810,6 @@ void Builtins::Generate_DoubleToI(MacroAssembler* masm) {
__ Ret();
}
void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) {
// TODO(v8:10701): Implement for this platform.
__ Trap();
}
namespace {
static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
......
......@@ -21,8 +21,11 @@
#include "src/objects/js-generator.h"
#include "src/objects/smi.h"
#include "src/runtime/runtime.h"
#if V8_ENABLE_WEBASSEMBLY
#include "src/wasm/wasm-linkage.h"
#include "src/wasm/wasm-objects.h"
#endif // V8_ENABLE_WEBASSEMBLY
namespace v8 {
namespace internal {
......@@ -2440,6 +2443,7 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
RelocInfo::CODE_TARGET);
}
#if V8_ENABLE_WEBASSEMBLY
void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
// The function index was put in a register by the jump table trampoline.
// Convert to Smi for the runtime call.
......@@ -2541,6 +2545,12 @@ void Builtins::Generate_WasmDebugBreak(MacroAssembler* masm) {
__ Ret();
}
void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) {
// TODO(v8:10701): Implement for this platform.
__ Trap();
}
#endif // V8_ENABLE_WEBASSEMBLY
void Builtins::Generate_CEntry(MacroAssembler* masm, int result_size,
SaveFPRegsMode save_doubles, ArgvMode argv_mode,
bool builtin_exit_frame) {
......@@ -2830,11 +2840,6 @@ void Builtins::Generate_DoubleToI(MacroAssembler* masm) {
__ Ret();
}
void Builtins::Generate_GenericJSToWasmWrapper(MacroAssembler* masm) {
// TODO(v8:10701): Implement for this platform.
__ Trap();
}
namespace {
static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
......
......@@ -1795,11 +1795,12 @@ void TurboAssembler::TruncateDoubleToI(Isolate* isolate, Zone* zone,
// Put input on stack.
stfdu(double_input, MemOperand(sp, -kDoubleSize));
if (stub_mode == StubCallMode::kCallWasmRuntimeStub) {
#if V8_ENABLE_WEBASSEMBLY
if (stub_mode == StubCallMode::kCallWasmRuntimeStub) {
Call(wasm::WasmCode::kDoubleToI, RelocInfo::WASM_STUB_CALL);
#else
UNREACHABLE();
// For balance.
if (false) {
#endif // V8_ENABLE_WEBASSEMBLY
} else {
Call(BUILTIN_CODE(isolate, DoubleToI), RelocInfo::CODE_TARGET);
......
......@@ -1841,11 +1841,12 @@ void TurboAssembler::TruncateDoubleToI(Isolate* isolate, Zone* zone,
lay(sp, MemOperand(sp, -kDoubleSize));
StoreF64(double_input, MemOperand(sp));
if (stub_mode == StubCallMode::kCallWasmRuntimeStub) {
#if V8_ENABLE_WEBASSEMBLY
if (stub_mode == StubCallMode::kCallWasmRuntimeStub) {
Call(wasm::WasmCode::kDoubleToI, RelocInfo::WASM_STUB_CALL);
#else
UNREACHABLE();
// For balance.
if (false) {
#endif // V8_ENABLE_WEBASSEMBLY
} else {
Call(BUILTIN_CODE(isolate, DoubleToI), RelocInfo::CODE_TARGET);
......
......@@ -3942,13 +3942,14 @@ void CodeGenerator::AssembleConstructFrame() {
auto call_descriptor = linkage()->GetIncomingDescriptor();
if (frame_access_state()->has_frame()) {
if (call_descriptor->IsCFunctionCall()) {
if (info()->GetOutputStackFrameType() == StackFrame::C_WASM_ENTRY) {
#if V8_ENABLE_WEBASSEMBLY
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
UNREACHABLE();
// For balance.
if (false) {
#endif // V8_ENABLE_WEBASSEMBLY
} else {
__ mflr(r0);
......
......@@ -4272,13 +4272,14 @@ void CodeGenerator::AssembleConstructFrame() {
if (frame_access_state()->has_frame()) {
if (call_descriptor->IsCFunctionCall()) {
if (info()->GetOutputStackFrameType() == StackFrame::C_WASM_ENTRY) {
#if V8_ENABLE_WEBASSEMBLY
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
UNREACHABLE();
// For balance.
if (false) {
#endif // V8_ENABLE_WEBASSEMBLY
} else {
__ Push(r14, fp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment