Skip to content

Commit b972069

Browse files
zjiazCommit Bot
authored andcommitted
[mips][wasm-simd][liftoff] Implement all_true
Port b379953 https://crrev.com/c/2220446 Change-Id: I5de86c0aaf0f9262fd9cd63078c75c0013f5c962 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2223886 Reviewed-by: Clemens Backes <[email protected]> Commit-Queue: Zhao Jiazhong <[email protected]> Cr-Commit-Position: refs/heads/master@{#68088}
1 parent b4226ce commit b972069

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

src/wasm/baseline/mips/liftoff-assembler-mips.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,11 @@ void LiftoffAssembler::emit_v8x16_anytrue(LiftoffRegister dst,
17821782
bailout(kSimd, "emit_v8x16_anytrue");
17831783
}
17841784

1785+
void LiftoffAssembler::emit_v8x16_alltrue(LiftoffRegister dst,
1786+
LiftoffRegister src) {
1787+
bailout(kSimd, "emit_v8x16_alltrue");
1788+
}
1789+
17851790
void LiftoffAssembler::emit_i8x16_shl(LiftoffRegister dst, LiftoffRegister lhs,
17861791
LiftoffRegister rhs) {
17871792
bailout(kSimd, "emit_i8x16_shl");
@@ -1887,6 +1892,11 @@ void LiftoffAssembler::emit_v16x8_anytrue(LiftoffRegister dst,
18871892
bailout(kSimd, "emit_v16x8_anytrue");
18881893
}
18891894

1895+
void LiftoffAssembler::emit_v16x8_alltrue(LiftoffRegister dst,
1896+
LiftoffRegister src) {
1897+
bailout(kSimd, "emit_v16x8_alltrue");
1898+
}
1899+
18901900
void LiftoffAssembler::emit_i16x8_shl(LiftoffRegister dst, LiftoffRegister lhs,
18911901
LiftoffRegister rhs) {
18921902
bailout(kSimd, "emit_i16x8_shl");
@@ -1992,6 +2002,11 @@ void LiftoffAssembler::emit_v32x4_anytrue(LiftoffRegister dst,
19922002
bailout(kSimd, "emit_v32x4_anytrue");
19932003
}
19942004

2005+
void LiftoffAssembler::emit_v32x4_alltrue(LiftoffRegister dst,
2006+
LiftoffRegister src) {
2007+
bailout(kSimd, "emit_v32x4_alltrue");
2008+
}
2009+
19952010
void LiftoffAssembler::emit_i32x4_shl(LiftoffRegister dst, LiftoffRegister lhs,
19962011
LiftoffRegister rhs) {
19972012
bailout(kSimd, "emit_i32x4_shl");

src/wasm/baseline/mips64/liftoff-assembler-mips64.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,16 @@ inline void EmitAnyTrue(LiftoffAssembler* assm, LiftoffRegister dst,
13311331
assm->bind(&all_false);
13321332
}
13331333

1334+
inline void EmitAllTrue(LiftoffAssembler* assm, LiftoffRegister dst,
1335+
LiftoffRegister src, MSABranchDF msa_branch_df) {
1336+
Label all_true;
1337+
assm->BranchMSA(&all_true, msa_branch_df, all_not_zero, src.fp().toW(),
1338+
USE_DELAY_SLOT);
1339+
assm->li(dst.gp(), 1);
1340+
assm->li(dst.gp(), 0l);
1341+
assm->bind(&all_true);
1342+
}
1343+
13341344
} // namespace liftoff
13351345

13361346
void LiftoffAssembler::emit_f32_set_cond(Condition cond, Register dst,
@@ -1680,6 +1690,11 @@ void LiftoffAssembler::emit_v8x16_anytrue(LiftoffRegister dst,
16801690
liftoff::EmitAnyTrue(this, dst, src);
16811691
}
16821692

1693+
void LiftoffAssembler::emit_v8x16_alltrue(LiftoffRegister dst,
1694+
LiftoffRegister src) {
1695+
liftoff::EmitAllTrue(this, dst, src, MSA_BRANCH_B);
1696+
}
1697+
16831698
void LiftoffAssembler::emit_i8x16_shl(LiftoffRegister dst, LiftoffRegister lhs,
16841699
LiftoffRegister rhs) {
16851700
fill_b(kSimd128ScratchReg, rhs.gp());
@@ -1789,6 +1804,11 @@ void LiftoffAssembler::emit_v16x8_anytrue(LiftoffRegister dst,
17891804
liftoff::EmitAnyTrue(this, dst, src);
17901805
}
17911806

1807+
void LiftoffAssembler::emit_v16x8_alltrue(LiftoffRegister dst,
1808+
LiftoffRegister src) {
1809+
liftoff::EmitAllTrue(this, dst, src, MSA_BRANCH_H);
1810+
}
1811+
17921812
void LiftoffAssembler::emit_i16x8_shl(LiftoffRegister dst, LiftoffRegister lhs,
17931813
LiftoffRegister rhs) {
17941814
fill_h(kSimd128ScratchReg, rhs.gp());
@@ -1898,6 +1918,11 @@ void LiftoffAssembler::emit_v32x4_anytrue(LiftoffRegister dst,
18981918
liftoff::EmitAnyTrue(this, dst, src);
18991919
}
19001920

1921+
void LiftoffAssembler::emit_v32x4_alltrue(LiftoffRegister dst,
1922+
LiftoffRegister src) {
1923+
liftoff::EmitAllTrue(this, dst, src, MSA_BRANCH_W);
1924+
}
1925+
19011926
void LiftoffAssembler::emit_i32x4_shl(LiftoffRegister dst, LiftoffRegister lhs,
19021927
LiftoffRegister rhs) {
19031928
fill_w(kSimd128ScratchReg, rhs.gp());

0 commit comments

Comments
 (0)