OpCodesSimd.h 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  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. /*
  6. SIMD.js opcodes
  7. - All opcodes are typed.
  8. - Used as bytecode for AsmJs Interpreter.
  9. - Used as IR by the backend only for both AsmJs and non-AsmJs code.
  10. */
  11. // used as both AsmJs bytecode and IR
  12. #ifndef MACRO_SIMD
  13. #define MACRO_SIMD(opcode, asmjsLayout, opCodeAttrAsmJs, OpCodeAttr, ...)
  14. #endif
  15. #ifndef MACRO_SIMD_WMS
  16. #define MACRO_SIMD_WMS(opcode, asmjsLayout, opCodeAttrAsmJs, OpCodeAttr, ...)
  17. #endif
  18. // used as AsmJs bytecode only
  19. #ifndef MACRO_SIMD_ASMJS_ONLY_WMS
  20. #define MACRO_SIMD_ASMJS_ONLY_WMS(opcode, asmjsLayout, opCodeAttrAsmJs, OpCodeAttr, ...)
  21. #endif
  22. // used as IR only
  23. #ifndef MACRO_SIMD_BACKEND_ONLY
  24. #define MACRO_SIMD_BACKEND_ONLY(opcode, asmjsLayout, opCodeAttrAsmJs, OpCodeAttr)
  25. #endif
  26. // same as above but with extended opcodes
  27. #ifndef MACRO_SIMD_EXTEND
  28. #define MACRO_SIMD_EXTEND(opcode, asmjsLayout, opCodeAttrAsmJs, OpCodeAttr, ...)
  29. #endif
  30. #ifndef MACRO_SIMD_EXTEND_WMS
  31. #define MACRO_SIMD_EXTEND_WMS(opcode, asmjsLayout, opCodeAttrAsmJs, OpCodeAttr, ...)
  32. #endif
  33. // used as AsmJs bytecode only
  34. #ifndef MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS
  35. #define MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS(opcode, asmjsLayout, opCodeAttrAsmJs, OpCodeAttr, ...)
  36. #endif
  37. // used as IR only
  38. #ifndef MACRO_SIMD_BACKEND_ONLY_EXTEND
  39. #define MACRO_SIMD_BACKEND_ONLY_EXTEND(opcode, asmjsLayout, opCodeAttrAsmJs, OpCodeAttr)
  40. #endif
  41. // helper macros
  42. #define T_F4 ValueType::GetSimd128(ObjectType::Simd128Float32x4)
  43. #define T_I4 ValueType::GetSimd128(ObjectType::Simd128Int32x4)
  44. #define T_INT ValueType::GetInt(false)
  45. #define T_FLT ValueType::Float
  46. // TODO: Enable OpCanCSE for all opcodes. Dependent on extending ExprHash to 64-bits.
  47. // OpCode , LayoutAsmJs , OpCodeAttrAsmJs, OpCodeAttr Addition macro args FuncInfo Ret and Args ValueTypes
  48. // | | | | | | |
  49. // v v v v v v v
  50. MACRO_SIMD ( Simd128_Start , Empty , None , None , 0) // Just a marker to indicate SIMD opcodes region
  51. // Int32x4
  52. MACRO_SIMD_WMS ( Simd128_IntsToI4 , Int32x4_1Int4 , None , OpCanCSE , 6, &Js::SIMDInt32x4Lib::EntryInfo::Int32x4, T_I4, T_INT, T_INT, T_INT, T_INT)
  53. MACRO_SIMD_WMS ( Simd128_Splat_I4 , Int32x4_1Int1 , None , OpCanCSE , 3, &Js::SIMDInt32x4Lib::EntryInfo::Splat , T_I4, T_INT)
  54. //MACRO_SIMD_WMS ( Simd128_FromFloat64x2_I4 , Int32x4_1Float64x2_1 , None , OpCanCSE , 0)
  55. //MACRO_SIMD_WMS ( Simd128_FromFloat64x2Bits_I4 , Int32x4_1Float64x2_1 , None , OpCanCSE , 0)
  56. MACRO_SIMD_WMS ( Simd128_FromFloat32x4_I4 , Int32x4_1Float32x4_1 , None , OpCanCSE , 3, &Js::SIMDInt32x4Lib::EntryInfo::FromFloat32x4 , T_I4, T_F4)
  57. MACRO_SIMD_WMS ( Simd128_FromFloat32x4Bits_I4 , Int32x4_1Float32x4_1 , None , OpCanCSE , 3, &Js::SIMDInt32x4Lib::EntryInfo::FromFloat32x4Bits , T_I4, T_F4)
  58. MACRO_SIMD_WMS ( Simd128_Neg_I4 , Int32x4_2 , None , OpCanCSE , 3, &Js::SIMDInt32x4Lib::EntryInfo::Neg, T_I4, T_I4)
  59. MACRO_SIMD_WMS ( Simd128_Add_I4 , Int32x4_3 , None , OpCanCSE , 4, &Js::SIMDInt32x4Lib::EntryInfo::Add, T_I4, T_I4, T_I4)
  60. MACRO_SIMD_WMS ( Simd128_Sub_I4 , Int32x4_3 , None , OpCanCSE , 4, &Js::SIMDInt32x4Lib::EntryInfo::Sub, T_I4, T_I4, T_I4)
  61. MACRO_SIMD_WMS ( Simd128_Mul_I4 , Int32x4_3 , None , OpCanCSE , 4, &Js::SIMDInt32x4Lib::EntryInfo::Mul, T_I4, T_I4, T_I4)
  62. MACRO_SIMD_WMS ( Simd128_Lt_I4 , Bool32x4_1Int32x4_2 , None , OpCanCSE , 0)
  63. MACRO_SIMD_WMS ( Simd128_Gt_I4 , Bool32x4_1Int32x4_2 , None , OpCanCSE , 0)
  64. MACRO_SIMD_WMS ( Simd128_Eq_I4 , Bool32x4_1Int32x4_2 , None , OpCanCSE , 0)
  65. MACRO_SIMD_WMS ( Simd128_Select_I4 , Int32x4_1Bool32x4_1Int32x4_2 , None , OpCanCSE , 0)
  66. MACRO_SIMD_WMS ( Simd128_And_I4 , Int32x4_3 , None , OpCanCSE , 4, &Js::SIMDInt32x4Lib::EntryInfo::And, T_I4, T_I4, T_I4)
  67. MACRO_SIMD_WMS ( Simd128_Or_I4 , Int32x4_3 , None , OpCanCSE , 4, &Js::SIMDInt32x4Lib::EntryInfo::Or, T_I4, T_I4, T_I4)
  68. MACRO_SIMD_WMS ( Simd128_Xor_I4 , Int32x4_3 , None , OpCanCSE , 4, &Js::SIMDInt32x4Lib::EntryInfo::Xor, T_I4, T_I4, T_I4)
  69. MACRO_SIMD_WMS ( Simd128_Not_I4 , Int32x4_2 , None , OpCanCSE , 3, &Js::SIMDInt32x4Lib::EntryInfo::Not, T_I4, T_I4)
  70. MACRO_SIMD_WMS ( Simd128_ShLtByScalar_I4 , Int32x4_2Int1 , None , OpCanCSE , 0)
  71. MACRO_SIMD_WMS ( Simd128_ShRtByScalar_I4 , Int32x4_2Int1 , None , OpCanCSE , 0)
  72. MACRO_SIMD_WMS ( Simd128_Swizzle_I4 , Int32x4_2Int4 , None , OpCanCSE , 7, &Js::SIMDInt32x4Lib::EntryInfo::Swizzle, T_I4, T_I4, T_INT, T_INT, T_INT, T_INT)
  73. MACRO_SIMD_WMS ( Simd128_Shuffle_I4 , Int32x4_3Int4 , None , OpCanCSE , 8, &Js::SIMDInt32x4Lib::EntryInfo::Shuffle, T_I4, T_I4, T_I4, T_INT, T_INT, T_INT, T_INT)
  74. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_Ld_I4 , Int32x4_2 , None , None )
  75. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_LdSlot_I4 , ElementSlot , None , None )
  76. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_StSlot_I4 , ElementSlot , None , None )
  77. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_Return_I4 , Int32x4_2 , None , None )
  78. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_I_ArgOut_I4 , Reg1Int32x4_1 , None , None )
  79. // Extended opcodes. Running out of 1-byte opcode space. Add new opcodes here.
  80. MACRO_SIMD(Simd128_End, Empty, None, None) // Just a marker to indicate SIMD opcodes region
  81. MACRO_SIMD_EXTEND(Simd128_Start_Extend, Empty, None, None, 0) // Just a marker to indicate SIMD extended opcodes region
  82. // Int32x4
  83. MACRO_SIMD_EXTEND_WMS ( Simd128_BitSelect_I4 , Int32x4_4 , None , OpCanCSE , 0)
  84. // Float32x4
  85. MACRO_SIMD_EXTEND_WMS ( Simd128_FloatsToF4 , Float32x4_1Float4 , None , OpCanCSE , 6, &Js::SIMDFloat32x4Lib::EntryInfo::Float32x4, T_F4, T_FLT, T_FLT, T_FLT, T_FLT)
  86. MACRO_SIMD_EXTEND_WMS ( Simd128_Splat_F4 , Float32x4_1Float1 , None , OpCanCSE , 3, &Js::SIMDFloat32x4Lib::EntryInfo::Splat , T_F4, T_FLT)
  87. //MACRO_SIMD_EXTEND_WMS ( Simd128_FromFloat64x2_F4 , Float32x4_1Float64x2_1 , None , OpCanCSE , 0)
  88. //MACRO_SIMD_EXTEND_WMS ( Simd128_FromFloat64x2Bits_F4 , Float32x4_1Float64x2_1 , None , OpCanCSE , 0)
  89. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt32x4_F4 , Float32x4_1Int32x4_1 , None , OpCanCSE , 3, &Js::SIMDFloat32x4Lib::EntryInfo::FromInt32x4 , T_F4, T_I4)
  90. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt32x4Bits_F4 , Float32x4_1Int32x4_1 , None , OpCanCSE , 3, &Js::SIMDFloat32x4Lib::EntryInfo::FromInt32x4Bits, T_F4, T_I4)
  91. MACRO_SIMD_EXTEND_WMS ( Simd128_Abs_F4 , Float32x4_2 , None , OpCanCSE , 3, &Js::SIMDFloat32x4Lib::EntryInfo::Abs, T_F4, T_F4)
  92. MACRO_SIMD_EXTEND_WMS ( Simd128_Neg_F4 , Float32x4_2 , None , OpCanCSE , 3, &Js::SIMDFloat32x4Lib::EntryInfo::Neg, T_F4, T_F4)
  93. MACRO_SIMD_EXTEND_WMS ( Simd128_Add_F4 , Float32x4_3 , None , OpCanCSE , 4, &Js::SIMDFloat32x4Lib::EntryInfo::Add, T_F4, T_F4, T_F4)
  94. MACRO_SIMD_EXTEND_WMS ( Simd128_Sub_F4 , Float32x4_3 , None , OpCanCSE , 4, &Js::SIMDFloat32x4Lib::EntryInfo::Sub, T_F4, T_F4, T_F4)
  95. MACRO_SIMD_EXTEND_WMS ( Simd128_Mul_F4 , Float32x4_3 , None , OpCanCSE , 4, &Js::SIMDFloat32x4Lib::EntryInfo::Mul, T_F4, T_F4, T_F4)
  96. MACRO_SIMD_EXTEND_WMS ( Simd128_Div_F4 , Float32x4_3 , None , OpCanCSE , 4, &Js::SIMDFloat32x4Lib::EntryInfo::Div, T_F4, T_F4, T_F4)
  97. MACRO_SIMD_EXTEND_WMS ( Simd128_Clamp_F4 , Float32x4_4 , None , OpCanCSE , 0)
  98. MACRO_SIMD_EXTEND_WMS ( Simd128_Min_F4 , Float32x4_3 , None , OpCanCSE , 4, &Js::SIMDFloat32x4Lib::EntryInfo::Min, T_F4, T_F4, T_F4)
  99. MACRO_SIMD_EXTEND_WMS ( Simd128_Max_F4 , Float32x4_3 , None , OpCanCSE , 4, &Js::SIMDFloat32x4Lib::EntryInfo::Max, T_F4, T_F4, T_F4)
  100. MACRO_SIMD_EXTEND_WMS ( Simd128_Rcp_F4 , Float32x4_2 , None , OpCanCSE , 3, &Js::SIMDFloat32x4Lib::EntryInfo::Reciprocal, T_F4, T_F4)
  101. MACRO_SIMD_EXTEND_WMS ( Simd128_RcpSqrt_F4 , Float32x4_2 , None , OpCanCSE , 3, &Js::SIMDFloat32x4Lib::EntryInfo::ReciprocalSqrt, T_F4, T_F4)
  102. MACRO_SIMD_EXTEND_WMS ( Simd128_Sqrt_F4 , Float32x4_2 , None , OpCanCSE , 3, &Js::SIMDFloat32x4Lib::EntryInfo::Sqrt, T_F4, T_F4)
  103. MACRO_SIMD_EXTEND_WMS ( Simd128_Swizzle_F4 , Float32x4_2Int4 , None , OpCanCSE , 7, &Js::SIMDFloat32x4Lib::EntryInfo::Swizzle, T_F4, T_F4, T_INT, T_INT, T_INT, T_INT)
  104. MACRO_SIMD_EXTEND_WMS ( Simd128_Shuffle_F4 , Float32x4_3Int4 , None , OpCanCSE , 8, &Js::SIMDFloat32x4Lib::EntryInfo::Shuffle, T_F4, T_F4, T_F4, T_INT, T_INT, T_INT, T_INT)
  105. MACRO_SIMD_EXTEND_WMS ( Simd128_Lt_F4 , Bool32x4_1Float32x4_2 , None , OpCanCSE , 0)
  106. MACRO_SIMD_EXTEND_WMS ( Simd128_LtEq_F4 , Bool32x4_1Float32x4_2 , None , OpCanCSE , 0)
  107. MACRO_SIMD_EXTEND_WMS ( Simd128_Eq_F4 , Bool32x4_1Float32x4_2 , None , OpCanCSE , 0)
  108. MACRO_SIMD_EXTEND_WMS ( Simd128_Neq_F4 , Bool32x4_1Float32x4_2 , None , OpCanCSE , 0)
  109. MACRO_SIMD_EXTEND_WMS ( Simd128_Gt_F4 , Bool32x4_1Float32x4_2 , None , OpCanCSE , 0)
  110. MACRO_SIMD_EXTEND_WMS ( Simd128_GtEq_F4 , Bool32x4_1Float32x4_2 , None , OpCanCSE , 0)
  111. MACRO_SIMD_EXTEND_WMS ( Simd128_Select_F4 , Float32x4_1Bool32x4_1Float32x4_2 , None , OpCanCSE , 0)
  112. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_Ld_F4 , Float32x4_2 , None , None )
  113. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_LdSlot_F4 , ElementSlot , None , None )
  114. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_StSlot_F4 , ElementSlot , None , None )
  115. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_Return_F4 , Float32x4_2 , None , None )
  116. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_ArgOut_F4 , Reg1Float32x4_1 , None , None )
  117. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_I_ArgOut_F4 , Reg1Float32x4_1 , None , None )
  118. // Int64x2
  119. MACRO_SIMD_EXTEND_WMS(Simd128_Splat_I2, Int64x2_1Long1, None, None, 0)
  120. MACRO_SIMD_EXTEND_WMS(Simd128_ExtractLane_I2, Long1Int64x2_1Int1, None, None, 0)
  121. MACRO_SIMD_EXTEND_WMS(Simd128_ReplaceLane_I2, Int64x2_2_Int1_Long1, None, None, 0)
  122. MACRO_SIMD_EXTEND_WMS(Simd128_Add_I2, Int64x2_3, None, None, 0)
  123. MACRO_SIMD_EXTEND_WMS(Simd128_Sub_I2, Int64x2_3, None, None, 0)
  124. MACRO_SIMD_EXTEND_WMS(Simd128_Neg_I2, Int64x2_2, None, None, 0)
  125. MACRO_SIMD_EXTEND_WMS(Simd128_ShLtByScalar_I2, Int64x2_2Int1, None, None, 0)
  126. MACRO_SIMD_EXTEND_WMS(Simd128_ShRtByScalar_I2, Int64x2_2Int1, None, None, 0)
  127. MACRO_SIMD_EXTEND_WMS(Simd128_ShRtByScalar_U2, Int64x2_2Int1, None, None, 0)
  128. MACRO_SIMD_EXTEND_WMS(Simd128_AnyTrue_B2, Int1Bool64x2_1, None, None, 0)
  129. MACRO_SIMD_EXTEND_WMS(Simd128_AllTrue_B2, Int1Bool64x2_1, None, None, 0)
  130. MACRO_SIMD_EXTEND_WMS(Simd128_FromFloat64x2_I2, Int64x2_2, None, None, 0)
  131. MACRO_SIMD_EXTEND_WMS(Simd128_FromFloat64x2_U2, Int64x2_2, None, None, 0)
  132. // Float64x2
  133. MACRO_SIMD_EXTEND_WMS(Simd128_Splat_D2, Float64x2_1Double1, None, None, 0)
  134. MACRO_SIMD_EXTEND_WMS(Simd128_ExtractLane_D2, Double1Float64x2_1Int1, None, None, 0)
  135. MACRO_SIMD_EXTEND_WMS(Simd128_ReplaceLane_D2, Float64x2_2Int1Double1, None, None, 0)
  136. MACRO_SIMD_EXTEND_WMS(Simd128_Eq_D2, Float64x2_3, None, None, 0)
  137. MACRO_SIMD_EXTEND_WMS(Simd128_Neq_D2, Float64x2_3, None, None, 0)
  138. MACRO_SIMD_EXTEND_WMS(Simd128_Lt_D2, Float64x2_3, None, None, 0)
  139. MACRO_SIMD_EXTEND_WMS(Simd128_LtEq_D2, Float64x2_3, None, None, 0)
  140. MACRO_SIMD_EXTEND_WMS(Simd128_Gt_D2, Float64x2_3, None, None, 0)
  141. MACRO_SIMD_EXTEND_WMS(Simd128_GtEq_D2, Float64x2_3, None, None, 0)
  142. MACRO_SIMD_EXTEND_WMS(Simd128_Neg_D2, Float64x2_2, None, None, 0)
  143. MACRO_SIMD_EXTEND_WMS(Simd128_Abs_D2, Float64x2_2, None, None, 0)
  144. MACRO_SIMD_EXTEND_WMS(Simd128_Min_D2, Float64x2_3, None, None, 0)
  145. MACRO_SIMD_EXTEND_WMS(Simd128_Max_D2, Float64x2_3, None, None, 0)
  146. MACRO_SIMD_EXTEND_WMS(Simd128_Add_D2, Float64x2_3, None, None, 0)
  147. MACRO_SIMD_EXTEND_WMS(Simd128_Sub_D2, Float64x2_3, None, None, 0)
  148. MACRO_SIMD_EXTEND_WMS(Simd128_Mul_D2, Float64x2_3, None, None, 0)
  149. MACRO_SIMD_EXTEND_WMS(Simd128_Div_D2, Float64x2_3, None, None, 0)
  150. MACRO_SIMD_EXTEND_WMS(Simd128_Sqrt_D2, Float64x2_2, None, None, 0)
  151. MACRO_SIMD_EXTEND_WMS(Simd128_FromInt64x2_D2, Int64x2_2, None, None, 0) //Int64x2_2 is intentional
  152. MACRO_SIMD_EXTEND_WMS(Simd128_FromUint64x2_D2, Int64x2_2, None, None, 0)
  153. // Float64x2
  154. #if 0 //Disabling this type until the specification decides to include or not.
  155. MACRO_SIMD_EXTEND_WMS(Simd128_DoublesToD2, Float64x2_1Double2, None, None, 0)
  156. MACRO_SIMD_EXTEND_WMS(Simd128_FromFloat32x4_D2, Float64x2_1Float32x4_1, None, None, 0)
  157. MACRO_SIMD_EXTEND_WMS(Simd128_FromFloat32x4Bits_D2, Float64x2_1Float32x4_1, None, None, 0)
  158. MACRO_SIMD_EXTEND_WMS(Simd128_FromInt32x4_D2, Float64x2_1Int32x4_1, None, None, 0)
  159. MACRO_SIMD_EXTEND_WMS(Simd128_FromInt32x4Bits_D2, Float64x2_1Int32x4_1, None, None, 0)
  160. MACRO_SIMD_EXTEND_WMS(Simd128_Clamp_D2, Float64x2_4, None, None, 0)
  161. MACRO_SIMD_EXTEND_WMS(Simd128_Rcp_D2, Float64x2_2, None, None, 0)
  162. MACRO_SIMD_EXTEND_WMS(Simd128_RcpSqrt_D2, Float64x2_2, None, None, 0)
  163. MACRO_SIMD_EXTEND_WMS(Simd128_Select_D2, Float64x2_1Int32x4_1Float64x2_2, None, None, 0)
  164. MACRO_SIMD_EXTEND_WMS(Simd128_LdSignMask_D2, Int1Float64x2_1, None, None, 0)
  165. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS(Simd128_Return_D2, Float64x2_2, None, None)
  166. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS(Simd128_I_ArgOut_D2, Reg1Float64x2_1, None, None)
  167. #endif // 0 //Disabling this type until the specification decides to include or not.
  168. //Int8x16
  169. MACRO_SIMD_EXTEND_WMS(Simd128_IntsToI16 , Int8x16_1Int16 , None, None, 0)
  170. MACRO_SIMD_EXTEND_WMS(Simd128_Splat_I16 , Int8x16_1Int1 , None, None, 0)
  171. MACRO_SIMD_EXTEND_WMS(Simd128_ExtractLane_I16 , Int1Int8x16_1Int1 , None, None, 0)
  172. MACRO_SIMD_EXTEND_WMS(Simd128_ReplaceLane_I16 , Int8x16_2Int2 , None, None, 0)
  173. MACRO_SIMD_EXTEND_WMS(Simd128_Swizzle_I16 , Int8x16_2Int16 , None, None, 0)
  174. MACRO_SIMD_EXTEND_WMS(Simd128_Shuffle_I16 , Int8x16_3Int16 , None, None, 0)
  175. MACRO_SIMD_EXTEND_WMS(Simd128_Neg_I16 , Int8x16_2 , None, None, 0)
  176. MACRO_SIMD_EXTEND_WMS(Simd128_Add_I16 , Int8x16_3 , None, None, 0)
  177. MACRO_SIMD_EXTEND_WMS(Simd128_Sub_I16 , Int8x16_3 , None, None, 0)
  178. MACRO_SIMD_EXTEND_WMS(Simd128_Mul_I16 , Int8x16_3 , None, None, 0)
  179. MACRO_SIMD_EXTEND_WMS(Simd128_Lt_I16 , Bool8x16_1Int8x16_2 , None, None, 0)
  180. MACRO_SIMD_EXTEND_WMS(Simd128_LtEq_I16 , Bool8x16_1Int8x16_2 , None, None, 0)
  181. MACRO_SIMD_EXTEND_WMS(Simd128_Gt_I16 , Bool8x16_1Int8x16_2 , None, None, 0)
  182. MACRO_SIMD_EXTEND_WMS(Simd128_GtEq_I16 , Bool8x16_1Int8x16_2 , None, None, 0)
  183. MACRO_SIMD_EXTEND_WMS(Simd128_Eq_I16 , Bool8x16_1Int8x16_2 , None, None, 0)
  184. MACRO_SIMD_EXTEND_WMS(Simd128_Neq_I16 , Bool8x16_1Int8x16_2 , None, None, 0)
  185. MACRO_SIMD_EXTEND_WMS(Simd128_Select_I16 , Int8x16_1Bool8x16_1Int8x16_2, None, None, 0)
  186. MACRO_SIMD_EXTEND_WMS(Simd128_And_I16 , Int8x16_3 , None, None, 0)
  187. MACRO_SIMD_EXTEND_WMS(Simd128_Or_I16 , Int8x16_3 , None, None, 0)
  188. MACRO_SIMD_EXTEND_WMS(Simd128_Xor_I16 , Int8x16_3 , None, None, 0)
  189. MACRO_SIMD_EXTEND_WMS(Simd128_Not_I16 , Int8x16_2 , None, None, 0)
  190. MACRO_SIMD_EXTEND_WMS(Simd128_ShLtByScalar_I16, Int8x16_2Int1 , None, None, 0)
  191. MACRO_SIMD_EXTEND_WMS(Simd128_ShRtByScalar_I16, Int8x16_2Int1 , None, None, 0)
  192. MACRO_SIMD_EXTEND_WMS(Simd128_AddSaturate_I16 , Int8x16_3 , None, None, 0)
  193. MACRO_SIMD_EXTEND_WMS(Simd128_SubSaturate_I16 , Int8x16_3 , None, None, 0)
  194. MACRO_SIMD_EXTEND_WMS(Simd128_LdArr_I16 , AsmSimdTypedArr , None, None, 0)
  195. MACRO_SIMD_EXTEND_WMS(Simd128_LdArrConst_I16 , AsmSimdTypedArr , None, None, 0)
  196. MACRO_SIMD_EXTEND_WMS(Simd128_StArr_I16 , AsmSimdTypedArr , None, None, 0)
  197. MACRO_SIMD_EXTEND_WMS(Simd128_StArrConst_I16 , AsmSimdTypedArr , None, None, 0)
  198. MACRO_SIMD_EXTEND_WMS(Simd128_And_B16 , Bool8x16_3 , None, None, 0)
  199. MACRO_SIMD_EXTEND_WMS(Simd128_Or_B16 , Bool8x16_3 , None, None, 0)
  200. MACRO_SIMD_EXTEND_WMS(Simd128_Xor_B16 , Bool8x16_3 , None, None, 0)
  201. MACRO_SIMD_EXTEND_WMS(Simd128_Not_B16 , Bool8x16_2 , None, None, 0)
  202. MACRO_SIMD_EXTEND_WMS(Simd128_Neg_U4 , Uint32x4_2 , None, None, 0)
  203. MACRO_SIMD_EXTEND_WMS(Simd128_Neg_U8 , Uint16x8_2 , None, None, 0)
  204. MACRO_SIMD_EXTEND_WMS(Simd128_Neg_U16 , Uint8x16_2 , None, None, 0)
  205. MACRO_SIMD_EXTEND_WMS(Simd128_LdC , Float32x4_IntConst4 , None, OpCanCSE, 0) // Load Simd128 const stack slot
  206. #if 0
  207. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS(Simd128_Ld_D2, Float64x2_2, None, None)
  208. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS(Simd128_LdSlot_D2, ElementSlot, None, None)
  209. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS(Simd128_StSlot_D2, ElementSlot, None, None)
  210. MACRO_SIMD_EXTEND_WMS(Simd128_LdArr_D2, AsmSimdTypedArr, None, None, 0)
  211. MACRO_SIMD_EXTEND_WMS(Simd128_LdArrConst_D2, AsmSimdTypedArr, None, None, 0)
  212. MACRO_SIMD_EXTEND_WMS(Simd128_Swizzle_D2, Float64x2_2Int2, None, None, 0)
  213. MACRO_SIMD_EXTEND_WMS(Simd128_Shuffle_D2, Float64x2_3Int2, None, None, 0)
  214. MACRO_SIMD_EXTEND_WMS(Simd128_StArr_D2, AsmSimdTypedArr, None, None, 0)
  215. MACRO_SIMD_EXTEND_WMS(Simd128_StArrConst_D2, AsmSimdTypedArr, None, None, 0)
  216. #endif // 0
  217. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_Ld_I8 , Int16x8_2 , None , None )
  218. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_LdSlot_I8 , ElementSlot , None , None )
  219. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_StSlot_I8 , ElementSlot , None , None )
  220. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_Ld_U4 , Uint32x4_2 , None , None )
  221. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_LdSlot_U4 , ElementSlot , None , None )
  222. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_StSlot_U4 , ElementSlot , None , None )
  223. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_Ld_U8 , Uint16x8_2 , None , None )
  224. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_LdSlot_U8 , ElementSlot , None , None )
  225. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_StSlot_U8 , ElementSlot , None , None )
  226. MACRO_SIMD_ASMJS_ONLY_WMS ( Simd128_Ld_U16 , Uint8x16_2 , None , None )
  227. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_LdSlot_U16 , ElementSlot , None , None )
  228. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_StSlot_U16 , ElementSlot , None , None )
  229. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_I_ArgOut_I8 , Reg1Int16x8_1 , None , None )
  230. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_Return_I8 , Int16x8_2 , None , None )
  231. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_I_ArgOut_U4 , Reg1Uint32x4_1 , None , None )
  232. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_Return_U4 , Uint32x4_2 , None , None )
  233. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_I_ArgOut_U8 , Reg1Uint16x8_1 , None , None )
  234. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_Return_U8 , Uint16x8_2 , None , None )
  235. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_I_ArgOut_U16 , Reg1Uint8x16_1 , None , None )
  236. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_Return_U16 , Uint8x16_2 , None , None )
  237. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_I_ArgOut_B4 , Reg1Bool32x4_1 , None , None )
  238. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_Return_B4 , Bool32x4_2 , None , None )
  239. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_I_ArgOut_B8 , Reg1Bool16x8_1 , None , None )
  240. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_Return_B8 , Bool16x8_2 , None , None )
  241. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_I_ArgOut_B16 , Reg1Bool8x16_1 , None , None )
  242. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS ( Simd128_Return_B16 , Bool8x16_2 , None , None )
  243. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArr_I4 , AsmSimdTypedArr , None , OpCanCSE , 4, &Js::SIMDInt32x4Lib::EntryInfo::Load, T_I4, ValueType::GetObject(ObjectType::Int8Array) /*dummy place-holder for any typed array*/, T_INT)
  244. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArrConst_I4 , AsmSimdTypedArr , None , OpCanCSE , 0)
  245. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArr_F4 , AsmSimdTypedArr , None , OpCanCSE , 4, &Js::SIMDFloat32x4Lib::EntryInfo::Load, T_F4, ValueType::GetObject(ObjectType::Int8Array) /*dummy place-holder for any typed array*/, T_INT)
  246. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArrConst_F4 , AsmSimdTypedArr , None , OpCanCSE , 0)
  247. MACRO_SIMD_EXTEND_WMS ( Simd128_StArr_I4 , AsmSimdTypedArr , None , OpCanCSE , 5, &Js::SIMDInt32x4Lib::EntryInfo::Store, ValueType::Undefined, ValueType::GetObject(ObjectType::Int8Array) /*dummy place-holder for any typed array*/, T_INT, T_I4)
  248. MACRO_SIMD_EXTEND_WMS ( Simd128_StArrConst_I4 , AsmSimdTypedArr , None , OpCanCSE , 0)
  249. MACRO_SIMD_EXTEND_WMS ( Simd128_StArr_F4 , AsmSimdTypedArr , None , OpCanCSE , 5, &Js::SIMDFloat32x4Lib::EntryInfo::Store, ValueType::Undefined, ValueType::GetObject(ObjectType::Int8Array) /*dummy place-holder for any typed array*/, T_INT, T_F4)
  250. MACRO_SIMD_EXTEND_WMS ( Simd128_StArrConst_F4 , AsmSimdTypedArr , None , OpCanCSE , 0)
  251. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_I4 , Int1Int32x4_1Int1 , None , OpCanCSE , 0)
  252. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_I4 , Int32x4_2Int2 , None , OpCanCSE , 0)
  253. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint32x4Bits_I4 , Int32x4_1Uint32x4_1 , None , OpCanCSE , 0)
  254. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt16x8Bits_I4 , Int32x4_1Int16x8_1 , None , OpCanCSE , 0)
  255. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint16x8Bits_I4 , Int32x4_1Uint16x8_1 , None , OpCanCSE , 0)
  256. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt8x16Bits_I4 , Int32x4_1Int8x16_1 , None , OpCanCSE , 0)
  257. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint8x16Bits_I4 , Int32x4_1Uint8x16_1 , None , OpCanCSE , 0)
  258. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_F4 , Float1Float32x4_1Int1 , None , OpCanCSE , 0)
  259. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_F4 , Float32x4_2Int1Float1 , None , OpCanCSE , 0)
  260. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint32x4_F4 , Float32x4_1Uint32x4_1 , None , OpCanCSE , 0)
  261. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint32x4Bits_F4 , Float32x4_1Uint32x4_1 , None , OpCanCSE , 0)
  262. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt16x8Bits_F4 , Float32x4_1Int16x8_1 , None , OpCanCSE , 0)
  263. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint16x8Bits_F4 , Float32x4_1Uint16x8_1 , None , OpCanCSE , 0)
  264. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt8x16Bits_F4 , Float32x4_1Int8x16_1 , None , OpCanCSE , 0)
  265. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint8x16Bits_F4 , Float32x4_1Uint8x16_1 , None , OpCanCSE , 0)
  266. MACRO_SIMD_EXTEND_WMS ( Simd128_LtEq_I4 , Bool32x4_1Int32x4_2 , None , None , 0)
  267. MACRO_SIMD_EXTEND_WMS ( Simd128_GtEq_I4 , Bool32x4_1Int32x4_2 , None , None , 0)
  268. MACRO_SIMD_EXTEND_WMS ( Simd128_Neq_I4 , Bool32x4_1Int32x4_2 , None , None , 0)
  269. // Int16x8
  270. MACRO_SIMD_EXTEND_WMS ( Simd128_IntsToI8 , Int16x8_1Int8 , None , None , 0)
  271. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_I8 , Int1Int16x8_1Int1 , None , None , 0)
  272. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_I8 , Int16x8_2Int2 , None , None , 0)
  273. MACRO_SIMD_EXTEND_WMS ( Simd128_Swizzle_I8 , Int16x8_2Int8 , None , None , 0)
  274. MACRO_SIMD_EXTEND_WMS ( Simd128_Shuffle_I8 , Int16x8_3Int8 , None , None , 0)
  275. MACRO_SIMD_EXTEND_WMS ( Simd128_Splat_I8 , Int16x8_1Int1 , None , None , 0)
  276. MACRO_SIMD_EXTEND_WMS ( Simd128_And_I8 , Int16x8_3 , None , None , 0)
  277. MACRO_SIMD_EXTEND_WMS ( Simd128_Or_I8 , Int16x8_3 , None , None , 0)
  278. MACRO_SIMD_EXTEND_WMS ( Simd128_Xor_I8 , Int16x8_3 , None , None , 0)
  279. MACRO_SIMD_EXTEND_WMS ( Simd128_Not_I8 , Int16x8_2 , None , None , 0)
  280. MACRO_SIMD_EXTEND_WMS ( Simd128_Add_I8 , Int16x8_3 , None , None , 0)
  281. MACRO_SIMD_EXTEND_WMS ( Simd128_Sub_I8 , Int16x8_3 , None , None , 0)
  282. MACRO_SIMD_EXTEND_WMS ( Simd128_Mul_I8 , Int16x8_3 , None , None , 0)
  283. MACRO_SIMD_EXTEND_WMS ( Simd128_Neg_I8 , Int16x8_2 , None , None , 0)
  284. MACRO_SIMD_EXTEND_WMS ( Simd128_Eq_I8 , Bool16x8_1Int16x8_2 , None , None , 0)
  285. MACRO_SIMD_EXTEND_WMS ( Simd128_Neq_I8 , Bool16x8_1Int16x8_2 , None , None , 0)
  286. MACRO_SIMD_EXTEND_WMS ( Simd128_Lt_I8 , Bool16x8_1Int16x8_2 , None , None , 0)
  287. MACRO_SIMD_EXTEND_WMS ( Simd128_LtEq_I8 , Bool16x8_1Int16x8_2 , None , None , 0)
  288. MACRO_SIMD_EXTEND_WMS ( Simd128_Gt_I8 , Bool16x8_1Int16x8_2 , None , None , 0)
  289. MACRO_SIMD_EXTEND_WMS ( Simd128_GtEq_I8 , Bool16x8_1Int16x8_2 , None , None , 0)
  290. MACRO_SIMD_EXTEND_WMS ( Simd128_ShLtByScalar_I8 , Int16x8_2Int1 , None , None , 0)
  291. MACRO_SIMD_EXTEND_WMS ( Simd128_ShRtByScalar_I8 , Int16x8_2Int1 , None , None , 0)
  292. MACRO_SIMD_EXTEND_WMS ( Simd128_Select_I8 , Int16x8_1Bool16x8_1Int16x8_2 , None , None , 0)
  293. MACRO_SIMD_EXTEND_WMS ( Simd128_AddSaturate_I8 , Int16x8_3 , None , None , 0)
  294. MACRO_SIMD_EXTEND_WMS ( Simd128_SubSaturate_I8 , Int16x8_3 , None , None , 0)
  295. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArr_I8 , AsmSimdTypedArr , None , None , 0)
  296. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArrConst_I8 , AsmSimdTypedArr , None , None , 0)
  297. MACRO_SIMD_EXTEND_WMS ( Simd128_StArr_I8 , AsmSimdTypedArr , None , None , 0)
  298. MACRO_SIMD_EXTEND_WMS ( Simd128_StArrConst_I8 , AsmSimdTypedArr , None , None , 0)
  299. MACRO_SIMD_EXTEND_WMS ( Simd128_FromFloat32x4Bits_I8 , Int16x8_1Float32x4_1 , None , None , 0)
  300. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt32x4Bits_I8 , Int16x8_1Int32x4_1 , None , None , 0)
  301. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt8x16Bits_I8 , Int16x8_1Int8x16_1 , None , None , 0)
  302. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint32x4Bits_I8 , Int16x8_1Uint32x4_1 , None , None , 0)
  303. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint16x8Bits_I8 , Int16x8_1Uint16x8_1 , None , None , 0)
  304. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint8x16Bits_I8 , Int16x8_1Uint8x16_1 , None , None , 0)
  305. // int8x16
  306. MACRO_SIMD_EXTEND_WMS (Simd128_FromFloat32x4Bits_I16 , Int8x16_1Float32x4_1 , None , None , 0)
  307. MACRO_SIMD_EXTEND_WMS (Simd128_FromInt32x4Bits_I16 , Int8x16_1Int32x4_1 , None , None , 0)
  308. MACRO_SIMD_EXTEND_WMS (Simd128_FromInt16x8Bits_I16 , Int8x16_1Int16x8_1 , None , None , 0)
  309. MACRO_SIMD_EXTEND_WMS (Simd128_FromUint32x4Bits_I16 , Int8x16_1Uint32x4_1 , None , None , 0)
  310. MACRO_SIMD_EXTEND_WMS (Simd128_FromUint16x8Bits_I16 , Int8x16_1Uint16x8_1 , None , None , 0)
  311. MACRO_SIMD_EXTEND_WMS (Simd128_FromUint8x16Bits_I16 , Int8x16_1Uint8x16_1 , None , None , 0)
  312. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS (Simd128_Ld_I16 , Int8x16_2 , None , None )
  313. MACRO_SIMD_ASMJS_ONLY_WMS (Simd128_LdSlot_I16 , ElementSlot , None , None )
  314. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS (Simd128_StSlot_I16 , ElementSlot , None , None )
  315. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS (Simd128_Return_I16 , Int8x16_2 , None , None )
  316. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS (Simd128_I_ArgOut_I16 , Reg1Int8x16_1 , None , None )
  317. // Uint32x4
  318. MACRO_SIMD_EXTEND_WMS ( Simd128_IntsToU4 , Uint32x4_1Int4 , None , None , 0)
  319. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_U4 , Int1Uint32x4_1Int1 , None , None , 0)
  320. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_U4 , Uint32x4_2Int2 , None , None , 0)
  321. MACRO_SIMD_EXTEND_WMS ( Simd128_Swizzle_U4 , Uint32x4_2Int4 , None , None , 0)
  322. MACRO_SIMD_EXTEND_WMS ( Simd128_Shuffle_U4 , Uint32x4_3Int4 , None , None , 0)
  323. MACRO_SIMD_EXTEND_WMS ( Simd128_Splat_U4 , Uint32x4_1Int1 , None , None , 0)
  324. MACRO_SIMD_EXTEND_WMS ( Simd128_And_U4 , Uint32x4_3 , None , None , 0)
  325. MACRO_SIMD_EXTEND_WMS ( Simd128_Or_U4 , Uint32x4_3 , None , None , 0)
  326. MACRO_SIMD_EXTEND_WMS ( Simd128_Xor_U4 , Uint32x4_3 , None , None , 0)
  327. MACRO_SIMD_EXTEND_WMS ( Simd128_Not_U4 , Uint32x4_2 , None , None , 0)
  328. MACRO_SIMD_EXTEND_WMS ( Simd128_Add_U4 , Uint32x4_3 , None , None , 0)
  329. MACRO_SIMD_EXTEND_WMS ( Simd128_Sub_U4 , Uint32x4_3 , None , None , 0)
  330. MACRO_SIMD_EXTEND_WMS ( Simd128_Mul_U4 , Uint32x4_3 , None , None , 0)
  331. MACRO_SIMD_EXTEND_WMS ( Simd128_Eq_U4 , Bool32x4_1Uint32x4_2 , None , None , 0)
  332. MACRO_SIMD_EXTEND_WMS ( Simd128_Neq_U4 , Bool32x4_1Uint32x4_2 , None , None , 0)
  333. MACRO_SIMD_EXTEND_WMS ( Simd128_Lt_U4 , Bool32x4_1Uint32x4_2 , None , None , 0)
  334. MACRO_SIMD_EXTEND_WMS ( Simd128_LtEq_U4 , Bool32x4_1Uint32x4_2 , None , None , 0)
  335. MACRO_SIMD_EXTEND_WMS ( Simd128_Gt_U4 , Bool32x4_1Uint32x4_2 , None , None , 0)
  336. MACRO_SIMD_EXTEND_WMS ( Simd128_GtEq_U4 , Bool32x4_1Uint32x4_2 , None , None , 0)
  337. MACRO_SIMD_EXTEND_WMS ( Simd128_ShLtByScalar_U4 , Uint32x4_2Int1 , None , None , 0)
  338. MACRO_SIMD_EXTEND_WMS ( Simd128_ShRtByScalar_U4 , Uint32x4_2Int1 , None , None , 0)
  339. MACRO_SIMD_EXTEND_WMS ( Simd128_Select_U4 , Uint32x4_1Bool32x4_1Uint32x4_2 , None , None , 0)
  340. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArr_U4 , AsmSimdTypedArr , None , None , 0)
  341. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArrConst_U4 , AsmSimdTypedArr , None , None , 0)
  342. MACRO_SIMD_EXTEND_WMS ( Simd128_StArr_U4 , AsmSimdTypedArr , None , None , 0)
  343. MACRO_SIMD_EXTEND_WMS ( Simd128_StArrConst_U4 , AsmSimdTypedArr , None , None , 0)
  344. MACRO_SIMD_EXTEND_WMS ( Simd128_FromFloat32x4_U4 , Uint32x4_1Float32x4_1 , None , None , 0)
  345. MACRO_SIMD_EXTEND_WMS ( Simd128_FromFloat32x4Bits_U4 , Uint32x4_1Float32x4_1 , None , None , 0)
  346. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt32x4Bits_U4 , Uint32x4_1Int32x4_1 , None , None , 0)
  347. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt16x8Bits_U4 , Uint32x4_1Int16x8_1 , None , None , 0)
  348. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt8x16Bits_U4 , Uint32x4_1Int8x16_1 , None , None , 0)
  349. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint16x8Bits_U4 , Uint32x4_1Uint16x8_1 , None , None , 0)
  350. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint8x16Bits_U4 , Uint32x4_1Uint8x16_1 , None , None , 0)
  351. // Uint16x8
  352. MACRO_SIMD_EXTEND_WMS ( Simd128_IntsToU8 , Uint16x8_1Int8 , None , None , 0)
  353. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_U8 , Int1Uint16x8_1Int1 , None , None , 0)
  354. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_U8 , Uint16x8_2Int2 , None , None , 0)
  355. MACRO_SIMD_EXTEND_WMS ( Simd128_Swizzle_U8 , Uint16x8_2Int8 , None , None , 0)
  356. MACRO_SIMD_EXTEND_WMS ( Simd128_Shuffle_U8 , Uint16x8_3Int8 , None , None , 0)
  357. MACRO_SIMD_EXTEND_WMS ( Simd128_Splat_U8 , Uint16x8_1Int1 , None , None , 0)
  358. MACRO_SIMD_EXTEND_WMS ( Simd128_And_U8 , Uint16x8_3 , None , None , 0)
  359. MACRO_SIMD_EXTEND_WMS ( Simd128_Or_U8 , Uint16x8_3 , None , None , 0)
  360. MACRO_SIMD_EXTEND_WMS ( Simd128_Xor_U8 , Uint16x8_3 , None , None , 0)
  361. MACRO_SIMD_EXTEND_WMS ( Simd128_Not_U8 , Uint16x8_2 , None , None , 0)
  362. MACRO_SIMD_EXTEND_WMS ( Simd128_Add_U8 , Uint16x8_3 , None , None , 0)
  363. MACRO_SIMD_EXTEND_WMS ( Simd128_Sub_U8 , Uint16x8_3 , None , None , 0)
  364. MACRO_SIMD_EXTEND_WMS ( Simd128_Mul_U8 , Uint16x8_3 , None , None , 0)
  365. MACRO_SIMD_EXTEND_WMS ( Simd128_ShLtByScalar_U8 , Uint16x8_2Int1 , None , None , 0)
  366. MACRO_SIMD_EXTEND_WMS ( Simd128_ShRtByScalar_U8 , Uint16x8_2Int1 , None , None , 0)
  367. MACRO_SIMD_EXTEND_WMS (Simd128_Lt_U8 , Bool16x8_1Uint16x8_2 , None , None , 0)
  368. MACRO_SIMD_EXTEND_WMS (Simd128_LtEq_U8 , Bool16x8_1Uint16x8_2 , None , None , 0)
  369. MACRO_SIMD_EXTEND_WMS (Simd128_Gt_U8 , Bool16x8_1Uint16x8_2 , None , None , 0)
  370. MACRO_SIMD_EXTEND_WMS (Simd128_GtEq_U8 , Bool16x8_1Uint16x8_2 , None , None , 0)
  371. MACRO_SIMD_EXTEND_WMS (Simd128_Eq_U8 , Bool16x8_1Uint16x8_2 , None , None , 0)
  372. MACRO_SIMD_EXTEND_WMS (Simd128_Neq_U8 , Bool16x8_1Uint16x8_2 , None , None , 0)
  373. MACRO_SIMD_EXTEND_WMS (Simd128_Select_U8 , Uint16x8_1Bool16x8_1Uint16x8_2 , None , None , 0)
  374. MACRO_SIMD_EXTEND_WMS ( Simd128_AddSaturate_U8 , Uint16x8_3 , None , None , 0)
  375. MACRO_SIMD_EXTEND_WMS ( Simd128_SubSaturate_U8 , Uint16x8_3 , None , None , 0)
  376. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArr_U8 , AsmSimdTypedArr , None , None , 0)
  377. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArrConst_U8 , AsmSimdTypedArr , None , None , 0)
  378. MACRO_SIMD_EXTEND_WMS ( Simd128_StArr_U8 , AsmSimdTypedArr , None , None , 0)
  379. MACRO_SIMD_EXTEND_WMS ( Simd128_StArrConst_U8 , AsmSimdTypedArr , None , None , 0)
  380. MACRO_SIMD_EXTEND_WMS ( Simd128_FromFloat32x4Bits_U8 , Uint16x8_1Float32x4_1 , None , None , 0)
  381. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt32x4Bits_U8 , Uint16x8_1Int32x4_1 , None , None , 0)
  382. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt16x8Bits_U8 , Uint16x8_1Int16x8_1 , None , None , 0)
  383. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt8x16Bits_U8 , Uint16x8_1Int8x16_1 , None , None , 0)
  384. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint32x4Bits_U8 , Uint16x8_1Uint32x4_1 , None , None , 0)
  385. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint8x16Bits_U8 , Uint16x8_1Uint8x16_1 , None , None , 0)
  386. // Uint8x16
  387. MACRO_SIMD_EXTEND_WMS ( Simd128_IntsToU16 , Uint8x16_1Int16 , None , None , 0)
  388. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_U16 , Int1Uint8x16_1Int1 , None , None , 0)
  389. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_U16 , Uint8x16_2Int2 , None , None , 0)
  390. MACRO_SIMD_EXTEND_WMS ( Simd128_Swizzle_U16 , Uint8x16_2Int16 , None , None , 0)
  391. MACRO_SIMD_EXTEND_WMS ( Simd128_Shuffle_U16 , Uint8x16_3Int16 , None , None , 0)
  392. MACRO_SIMD_EXTEND_WMS ( Simd128_Shuffle_V8X16 , AsmShuffle , None , None , 0)
  393. MACRO_SIMD_EXTEND_WMS ( Simd128_Splat_U16 , Uint8x16_1Int1 , None , None , 0)
  394. MACRO_SIMD_EXTEND_WMS ( Simd128_And_U16 , Uint8x16_3 , None , None , 0)
  395. MACRO_SIMD_EXTEND_WMS ( Simd128_Or_U16 , Uint8x16_3 , None , None , 0)
  396. MACRO_SIMD_EXTEND_WMS ( Simd128_Xor_U16 , Uint8x16_3 , None , None , 0)
  397. MACRO_SIMD_EXTEND_WMS ( Simd128_Not_U16 , Uint8x16_2 , None , None , 0)
  398. MACRO_SIMD_EXTEND_WMS ( Simd128_Add_U16 , Uint8x16_3 , None , None , 0)
  399. MACRO_SIMD_EXTEND_WMS ( Simd128_Sub_U16 , Uint8x16_3 , None , None , 0)
  400. MACRO_SIMD_EXTEND_WMS ( Simd128_Mul_U16 , Uint8x16_3 , None , None , 0)
  401. MACRO_SIMD_EXTEND_WMS ( Simd128_ShLtByScalar_U16 , Uint8x16_2Int1 , None , None , 0)
  402. MACRO_SIMD_EXTEND_WMS ( Simd128_ShRtByScalar_U16 , Uint8x16_2Int1 , None , None , 0)
  403. MACRO_SIMD_EXTEND_WMS ( Simd128_Lt_U16 , Bool8x16_1Uint8x16_2 , None , None , 0)
  404. MACRO_SIMD_EXTEND_WMS ( Simd128_LtEq_U16 , Bool8x16_1Uint8x16_2 , None , None , 0)
  405. MACRO_SIMD_EXTEND_WMS ( Simd128_Gt_U16 , Bool8x16_1Uint8x16_2 , None , None , 0)
  406. MACRO_SIMD_EXTEND_WMS ( Simd128_GtEq_U16 , Bool8x16_1Uint8x16_2 , None , None , 0)
  407. MACRO_SIMD_EXTEND_WMS ( Simd128_Eq_U16 , Bool8x16_1Uint8x16_2 , None , None , 0)
  408. MACRO_SIMD_EXTEND_WMS ( Simd128_Neq_U16 , Bool8x16_1Uint8x16_2 , None , None , 0)
  409. MACRO_SIMD_EXTEND_WMS ( Simd128_Select_U16 , Uint8x16_1Bool8x16_1Uint8x16_2 , None , None , 0)
  410. MACRO_SIMD_EXTEND_WMS ( Simd128_AddSaturate_U16 , Uint8x16_3 , None , None , 0)
  411. MACRO_SIMD_EXTEND_WMS ( Simd128_SubSaturate_U16 , Uint8x16_3 , None , None , 0)
  412. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArr_U16 , AsmSimdTypedArr , None , None , 0)
  413. MACRO_SIMD_EXTEND_WMS ( Simd128_LdArrConst_U16 , AsmSimdTypedArr , None , None , 0)
  414. MACRO_SIMD_EXTEND_WMS ( Simd128_StArr_U16 , AsmSimdTypedArr , None , None , 0)
  415. MACRO_SIMD_EXTEND_WMS ( Simd128_StArrConst_U16 , AsmSimdTypedArr , None , None , 0)
  416. MACRO_SIMD_EXTEND_WMS ( Simd128_FromFloat32x4Bits_U16 , Uint8x16_1Float32x4_1 , None , None , 0)
  417. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt32x4Bits_U16 , Uint8x16_1Int32x4_1 , None , None , 0)
  418. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt16x8Bits_U16 , Uint8x16_1Int16x8_1 , None , None , 0)
  419. MACRO_SIMD_EXTEND_WMS ( Simd128_FromInt8x16Bits_U16 , Uint8x16_1Int8x16_1 , None , None , 0)
  420. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint32x4Bits_U16 , Uint8x16_1Uint32x4_1 , None , None , 0)
  421. MACRO_SIMD_EXTEND_WMS ( Simd128_FromUint16x8Bits_U16 , Uint8x16_1Uint16x8_1 , None , None , 0)
  422. //Bool32x4
  423. MACRO_SIMD_EXTEND_WMS ( Simd128_IntsToB4 , Bool32x4_1Int4 , None , OpCanCSE , 0)
  424. MACRO_SIMD_EXTEND_WMS ( Simd128_Splat_B4 , Bool32x4_1Int1 , None , None , 0)
  425. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_B4 , Int1Bool32x4_1Int1 , None , None , 0)
  426. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_B4 , Bool32x4_2Int2 , None , None , 0)
  427. MACRO_SIMD_EXTEND_WMS ( Simd128_And_B4 , Bool32x4_3 , None , OpCanCSE , 0)
  428. MACRO_SIMD_EXTEND_WMS ( Simd128_Or_B4 , Bool32x4_3 , None , OpCanCSE , 0)
  429. MACRO_SIMD_EXTEND_WMS ( Simd128_Xor_B4 , Bool32x4_3 , None , OpCanCSE , 0)
  430. MACRO_SIMD_EXTEND_WMS ( Simd128_Not_B4 , Bool32x4_2 , None , OpCanCSE , 0)
  431. MACRO_SIMD_EXTEND_WMS ( Simd128_AnyTrue_B4 , Int1Bool32x4_1 , None , OpCanCSE , 0)
  432. MACRO_SIMD_EXTEND_WMS ( Simd128_AllTrue_B4 , Int1Bool32x4_1 , None , OpCanCSE , 0)
  433. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_Ld_B4 , Bool32x4_2 , None , None )
  434. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_LdSlot_B4 , ElementSlot , None , None )
  435. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_StSlot_B4 , ElementSlot , None , None )
  436. //Bool16x8
  437. MACRO_SIMD_EXTEND_WMS ( Simd128_IntsToB8 , Bool16x8_1Int8 , None , None , 0)
  438. MACRO_SIMD_EXTEND_WMS ( Simd128_Splat_B8 , Bool16x8_1Int1 , None , None , 0)
  439. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_B8 , Int1Bool16x8_1Int1 , None , None , 0)
  440. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_B8 , Bool16x8_2Int2 , None , None , 0)
  441. MACRO_SIMD_EXTEND_WMS ( Simd128_And_B8 , Bool16x8_3 , None , None , 0)
  442. MACRO_SIMD_EXTEND_WMS ( Simd128_Or_B8 , Bool16x8_3 , None , None , 0)
  443. MACRO_SIMD_EXTEND_WMS ( Simd128_Xor_B8 , Bool16x8_3 , None , None , 0)
  444. MACRO_SIMD_EXTEND_WMS ( Simd128_Not_B8 , Bool16x8_2 , None , None , 0)
  445. MACRO_SIMD_EXTEND_WMS ( Simd128_AnyTrue_B8 , Int1Bool16x8_1 , None , None , 0)
  446. MACRO_SIMD_EXTEND_WMS ( Simd128_AllTrue_B8 , Int1Bool16x8_1 , None , None , 0)
  447. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_Ld_B8 , Bool16x8_2 , None , None )
  448. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_LdSlot_B8 , ElementSlot , None , None )
  449. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_StSlot_B8 , ElementSlot , None , None )
  450. //Bool8x16
  451. MACRO_SIMD_EXTEND_WMS ( Simd128_IntsToB16 , Bool8x16_1Int16 , None , None , 0)
  452. MACRO_SIMD_EXTEND_WMS ( Simd128_Splat_B16 , Bool8x16_1Int1 , None , None , 0)
  453. MACRO_SIMD_EXTEND_WMS ( Simd128_ExtractLane_B16 , Int1Bool8x16_1Int1 , None , None , 0)
  454. MACRO_SIMD_EXTEND_WMS ( Simd128_ReplaceLane_B16 , Bool8x16_2Int2 , None , None , 0)
  455. //MACRO_SIMD_EXTEND_WMS ( Simd128_And_B16 , Bool8x16_3 , None , None , 0)
  456. //MACRO_SIMD_EXTEND_WMS ( Simd128_Or_B16 , Bool8x16_3 , None , None , 0)
  457. //MACRO_SIMD_EXTEND_WMS ( Simd128_Xor_B16 , Bool8x16_3 , None , None , 0)
  458. //MACRO_SIMD_EXTEND_WMS ( Simd128_Not_B16 , Bool8x16_2 , None , None , 0)
  459. MACRO_SIMD_EXTEND_WMS ( Simd128_AnyTrue_B16 , Int1Bool8x16_1 , None , None , 0)
  460. MACRO_SIMD_EXTEND_WMS ( Simd128_AllTrue_B16 , Int1Bool8x16_1 , None , None , 0)
  461. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_Ld_B16 , Bool8x16_2 , None , None )
  462. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_LdSlot_B16 , ElementSlot , None , None )
  463. MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS( Simd128_StSlot_B16 , ElementSlot , None , None )
  464. MACRO_SIMD_EXTEND ( Simd128_End_Extend , Empty , None , None , 0) // Just a marker to indicate SIMD opcodes region
  465. #undef T_F4
  466. #undef T_I4
  467. #undef T_INT
  468. #undef T_FLT
  469. #undef MACRO_SIMD
  470. #undef MACRO_SIMD_WMS
  471. #undef MACRO_SIMD_ASMJS_ONLY_WMS
  472. #undef MACRO_SIMD_BACKEND_ONLY
  473. #undef MACRO_SIMD_EXTEND
  474. #undef MACRO_SIMD_EXTEND_WMS
  475. #undef MACRO_SIMD_ASMJS_ONLY_EXTEND_WMS
  476. #undef MACRO_SIMD_BACKEND_ONLY_EXTEND