Skip to content

Commit

Permalink
[Arm64] ASIMD ReverseElement8 ReverseElement16 ReverseElement32 (dotn…
Browse files Browse the repository at this point in the history
  • Loading branch information
echesakov authored Jul 7, 2020
1 parent 792fd1d commit a014fbd
Show file tree
Hide file tree
Showing 41 changed files with 12,582 additions and 144 deletions.
15 changes: 15 additions & 0 deletions src/coreclr/src/jit/hwintrinsiccodegenarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,21 @@ void CodeGen::genHWIntrinsic(GenTreeHWIntrinsic* node)
}
break;

case NI_AdvSimd_ReverseElement16:
GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op1Reg,
(emitSize == EA_8BYTE) ? INS_OPTS_4H : INS_OPTS_8H);
break;

case NI_AdvSimd_ReverseElement32:
GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op1Reg,
(emitSize == EA_8BYTE) ? INS_OPTS_2S : INS_OPTS_4S);
break;

case NI_AdvSimd_ReverseElement8:
GetEmitter()->emitIns_R_R(ins, emitSize, targetReg, op1Reg,
(emitSize == EA_8BYTE) ? INS_OPTS_8B : INS_OPTS_16B);
break;

default:
unreached();
}
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/src/jit/hwintrinsiclistarm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ HARDWARE_INTRINSIC(AdvSimd, ReciprocalEstimate,
HARDWARE_INTRINSIC(AdvSimd, ReciprocalSquareRootEstimate, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_ursqrte, INS_invalid, INS_invalid, INS_frsqrte, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag)
HARDWARE_INTRINSIC(AdvSimd, ReciprocalSquareRootStep, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frsqrts, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative)
HARDWARE_INTRINSIC(AdvSimd, ReciprocalStep, -1, 2, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frecps, INS_invalid}, HW_Category_SIMD, HW_Flag_Commutative)
HARDWARE_INTRINSIC(AdvSimd, ReverseElement16, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rev32, INS_rev32, INS_rev64, INS_rev64, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen)
HARDWARE_INTRINSIC(AdvSimd, ReverseElement32, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_rev64, INS_rev64, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen)
HARDWARE_INTRINSIC(AdvSimd, ReverseElement8, -1, 1, {INS_invalid, INS_invalid, INS_rev16, INS_rev16, INS_rev32, INS_rev32, INS_rev64, INS_rev64, INS_invalid, INS_invalid}, HW_Category_SIMD, HW_Flag_SpecialCodeGen)
HARDWARE_INTRINSIC(AdvSimd, RoundAwayFromZero, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frinta, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag)
HARDWARE_INTRINSIC(AdvSimd, RoundAwayFromZeroScalar, 8, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frinta, INS_frinta}, HW_Category_SIMD, HW_Flag_SIMDScalar)
HARDWARE_INTRINSIC(AdvSimd, RoundToNearest, -1, 1, {INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_invalid, INS_frintn, INS_invalid}, HW_Category_SIMD, HW_Flag_NoFlag)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,30 @@
<Compile Include="ReciprocalSquareRootStep.Vector128.Single.cs" />
<Compile Include="ReciprocalStep.Vector64.Single.cs" />
<Compile Include="ReciprocalStep.Vector128.Single.cs" />
<Compile Include="ReverseElement16.Vector64.Int32.cs" />
<Compile Include="ReverseElement16.Vector64.Int64.cs" />
<Compile Include="ReverseElement16.Vector64.UInt32.cs" />
<Compile Include="ReverseElement16.Vector64.UInt64.cs" />
<Compile Include="ReverseElement16.Vector128.Int32.cs" />
<Compile Include="ReverseElement16.Vector128.Int64.cs" />
<Compile Include="ReverseElement16.Vector128.UInt32.cs" />
<Compile Include="ReverseElement16.Vector128.UInt64.cs" />
<Compile Include="ReverseElement32.Vector64.Int64.cs" />
<Compile Include="ReverseElement32.Vector64.UInt64.cs" />
<Compile Include="ReverseElement32.Vector128.Int64.cs" />
<Compile Include="ReverseElement32.Vector128.UInt64.cs" />
<Compile Include="ReverseElement8.Vector64.Int16.cs" />
<Compile Include="ReverseElement8.Vector64.Int32.cs" />
<Compile Include="ReverseElement8.Vector64.Int64.cs" />
<Compile Include="ReverseElement8.Vector64.UInt16.cs" />
<Compile Include="ReverseElement8.Vector64.UInt32.cs" />
<Compile Include="ReverseElement8.Vector64.UInt64.cs" />
<Compile Include="ReverseElement8.Vector128.Int16.cs" />
<Compile Include="ReverseElement8.Vector128.Int32.cs" />
<Compile Include="ReverseElement8.Vector128.Int64.cs" />
<Compile Include="ReverseElement8.Vector128.UInt16.cs" />
<Compile Include="ReverseElement8.Vector128.UInt32.cs" />
<Compile Include="ReverseElement8.Vector128.UInt64.cs" />
<Compile Include="RoundAwayFromZero.Vector64.Single.cs" />
<Compile Include="RoundAwayFromZero.Vector128.Single.cs" />
<Compile Include="RoundAwayFromZeroScalar.Vector64.Double.cs" />
Expand Down Expand Up @@ -240,30 +264,6 @@
<Compile Include="ShiftRightAndInsert.Vector64.Byte.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.Int16.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.Int32.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.SByte.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.UInt16.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.UInt32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Byte.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int16.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int64.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.SByte.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt16.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt64.cs" />
<Compile Include="ShiftRightAndInsertScalar.Vector64.Int64.cs" />
<Compile Include="ShiftRightAndInsertScalar.Vector64.UInt64.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.Int16.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.Int32.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.SByte.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int16.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int32.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int64.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.SByte.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.Int16.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.Int32.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.SByte.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.Int16.1.cs" />
<Compile Include="Program.AdvSimd_Part4.cs" />
<Compile Include="..\Shared\Helpers.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,30 @@
<Compile Include="ReciprocalSquareRootStep.Vector128.Single.cs" />
<Compile Include="ReciprocalStep.Vector64.Single.cs" />
<Compile Include="ReciprocalStep.Vector128.Single.cs" />
<Compile Include="ReverseElement16.Vector64.Int32.cs" />
<Compile Include="ReverseElement16.Vector64.Int64.cs" />
<Compile Include="ReverseElement16.Vector64.UInt32.cs" />
<Compile Include="ReverseElement16.Vector64.UInt64.cs" />
<Compile Include="ReverseElement16.Vector128.Int32.cs" />
<Compile Include="ReverseElement16.Vector128.Int64.cs" />
<Compile Include="ReverseElement16.Vector128.UInt32.cs" />
<Compile Include="ReverseElement16.Vector128.UInt64.cs" />
<Compile Include="ReverseElement32.Vector64.Int64.cs" />
<Compile Include="ReverseElement32.Vector64.UInt64.cs" />
<Compile Include="ReverseElement32.Vector128.Int64.cs" />
<Compile Include="ReverseElement32.Vector128.UInt64.cs" />
<Compile Include="ReverseElement8.Vector64.Int16.cs" />
<Compile Include="ReverseElement8.Vector64.Int32.cs" />
<Compile Include="ReverseElement8.Vector64.Int64.cs" />
<Compile Include="ReverseElement8.Vector64.UInt16.cs" />
<Compile Include="ReverseElement8.Vector64.UInt32.cs" />
<Compile Include="ReverseElement8.Vector64.UInt64.cs" />
<Compile Include="ReverseElement8.Vector128.Int16.cs" />
<Compile Include="ReverseElement8.Vector128.Int32.cs" />
<Compile Include="ReverseElement8.Vector128.Int64.cs" />
<Compile Include="ReverseElement8.Vector128.UInt16.cs" />
<Compile Include="ReverseElement8.Vector128.UInt32.cs" />
<Compile Include="ReverseElement8.Vector128.UInt64.cs" />
<Compile Include="RoundAwayFromZero.Vector64.Single.cs" />
<Compile Include="RoundAwayFromZero.Vector128.Single.cs" />
<Compile Include="RoundAwayFromZeroScalar.Vector64.Double.cs" />
Expand Down Expand Up @@ -240,30 +264,6 @@
<Compile Include="ShiftRightAndInsert.Vector64.Byte.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.Int16.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.Int32.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.SByte.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.UInt16.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.UInt32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Byte.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int16.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int64.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.SByte.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt16.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt64.cs" />
<Compile Include="ShiftRightAndInsertScalar.Vector64.Int64.cs" />
<Compile Include="ShiftRightAndInsertScalar.Vector64.UInt64.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.Int16.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.Int32.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.SByte.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int16.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int32.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int64.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.SByte.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.Int16.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.Int32.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.SByte.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.Int16.1.cs" />
<Compile Include="Program.AdvSimd_Part4.cs" />
<Compile Include="..\Shared\Helpers.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@
<Optimize />
</PropertyGroup>
<ItemGroup>
<Compile Include="ShiftRightAndInsert.Vector64.SByte.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.UInt16.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.UInt32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Byte.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int16.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int64.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.SByte.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt16.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt64.cs" />
<Compile Include="ShiftRightAndInsertScalar.Vector64.Int64.cs" />
<Compile Include="ShiftRightAndInsertScalar.Vector64.UInt64.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.Int16.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.Int32.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.SByte.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int16.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int32.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int64.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.SByte.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.Int16.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.Int32.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.SByte.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.Int16.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.Int32.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.Int64.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.SByte.1.cs" />
Expand Down Expand Up @@ -240,30 +264,6 @@
<Compile Include="SubtractHighNarrowingUpper.Vector128.UInt32.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.Byte.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.Int16.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.Int32.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.SByte.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.UInt16.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.UInt32.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.Byte.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.Int16.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.Int32.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.SByte.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.UInt16.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.UInt32.cs" />
<Compile Include="SubtractSaturate.Vector64.Byte.cs" />
<Compile Include="SubtractSaturate.Vector64.Int16.cs" />
<Compile Include="SubtractSaturate.Vector64.Int32.cs" />
<Compile Include="SubtractSaturate.Vector64.SByte.cs" />
<Compile Include="SubtractSaturate.Vector64.UInt16.cs" />
<Compile Include="SubtractSaturate.Vector64.UInt32.cs" />
<Compile Include="SubtractSaturate.Vector128.Byte.cs" />
<Compile Include="SubtractSaturate.Vector128.Int16.cs" />
<Compile Include="SubtractSaturate.Vector128.Int32.cs" />
<Compile Include="SubtractSaturate.Vector128.Int64.cs" />
<Compile Include="SubtractSaturate.Vector128.SByte.cs" />
<Compile Include="SubtractSaturate.Vector128.UInt16.cs" />
<Compile Include="SubtractSaturate.Vector128.UInt32.cs" />
<Compile Include="SubtractSaturate.Vector128.UInt64.cs" />
<Compile Include="Program.AdvSimd_Part5.cs" />
<Compile Include="..\Shared\Helpers.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="ShiftRightAndInsert.Vector64.SByte.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.UInt16.cs" />
<Compile Include="ShiftRightAndInsert.Vector64.UInt32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Byte.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int16.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.Int64.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.SByte.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt16.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt32.cs" />
<Compile Include="ShiftRightAndInsert.Vector128.UInt64.cs" />
<Compile Include="ShiftRightAndInsertScalar.Vector64.Int64.cs" />
<Compile Include="ShiftRightAndInsertScalar.Vector64.UInt64.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.Int16.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.Int32.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector64.SByte.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int16.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int32.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.Int64.1.cs" />
<Compile Include="ShiftRightArithmetic.Vector128.SByte.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.Int16.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.Int32.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector64.SByte.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.Int16.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.Int32.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.Int64.1.cs" />
<Compile Include="ShiftRightArithmeticAdd.Vector128.SByte.1.cs" />
Expand Down Expand Up @@ -240,30 +264,6 @@
<Compile Include="SubtractHighNarrowingUpper.Vector128.UInt32.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.Byte.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.Int16.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.Int32.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.SByte.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.UInt16.cs" />
<Compile Include="SubtractRoundedHighNarrowingLower.Vector64.UInt32.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.Byte.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.Int16.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.Int32.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.SByte.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.UInt16.cs" />
<Compile Include="SubtractRoundedHighNarrowingUpper.Vector128.UInt32.cs" />
<Compile Include="SubtractSaturate.Vector64.Byte.cs" />
<Compile Include="SubtractSaturate.Vector64.Int16.cs" />
<Compile Include="SubtractSaturate.Vector64.Int32.cs" />
<Compile Include="SubtractSaturate.Vector64.SByte.cs" />
<Compile Include="SubtractSaturate.Vector64.UInt16.cs" />
<Compile Include="SubtractSaturate.Vector64.UInt32.cs" />
<Compile Include="SubtractSaturate.Vector128.Byte.cs" />
<Compile Include="SubtractSaturate.Vector128.Int16.cs" />
<Compile Include="SubtractSaturate.Vector128.Int32.cs" />
<Compile Include="SubtractSaturate.Vector128.Int64.cs" />
<Compile Include="SubtractSaturate.Vector128.SByte.cs" />
<Compile Include="SubtractSaturate.Vector128.UInt16.cs" />
<Compile Include="SubtractSaturate.Vector128.UInt32.cs" />
<Compile Include="SubtractSaturate.Vector128.UInt64.cs" />
<Compile Include="Program.AdvSimd_Part5.cs" />
<Compile Include="..\Shared\Helpers.cs" />
<Compile Include="..\Shared\Program.cs" />
Expand Down
Loading

0 comments on commit a014fbd

Please sign in to comment.