Commit 5ad83ebe authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

s390x: [liftoff] implement rounding for liftoff

Change-Id: Id823d29cc0827ee3df5e3ae0c1bf5efdd3d405cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2692847Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#72717}
parent 02c80dbf
......@@ -896,13 +896,29 @@ bool LiftoffAssembler::emit_i32_popcnt(Register dst, Register src) {
bool LiftoffAssembler::emit_i64_popcnt(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kUnsupportedArchitecture, "i64_popcnt");
Popcnt64(dst.gp(), src.gp());
return true;
}
void LiftoffAssembler::emit_i64_addi(LiftoffRegister dst, LiftoffRegister lhs,
int64_t imm) {
bailout(kUnsupportedArchitecture, "i64_addi");
bool LiftoffAssembler::emit_f32_ceil(DoubleRegister dst, DoubleRegister src) {
fiebra(ROUND_TOWARD_POS_INF, dst, src);
return true;
}
bool LiftoffAssembler::emit_f32_floor(DoubleRegister dst, DoubleRegister src) {
fiebra(ROUND_TOWARD_NEG_INF, dst, src);
return true;
}
bool LiftoffAssembler::emit_f32_trunc(DoubleRegister dst, DoubleRegister src) {
fiebra(ROUND_TOWARD_0, dst, src);
return true;
}
bool LiftoffAssembler::emit_f32_nearest_int(DoubleRegister dst,
DoubleRegister src) {
fiebra(ROUND_TO_NEAREST_TO_EVEN, dst, src);
return true;
}
void LiftoffAssembler::emit_f64_min(DoubleRegister dst, DoubleRegister lhs,
......@@ -923,6 +939,27 @@ void LiftoffAssembler::emit_f32_min(DoubleRegister dst, DoubleRegister lhs,
FloatMin(dst, lhs, rhs);
}
bool LiftoffAssembler::emit_f64_ceil(DoubleRegister dst, DoubleRegister src) {
fidbra(ROUND_TOWARD_POS_INF, dst, src);
return true;
}
bool LiftoffAssembler::emit_f64_floor(DoubleRegister dst, DoubleRegister src) {
fidbra(ROUND_TOWARD_NEG_INF, dst, src);
return true;
}
bool LiftoffAssembler::emit_f64_trunc(DoubleRegister dst, DoubleRegister src) {
fidbra(ROUND_TOWARD_0, dst, src);
return true;
}
bool LiftoffAssembler::emit_f64_nearest_int(DoubleRegister dst,
DoubleRegister src) {
fidbra(ROUND_TO_NEAREST_TO_EVEN, dst, src);
return true;
}
void LiftoffAssembler::emit_f64_max(DoubleRegister dst, DoubleRegister lhs,
DoubleRegister rhs) {
if (CpuFeatures::IsSupported(VECTOR_ENHANCE_FACILITY_1)) {
......@@ -991,14 +1028,6 @@ bool LiftoffAssembler::emit_i64_remu(LiftoffRegister dst, LiftoffRegister lhs,
return true;
}
void LiftoffAssembler::emit_i64_clz(LiftoffRegister dst, LiftoffRegister src) {
bailout(kUnsupportedArchitecture, "i64_clz");
}
void LiftoffAssembler::emit_i64_ctz(LiftoffRegister dst, LiftoffRegister src) {
bailout(kUnsupportedArchitecture, "i64_ctz");
}
void LiftoffAssembler::emit_u32_to_intptr(Register dst, Register src) {
#ifdef V8_TARGET_ARCH_S390X
bailout(kUnsupportedArchitecture, "emit_u32_to_intptr");
......@@ -2342,6 +2371,16 @@ void LiftoffStackSlots::Construct() {
asm_->bailout(kUnsupportedArchitecture, "LiftoffStackSlots::Construct");
}
void LiftoffAssembler::emit_f64_copysign(DoubleRegister dst, DoubleRegister lhs,
DoubleRegister rhs) {
bailout(kUnsupportedArchitecture, "emit_f64_copysign");
}
void LiftoffAssembler::emit_f32_copysign(DoubleRegister dst, DoubleRegister lhs,
DoubleRegister rhs) {
bailout(kUnsupportedArchitecture, "emit_f32_copysign");
}
} // namespace wasm
} // namespace internal
} // namespace v8
......
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