SimdInt16x8Operation.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. namespace Js {
  7. struct SIMDInt16x8Operation
  8. {
  9. // following are operation wrappers for SIMDInt16x8 general implementation
  10. // input and output are typically SIMDValue
  11. static SIMDValue OpInt16x8(int16 values[]);
  12. static SIMDValue OpSplat(int16 x);
  13. // Unary Ops
  14. static SIMDValue OpNeg(const SIMDValue& v);
  15. static SIMDValue OpNot(const SIMDValue& v);
  16. // Binary Ops
  17. static SIMDValue OpAdd(const SIMDValue& aValue, const SIMDValue& bValue);
  18. static SIMDValue OpSub(const SIMDValue& aValue, const SIMDValue& bValue);
  19. static SIMDValue OpMul(const SIMDValue& aValue, const SIMDValue& bValue);
  20. static SIMDValue OpAnd(const SIMDValue& aValue, const SIMDValue& bValue);
  21. static SIMDValue OpOr (const SIMDValue& aValue, const SIMDValue& bValue);
  22. static SIMDValue OpXor(const SIMDValue& aValue, const SIMDValue& bValue);
  23. static SIMDValue OpAddSaturate(const SIMDValue& aValue, const SIMDValue& bValue);
  24. static SIMDValue OpSubSaturate(const SIMDValue& aValue, const SIMDValue& bValue);
  25. static SIMDValue OpMin(const SIMDValue& aValue, const SIMDValue& bValue);
  26. static SIMDValue OpMax(const SIMDValue& aValue, const SIMDValue& bValue);
  27. // CompareOps
  28. static SIMDValue OpLessThan(const SIMDValue& aValue, const SIMDValue& bValue);
  29. static SIMDValue OpLessThanOrEqual(const SIMDValue& aValue, const SIMDValue& bValue);
  30. static SIMDValue OpEqual(const SIMDValue& aValue, const SIMDValue& bValue);
  31. static SIMDValue OpNotEqual(const SIMDValue& aValue, const SIMDValue& bValue);
  32. static SIMDValue OpGreaterThan(const SIMDValue& aValue, const SIMDValue& bValue);
  33. static SIMDValue OpGreaterThanOrEqual(const SIMDValue& aValue, const SIMDValue& bValue);
  34. // ShiftOps
  35. static SIMDValue OpShiftLeftByScalar(const SIMDValue& value, int count);
  36. static SIMDValue OpShiftRightByScalar(const SIMDValue& value, int count);
  37. // load&store
  38. //static SIMDValue OpLoad(int* v, const int index);
  39. //static SIMDValue OpStore(int* v, const int index);
  40. };
  41. } // namespace Js