Commit 0de61016 authored by LiuYu's avatar LiuYu Committed by Commit Bot

[mips][wasm-simd][liftoff] Implement i64x2.bitmask

Port: d6c4c884

Bug: v8:10997
Change-Id: I9659b28988ef8528a1d558e3d1334a54c5bf3b58
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2624101
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72084}
parent 31bf056f
......@@ -2291,6 +2291,11 @@ void LiftoffAssembler::emit_i64x2_neg(LiftoffRegister dst,
bailout(kSimd, "emit_i64x2_neg");
}
void LiftoffAssembler::emit_i64x2_bitmask(LiftoffRegister dst,
LiftoffRegister src) {
bailout(kSimd, "emit_i64x2_bitmask");
}
void LiftoffAssembler::emit_i64x2_shl(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
bailout(kSimd, "emit_i64x2_shl");
......
......@@ -2276,6 +2276,15 @@ void LiftoffAssembler::emit_i64x2_neg(LiftoffRegister dst,
subv_d(dst.fp().toW(), kSimd128RegZero, src.fp().toW());
}
void LiftoffAssembler::emit_i64x2_bitmask(LiftoffRegister dst,
LiftoffRegister src) {
srli_d(kSimd128RegZero, src.fp().toW(), 63);
shf_w(kSimd128ScratchReg, kSimd128RegZero, 0x02);
slli_d(kSimd128ScratchReg, kSimd128ScratchReg, 1);
or_v(kSimd128RegZero, kSimd128RegZero, kSimd128ScratchReg);
copy_u_b(dst.gp(), kSimd128RegZero, 0);
}
void LiftoffAssembler::emit_i64x2_shl(LiftoffRegister dst, LiftoffRegister lhs,
LiftoffRegister rhs) {
fill_d(kSimd128ScratchReg, rhs.gp());
......
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