Skip to content

Commit

Permalink
PPC/s390: [wasm-simd] Add i64x2 ne and alltrue
Browse files Browse the repository at this point in the history
Port 910d92e

Original Commit Message:

    This is a partial revert of https://crrev.com/c/2457669 to add back
    i64x2.ne and i64x2.all_true, which were accepted into the proposal
    (WebAssembly/simd#419).

    This only implements it for x64 and arm64 on TurboFan, other archs and
    Liftoff will come later.

[email protected], [email protected], [email protected], [email protected]
BUG=
LOG=N

Change-Id: I9aedc94f665a7e02426e0abe44cea72176063942
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2668830
Reviewed-by: Junliang Yan <[email protected]>
Reviewed-by: Milad Fa <[email protected]>
Commit-Queue: Milad Fa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#72494}
  • Loading branch information
miladfarca authored and Commit Bot committed Feb 2, 2021
1 parent 3fca8f8 commit 809b648
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/compiler/backend/s390/code-generator-s390.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3257,6 +3257,14 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
Condition(0), Condition(0), Condition(2));
break;
}
case kS390_I64x2Ne: {
__ vceq(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1), Condition(0), Condition(3));
__ vno(i.OutputSimd128Register(), i.OutputSimd128Register(),
i.OutputSimd128Register(), Condition(0), Condition(0),
Condition(3));
break;
}
case kS390_I32x4Ne: {
__ vceq(i.OutputSimd128Register(), i.InputSimd128Register(0),
i.InputSimd128Register(1), Condition(0), Condition(2));
Expand Down Expand Up @@ -3559,6 +3567,10 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
__ vtm(kScratchDoubleReg, kScratchDoubleReg, Condition(0), Condition(0), \
Condition(0)); \
__ locgr(Condition(8), dst, temp);
case kS390_V64x2AllTrue: {
SIMD_ALL_TRUE(3)
break;
}
case kS390_V32x4AllTrue: {
SIMD_ALL_TRUE(2)
break;
Expand Down
2 changes: 2 additions & 0 deletions src/compiler/backend/s390/instruction-codes-s390.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ namespace compiler {
V(S390_I64x2UConvertI32x4Low) \
V(S390_I64x2UConvertI32x4High) \
V(S390_I64x2SignSelect) \
V(S390_I64x2Ne) \
V(S390_I32x4Splat) \
V(S390_I32x4ExtractLane) \
V(S390_I32x4ReplaceLane) \
Expand Down Expand Up @@ -377,6 +378,7 @@ namespace compiler {
V(S390_I8x16Shuffle) \
V(S390_I8x16Swizzle) \
V(S390_I8x16SignSelect) \
V(S390_V64x2AllTrue) \
V(S390_V32x4AllTrue) \
V(S390_V16x8AllTrue) \
V(S390_V8x16AllTrue) \
Expand Down
2 changes: 2 additions & 0 deletions src/compiler/backend/s390/instruction-scheduler-s390.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ int InstructionScheduler::GetTargetInstructionFlags(
case kS390_I64x2UConvertI32x4Low:
case kS390_I64x2UConvertI32x4High:
case kS390_I64x2SignSelect:
case kS390_I64x2Ne:
case kS390_I32x4Splat:
case kS390_I32x4ExtractLane:
case kS390_I32x4ReplaceLane:
Expand Down Expand Up @@ -324,6 +325,7 @@ int InstructionScheduler::GetTargetInstructionFlags(
case kS390_I8x16Shuffle:
case kS390_I8x16Swizzle:
case kS390_I8x16SignSelect:
case kS390_V64x2AllTrue:
case kS390_V32x4AllTrue:
case kS390_V16x8AllTrue:
case kS390_V8x16AllTrue:
Expand Down

0 comments on commit 809b648

Please sign in to comment.