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

Port: d6c4c884fc

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: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72084}
This commit is contained in:
LiuYu 2021-01-12 21:05:13 +08:00 committed by Commit Bot
parent 31bf056fbf
commit 0de6101698
2 changed files with 14 additions and 0 deletions

View File

@ -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");

View File

@ -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());