SimdBool8x16OperationX86X64.cpp 1.1 KB

123456789101112131415161718192021222324252627
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #include "RuntimeLanguagePch.h"
  6. #if _M_IX86 || _M_AMD64
  7. namespace Js
  8. {
  9. SIMDValue SIMDBool8x16Operation::OpBool8x16(bool b[])
  10. {
  11. X86SIMDValue x86Result;
  12. x86Result.m128i_value = _mm_set_epi8(b[15] * -1, b[14] * -1, b[13] * -1, b[12] * -1, b[11] * -1, b[10] * -1, b[9] * -1, b[8] * -1, \
  13. b[7] * -1, b[6] * -1, b[5] * -1, b[4] * -1, b[3] * -1, b[2] * -1, b[1] * -1, b[0] * -1);
  14. return X86SIMDValue::ToSIMDValue(x86Result);
  15. }
  16. SIMDValue SIMDBool8x16Operation::OpBool8x16(const SIMDValue& v)
  17. {
  18. // overload function with input parameter as SIMDValue for completeness
  19. SIMDValue result;
  20. result = v;
  21. return result;
  22. }
  23. }
  24. #endif