@@ -219,6 +219,27 @@ inline void S128NarrowOp(LiftoffAssembler* assm, NeonDataType dt,
219219 }
220220}
221221
222+ inline void F64x2CompareEquality (LiftoffAssembler* assm, LiftoffRegister dst,
223+ LiftoffRegister lhs, LiftoffRegister rhs,
224+ Condition cond) {
225+ QwNeonRegister dest = liftoff::GetSimd128Register (dst);
226+ QwNeonRegister left = liftoff::GetSimd128Register (lhs);
227+ QwNeonRegister right = liftoff::GetSimd128Register (rhs);
228+ UseScratchRegisterScope temps (assm);
229+ Register scratch = temps.Acquire ();
230+
231+ assm->mov (scratch, Operand (0 ));
232+ assm->VFPCompareAndSetFlags (left.low (), right.low ());
233+
234+ assm->mov (scratch, Operand (-1 ), LeaveCC, cond);
235+ assm->vmov (dest.low (), scratch, scratch);
236+
237+ assm->mov (scratch, Operand (0 ));
238+ assm->VFPCompareAndSetFlags (left.high (), right.high ());
239+ assm->mov (scratch, Operand (-1 ), LeaveCC, cond);
240+ assm->vmov (dest.high (), scratch, scratch);
241+ }
242+
222243} // namespace liftoff
223244
224245int LiftoffAssembler::PrepareStackFrame () {
@@ -2263,7 +2284,9 @@ void LiftoffAssembler::emit_i8x16_eq(LiftoffRegister dst, LiftoffRegister lhs,
22632284
22642285void LiftoffAssembler::emit_i8x16_ne (LiftoffRegister dst, LiftoffRegister lhs,
22652286 LiftoffRegister rhs) {
2266- bailout (kSimd , " i8x16_ne" );
2287+ vceq (Neon8, liftoff::GetSimd128Register (dst),
2288+ liftoff::GetSimd128Register (lhs), liftoff::GetSimd128Register (rhs));
2289+ vmvn (liftoff::GetSimd128Register (dst), liftoff::GetSimd128Register (dst));
22672290}
22682291
22692292void LiftoffAssembler::emit_i16x8_eq (LiftoffRegister dst, LiftoffRegister lhs,
@@ -2274,7 +2297,9 @@ void LiftoffAssembler::emit_i16x8_eq(LiftoffRegister dst, LiftoffRegister lhs,
22742297
22752298void LiftoffAssembler::emit_i16x8_ne (LiftoffRegister dst, LiftoffRegister lhs,
22762299 LiftoffRegister rhs) {
2277- bailout (kSimd , " i16x8_ne" );
2300+ vceq (Neon16, liftoff::GetSimd128Register (dst),
2301+ liftoff::GetSimd128Register (lhs), liftoff::GetSimd128Register (rhs));
2302+ vmvn (liftoff::GetSimd128Register (dst), liftoff::GetSimd128Register (dst));
22782303}
22792304
22802305void LiftoffAssembler::emit_i32x4_eq (LiftoffRegister dst, LiftoffRegister lhs,
@@ -2285,7 +2310,9 @@ void LiftoffAssembler::emit_i32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
22852310
22862311void LiftoffAssembler::emit_i32x4_ne (LiftoffRegister dst, LiftoffRegister lhs,
22872312 LiftoffRegister rhs) {
2288- bailout (kSimd , " i32x4_ne" );
2313+ vceq (Neon32, liftoff::GetSimd128Register (dst),
2314+ liftoff::GetSimd128Register (lhs), liftoff::GetSimd128Register (rhs));
2315+ vmvn (liftoff::GetSimd128Register (dst), liftoff::GetSimd128Register (dst));
22892316}
22902317
22912318void LiftoffAssembler::emit_f32x4_eq (LiftoffRegister dst, LiftoffRegister lhs,
@@ -2296,32 +2323,19 @@ void LiftoffAssembler::emit_f32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
22962323
22972324void LiftoffAssembler::emit_f32x4_ne (LiftoffRegister dst, LiftoffRegister lhs,
22982325 LiftoffRegister rhs) {
2299- bailout (kSimd , " f32x4_ne" );
2326+ vceq (liftoff::GetSimd128Register (dst), liftoff::GetSimd128Register (lhs),
2327+ liftoff::GetSimd128Register (rhs));
2328+ vmvn (liftoff::GetSimd128Register (dst), liftoff::GetSimd128Register (dst));
23002329}
23012330
23022331void LiftoffAssembler::emit_f64x2_eq (LiftoffRegister dst, LiftoffRegister lhs,
23032332 LiftoffRegister rhs) {
2304- QwNeonRegister dest = liftoff::GetSimd128Register (dst);
2305- QwNeonRegister left = liftoff::GetSimd128Register (lhs);
2306- QwNeonRegister right = liftoff::GetSimd128Register (rhs);
2307- UseScratchRegisterScope temps (this );
2308- Register scratch = temps.Acquire ();
2309-
2310- mov (scratch, Operand (0 ));
2311- VFPCompareAndSetFlags (left.low (), right.low ());
2312-
2313- mov (scratch, Operand (-1 ), LeaveCC, eq);
2314- vmov (dest.low (), scratch, scratch);
2315-
2316- mov (scratch, Operand (0 ));
2317- VFPCompareAndSetFlags (left.high (), right.high ());
2318- mov (scratch, Operand (-1 ), LeaveCC, eq);
2319- vmov (dest.high (), scratch, scratch);
2333+ liftoff::F64x2CompareEquality (this , dst, lhs, rhs, eq);
23202334}
23212335
23222336void LiftoffAssembler::emit_f64x2_ne (LiftoffRegister dst, LiftoffRegister lhs,
23232337 LiftoffRegister rhs) {
2324- bailout ( kSimd , " f64x2_ne " );
2338+ liftoff::F64x2CompareEquality ( this , dst, lhs, rhs, ne );
23252339}
23262340
23272341void LiftoffAssembler::emit_s128_not (LiftoffRegister dst, LiftoffRegister src) {
0 commit comments