Commit 28740a36 authored by Milad Fa's avatar Milad Fa Committed by Commit Bot

PPC/s390: [wasm-gc] Liftoff support part 2

Port 5e18ab50

Original Commit Message:

    This adds support for the following instructions:
    br_on_null, ref.as_non_null, br_on_cast, i31.new

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

Change-Id: Ia234f2749e401feeaf68e6b7f0b1ba2403eaa77d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2593648Reviewed-by: 's avatarJunliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#71774}
parent 5e18ab50
......@@ -1925,7 +1925,7 @@ void TurboAssembler::Abort(AbortReason reason) {
// will not return here
}
void MacroAssembler::LoadMap(Register destination, Register object) {
void TurboAssembler::LoadMap(Register destination, Register object) {
LoadTaggedPointerField(destination,
FieldMemOperand(object, HeapObject::kMapOffset));
}
......
......@@ -600,6 +600,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void JumpIfEqual(Register x, int32_t y, Label* dest);
void JumpIfLessThan(Register x, int32_t y, Label* dest);
void LoadMap(Register destination, Register object);
#if V8_TARGET_ARCH_PPC64
inline void TestIfInt32(Register value, Register scratch,
CRegister cr = cr7) {
......@@ -773,8 +775,6 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
void LeaveExitFrame(bool save_doubles, Register argument_count,
bool argument_count_is_length = false);
void LoadMap(Register destination, Register object);
// Load the global proxy from the current context.
void LoadGlobalProxy(Register dst) {
LoadNativeContextSlot(Context::GLOBAL_PROXY_INDEX, dst);
......
......@@ -1959,7 +1959,7 @@ void TurboAssembler::Abort(AbortReason reason) {
// will not return here
}
void MacroAssembler::LoadMap(Register destination, Register object) {
void TurboAssembler::LoadMap(Register destination, Register object) {
LoadTaggedPointerField(destination,
FieldMemOperand(object, HeapObject::kMapOffset));
}
......
......@@ -72,6 +72,8 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void JumpIfEqual(Register x, int32_t y, Label* dest);
void JumpIfLessThan(Register x, int32_t y, Label* dest);
void LoadMap(Register destination, Register object);
void Call(Register target);
void Call(Address target, RelocInfo::Mode rmode, Condition cond = al);
void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
......@@ -1156,8 +1158,6 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
void LeaveExitFrame(bool save_doubles, Register argument_count,
bool argument_count_is_length = false);
void LoadMap(Register destination, Register object);
// Load the global proxy from the current context.
void LoadGlobalProxy(Register dst) {
LoadNativeContextSlot(Context::GLOBAL_PROXY_INDEX, dst);
......
......@@ -335,7 +335,7 @@ void LiftoffAssembler::FillStackSlotsWithZero(int start, int size) {
}
UNIMPLEMENTED_I32_BINOP_I(i32_add)
UNIMPLEMENTED_I32_BINOP(i32_sub)
UNIMPLEMENTED_I32_BINOP_I(i32_sub)
UNIMPLEMENTED_I32_BINOP(i32_mul)
UNIMPLEMENTED_I32_BINOP_I(i32_and)
UNIMPLEMENTED_I32_BINOP_I(i32_or)
......@@ -522,6 +522,12 @@ void LiftoffAssembler::emit_cond_jump(LiftoffCondition liftoff_cond,
bailout(kUnsupportedArchitecture, "emit_cond_jump");
}
void LiftoffAssembler::emit_i32_cond_jumpi(LiftoffCondition liftoff_cond,
Label* label, Register lhs,
int32_t imm) {
bailout(kUnsupportedArchitecture, "emit_i32_cond_jumpi");
}
void LiftoffAssembler::emit_i32_eqz(Register dst, Register src) {
bailout(kUnsupportedArchitecture, "emit_i32_eqz");
}
......@@ -569,6 +575,11 @@ void LiftoffAssembler::LoadTransform(LiftoffRegister dst, Register src_addr,
bailout(kSimd, "Load transform unimplemented");
}
void LiftoffAssembler::emit_smi_check(Register obj, Label* target,
SmiCheckMode mode) {
bailout(kUnsupportedArchitecture, "emit_smi_check");
}
void LiftoffAssembler::emit_i8x16_swizzle(LiftoffRegister dst,
LiftoffRegister lhs,
LiftoffRegister rhs) {
......
......@@ -383,7 +383,7 @@ void LiftoffAssembler::FillStackSlotsWithZero(int start, int size) {
}
UNIMPLEMENTED_I32_BINOP_I(i32_add)
UNIMPLEMENTED_I32_BINOP(i32_sub)
UNIMPLEMENTED_I32_BINOP_I(i32_sub)
UNIMPLEMENTED_I32_BINOP(i32_mul)
UNIMPLEMENTED_I32_BINOP_I(i32_and)
UNIMPLEMENTED_I32_BINOP_I(i32_or)
......@@ -631,6 +631,12 @@ void LiftoffAssembler::emit_cond_jump(LiftoffCondition liftoff_cond,
b(cond, label);
}
void LiftoffAssembler::emit_i32_cond_jumpi(LiftoffCondition liftoff_cond,
Label* label, Register lhs,
int32_t imm) {
bailout(kUnsupportedArchitecture, "emit_i32_cond_jumpi");
}
void LiftoffAssembler::emit_i32_eqz(Register dst, Register src) {
bailout(kUnsupportedArchitecture, "emit_i32_eqz");
}
......@@ -695,6 +701,11 @@ bool LiftoffAssembler::emit_select(LiftoffRegister dst, Register condition,
return false;
}
void LiftoffAssembler::emit_smi_check(Register obj, Label* target,
SmiCheckMode mode) {
bailout(kUnsupportedArchitecture, "emit_smi_check");
}
void LiftoffAssembler::LoadTransform(LiftoffRegister dst, Register src_addr,
Register offset_reg, uintptr_t offset_imm,
LoadType type,
......
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