AsmJsEncoderHandler.inl 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  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. // Default all macro to nothing
  6. #ifndef DEF2
  7. #define DEF2(process, op, func)
  8. #endif
  9. #ifndef DEF3
  10. #define DEF3(process, op, func, y)
  11. #endif
  12. #ifndef DEF2_WMS
  13. #define DEF2_WMS(process, op, func)
  14. #endif
  15. #ifndef DEF3_WMS
  16. #define DEF3_WMS(process, op, func, y)
  17. #endif
  18. #ifndef DEF4_WMS
  19. #define DEF4_WMS(process, op, func, y, t)
  20. #endif
  21. #ifndef EXDEF2
  22. #define EXDEF2(process, op, func)
  23. #endif
  24. #ifndef EXDEF3
  25. #define EXDEF3(process, op, func, y)
  26. #endif
  27. #ifndef EXDEF2_WMS
  28. #define EXDEF2_WMS(process, op, func)
  29. #endif
  30. #ifndef EXDEF3_WMS
  31. #define EXDEF3_WMS(process, op, func, y)
  32. #endif
  33. #ifndef EXDEF4_WMS
  34. #define EXDEF4_WMS(process, op, func, y, t)
  35. #endif
  36. #ifdef NTBUILD
  37. // NT header is missing __cdecl on these API
  38. #define _CRT_HAS_CDECL false
  39. #else
  40. #define _CRT_HAS_CDECL true
  41. #endif
  42. DEF3 ( CUSTOM , Nop , OP_Empty , Empty )
  43. EXDEF3 ( CUSTOM , InvalidOpCode , OP_Empty , Empty )
  44. DEF3 ( CUSTOM , Label , OP_Label , Empty )
  45. DEF3 ( CUSTOM , Ret , OP_Empty , Empty )
  46. // External Calls
  47. DEF3 ( CUSTOM , StartCall , OP_StartCall , StartCall )
  48. DEF3_WMS( CUSTOM , Call , OP_Call , AsmCall )
  49. DEF3 ( CUSTOM , CheckHeap , OP_CheckHeap , Empty ) // TODO:: Implement CheckHeap in Templatized jit
  50. DEF3_WMS( CUSTOM , ArgOut_Db , OP_ArgOut_Db , Reg1Double1 )
  51. DEF3_WMS( CUSTOM , ArgOut_Int , OP_ArgOut_Int , Reg1Int1 )
  52. DEF3_WMS( CUSTOM , Conv_VTD , OP_Conv_VTD , Double1Reg1 )
  53. DEF3_WMS( CUSTOM , Conv_VTF , OP_Conv_VTF , Float1Reg1 )
  54. DEF3_WMS( CUSTOM , Conv_VTI , OP_Conv_VTI , Int1Reg1 )
  55. // Internal Calls
  56. DEF3 ( CUSTOM , I_StartCall , OP_I_StartCall , StartCall )
  57. DEF3_WMS( CUSTOM , I_Call , OP_I_Call , AsmCall )
  58. DEF3_WMS( CUSTOM , I_ArgOut_Db , OP_I_ArgOut_Db , Reg1Double1 )
  59. DEF3_WMS( CUSTOM , I_ArgOut_Flt , OP_I_ArgOut_Flt , Reg1Float1 )
  60. DEF3_WMS( CUSTOM , I_ArgOut_Int , OP_I_ArgOut_Int , Reg1Int1 )
  61. DEF3 ( CUSTOM , AsmBr , OP_Br , AsmBr )
  62. DEF3_WMS( CUSTOM , BrTrue_Int , OP_BrTrue , BrInt1 )
  63. DEF3_WMS( CUSTOM , BrEq_Int , OP_BrEq , BrInt2 )
  64. // Switching
  65. DEF3_WMS( INT2 , BeginSwitch_Int , Ld_Int , Int2 )
  66. DEF3 ( CUSTOM , EndSwitch_Int , OP_Br , AsmBr )
  67. DEF3_WMS( CUSTOM , Case_Int , OP_BrEq , BrInt2 )
  68. DEF3_WMS( CUSTOM , Case_IntConst , OP_BrEqConst , BrInt1Const1 )
  69. DEF3_WMS( CUSTOM , Conv_DTI , Op_Db_To_Int , Int1Double1 )
  70. DEF3_WMS( CUSTOM , Conv_ITD , Op_Int_To_Db , Double1Int1 )
  71. DEF3_WMS( CUSTOM , Conv_UTD , Op_UInt_To_Db , Double1Int1 )
  72. DEF3_WMS( CUSTOM , Conv_FTD , Op_Float_To_Db , Double1Float1 )
  73. DEF3_WMS( CUSTOM , Conv_FTI , Op_Float_To_Int , Int1Float1 )
  74. DEF3_WMS( CUSTOM , Return_Db , OP_SetReturnDouble , Double2 )
  75. DEF3_WMS( CUSTOM , Return_Flt , OP_SetReturnFloat , Float2 )
  76. DEF3_WMS( CUSTOM , Return_Int , OP_SetReturnInt , Int2 )
  77. DEF3_WMS( CUSTOM , LdSlotArr , OP_LdSlot , ElementSlot )
  78. DEF3_WMS( CUSTOM , LdSlot , OP_LdSlot , ElementSlot )
  79. DEF3_WMS( CUSTOM , LdSlot_Db , Op_LdSlot_Db , ElementSlot )
  80. DEF3_WMS( CUSTOM , LdSlot_Int , Op_LdSlot_Int , ElementSlot )
  81. DEF3_WMS( CUSTOM , LdSlot_Flt , Op_LdSlot_Flt , ElementSlot )
  82. DEF3_WMS( CUSTOM , StSlot_Db , Op_StSlot_Db , ElementSlot )
  83. DEF3_WMS( CUSTOM , StSlot_Int , Op_StSlot_Int , ElementSlot )
  84. DEF3_WMS( CUSTOM , StSlot_Flt , Op_StSlot_Flt , ElementSlot )
  85. DEF3_WMS( ELEMENTSLOT, LdArr_Func , LdArr_Func , ElementSlot )
  86. DEF3_WMS( CUSTOM , LdArr , Op_LdArr , AsmTypedArr )
  87. DEF3_WMS( CUSTOM , LdArrConst , Op_LdArrConst , AsmTypedArr )
  88. DEF3_WMS( CUSTOM , StArr , Op_StArr , AsmTypedArr )
  89. DEF3_WMS( CUSTOM , StArrConst , Op_StArrConst , AsmTypedArr )
  90. DEF3_WMS( CUSTOM , Ld_IntConst , Op_LdConst_Int , Int1Const1 )
  91. DEF3_WMS( INT2 , Ld_Int , Ld_Int , Int2 )
  92. DEF3_WMS( INT2 , Neg_Int , Neg_Int , Int2 )
  93. DEF3_WMS( INT2 , Not_Int , Not_Int , Int2 )
  94. DEF3_WMS( INT2 , LogNot_Int , LogNot_Int , Int2 )
  95. DEF3_WMS( INT2 , Conv_ITB , Int_To_Bool , Int2 )
  96. DEF3_WMS( INT3 , Add_Int , Add_Int , Int3 )
  97. DEF3_WMS( INT3 , Sub_Int , Sub_Int , Int3 )
  98. DEF3_WMS( INT3 , Mul_Int , Mul_Int , Int3 )
  99. DEF3_WMS( INT3 , Div_Int , Div_Int , Int3 )
  100. DEF3_WMS( INT3 , Rem_Int , Rem_Int , Int3 )
  101. DEF3_WMS( INT3 , And_Int , And_Int , Int3 )
  102. DEF3_WMS( INT3 , Or_Int , Or_Int , Int3 )
  103. DEF3_WMS( INT3 , Xor_Int , Xor_Int , Int3 )
  104. DEF3_WMS( INT3 , Shl_Int , Shl_Int , Int3 )
  105. DEF3_WMS( INT3 , Shr_Int , Shr_Int , Int3 )
  106. DEF3_WMS( INT3 , Shr_UInt , Shr_UInt , Int3 )
  107. DEF3_WMS( INT3 , Div_UInt , Div_UInt , Int3 )
  108. DEF3_WMS( INT3 , Rem_UInt , Rem_UInt , Int3 )
  109. DEF3_WMS( DOUBLE2 , Ld_Db , Ld_Db , Double2 )
  110. DEF3_WMS( FLOAT2 , Ld_Flt , Ld_Flt , Float2 )
  111. DEF3_WMS( DOUBLE2 , Neg_Db , Neg_Db , Double2 )
  112. DEF3_WMS( DOUBLE3 , Add_Db , Add_Db , Double3 )
  113. DEF3_WMS( DOUBLE3 , Sub_Db , Sub_Db , Double3 )
  114. DEF3_WMS( DOUBLE3 , Mul_Db , Mul_Db , Double3 )
  115. DEF3_WMS( DOUBLE3 , Div_Db , Div_Db , Double3 )
  116. DEF3_WMS( DOUBLE3 , Rem_Db , Rem_Db , Double3 )
  117. //float math
  118. DEF3_WMS( FLOAT2 , Neg_Flt , Neg_Flt , Float2 )
  119. DEF3_WMS( FLOAT3 , Add_Flt , Add_Flt , Float3 )
  120. DEF3_WMS( FLOAT3 , Sub_Flt , Sub_Flt , Float3 )
  121. DEF3_WMS( FLOAT3 , Mul_Flt , Mul_Flt , Float3 )
  122. DEF3_WMS (FLOAT3 , Div_Flt , Div_Flt , Float3 )
  123. DEF3_WMS( INT3 , CmLt_Int , Lt_Int , Int3 )
  124. DEF3_WMS( INT3 , CmLe_Int , Le_Int , Int3 )
  125. DEF3_WMS( INT3 , CmGt_Int , Gt_Int , Int3 )
  126. DEF3_WMS( INT3 , CmGe_Int , Ge_Int , Int3 )
  127. DEF3_WMS( INT3 , CmEq_Int , Eq_Int , Int3 )
  128. DEF3_WMS( INT3 , CmNe_Int , Ne_Int , Int3 )
  129. DEF3_WMS( INT3 , CmLt_UInt , Lt_UInt , Int3 )
  130. DEF3_WMS( INT3 , CmLe_UInt , Le_UInt , Int3 )
  131. DEF3_WMS( INT3 , CmGt_UInt , Gt_UInt , Int3 )
  132. DEF3_WMS( INT3 , CmGe_UInt , Ge_UInt , Int3 )
  133. DEF3_WMS( INT1DOUBLE2, CmLt_Db , CmpLt_Db , Int1Double2 )
  134. DEF3_WMS( INT1DOUBLE2, CmLe_Db , CmpLe_Db , Int1Double2 )
  135. DEF3_WMS( INT1DOUBLE2, CmGt_Db , CmpGt_Db , Int1Double2 )
  136. DEF3_WMS( INT1DOUBLE2, CmGe_Db , CmpGe_Db , Int1Double2 )
  137. DEF3_WMS( INT1DOUBLE2, CmEq_Db , CmpEq_Db , Int1Double2 )
  138. DEF3_WMS( INT1DOUBLE2, CmNe_Db , CmpNe_Db , Int1Double2 )
  139. DEF3_WMS( INT1FLOAT2 , CmLt_Flt , CmpLt_Flt , Int1Float2 )
  140. DEF3_WMS( INT1FLOAT2 , CmLe_Flt , CmpLe_Flt , Int1Float2 )
  141. DEF3_WMS( INT1FLOAT2 , CmGt_Flt , CmpGt_Flt , Int1Float2 )
  142. DEF3_WMS( INT1FLOAT2 , CmGe_Flt , CmpGe_Flt , Int1Float2 )
  143. DEF3_WMS( INT1FLOAT2 , CmEq_Flt , CmpEq_Flt , Int1Float2 )
  144. DEF3_WMS( INT1FLOAT2 , CmNe_Flt , CmpNe_Flt , Int1Float2 )
  145. DEF3_WMS( INT2 , Abs_Int , Abs_Int , Int2 )
  146. DEF3_WMS( INT3 , Min_Int , Min_Int , Int3 )
  147. DEF3_WMS( INT3 , Max_Int , Max_Int , Int3 )
  148. DEF3_WMS( INT3 , Imul_Int , Mul_Int , Int3 )
  149. DEF3_WMS( INT2 , Clz32_Int , Clz32_Int , Int2 )
  150. DEF3_WMS( CALLDOUBLE2, Sin_Db , Math::Sin , false )
  151. DEF3_WMS( CALLDOUBLE2, Cos_Db , Math::Cos , false )
  152. DEF3_WMS( CALLDOUBLE2, Tan_Db , Math::Tan , false )
  153. DEF3_WMS( CALLDOUBLE2, Asin_Db , Math::Asin , false )
  154. DEF3_WMS( CALLDOUBLE2, Acos_Db , Math::Acos , false )
  155. DEF3_WMS( CALLDOUBLE2, Atan_Db , Math::Atan , false )
  156. DEF3_WMS( CALLDOUBLE2, Ceil_Db , ::ceil , true )
  157. DEF3_WMS( CALLFLOAT2 , Ceil_Flt , ::ceilf , _CRT_HAS_CDECL)
  158. DEF3_WMS( CALLDOUBLE2, Floor_Db , ::floor , true )
  159. DEF3_WMS( CALLFLOAT2 , Floor_Flt , ::floorf , _CRT_HAS_CDECL)
  160. DEF3_WMS( CALLDOUBLE2, Exp_Db , Math::Exp , false )
  161. DEF3_WMS( CALLDOUBLE2, Log_Db , Math::Log , false )
  162. DEF3_WMS( CALLDOUBLE3, Pow_Db , Math::Pow , false )
  163. DEF3_WMS( CALLDOUBLE2, Sqrt_Db , ::sqrt , true )
  164. DEF3_WMS( CALLFLOAT2, Sqrt_Flt , ::sqrtf , _CRT_HAS_CDECL)
  165. DEF3_WMS( CALLDOUBLE2, Abs_Db , Math::Abs , false )
  166. DEF3_WMS( CALLFLOAT2 , Abs_Flt , ::fabsf , _CRT_HAS_CDECL)
  167. DEF3_WMS( CALLDOUBLE3, Atan2_Db , Math::Atan2 , false )
  168. DEF3_WMS( CALLDOUBLE3, Min_Db , AsmJsMath::Min<double> , false )
  169. DEF3_WMS( CALLDOUBLE3, Max_Db , AsmJsMath::Max<double> , false )
  170. DEF3_WMS( CUSTOM , Fround_Flt , OP_SetFroundFlt , Float2 )
  171. DEF3_WMS( CUSTOM , Fround_Db , OP_SetFroundDb , Float1Double1 )
  172. DEF3_WMS( CUSTOM , Fround_Int , OP_SetFroundInt , Float1Int1 )
  173. DEF3_WMS( CUSTOM , AsmJsLoopBodyStart,OP_AsmJsLoopBody , AsmUnsigned1 )
  174. #ifdef ENABLE_WASM_SIMD
  175. DEF3_WMS( CUSTOM , Simd128_Ld_F4 , OP_Simd128_LdF4 , Float32x4_2 )
  176. DEF3_WMS( CUSTOM , Simd128_Ld_I4 , OP_Simd128_LdI4 , Int32x4_2 )
  177. //DEF3_WMS( CUSTOM , Simd128_Ld_D2 , OP_Simd128_LdD2 , Float64x2_2 )
  178. DEF3_WMS( CUSTOM , Simd128_LdSlot_F4 , OP_Simd128_LdSlotF4 , ElementSlot )
  179. DEF3_WMS( CUSTOM , Simd128_LdSlot_I4 , OP_Simd128_LdSlotI4 , ElementSlot )
  180. //DEF3_WMS( CUSTOM , Simd128_LdSlot_D2 , OP_Simd128_LdSlotD2 , ElementSlot )
  181. DEF3_WMS( CUSTOM , Simd128_StSlot_F4 , OP_Simd128_StSlotF4 , ElementSlot )
  182. DEF3_WMS( CUSTOM , Simd128_StSlot_I4 , OP_Simd128_StSlotI4 , ElementSlot )
  183. //DEF3_WMS( CUSTOM , Simd128_StSlot_D2 , OP_Simd128_StSlotD2 , ElementSlot )
  184. DEF3_WMS( CUSTOM , Simd128_FloatsToF4 , OP_Simd128_FloatsToF4 , Float32x4_1Float4 )
  185. DEF3_WMS( CUSTOM , Simd128_IntsToI4 , OP_Simd128_IntsToI4 , Int32x4_1Int4 )
  186. //DEF3_WMS( CUSTOM , Simd128_DoublesToD2 , OP_Simd128_DoublesToD2 , Float64x2_1Double2 )
  187. DEF3_WMS( CUSTOM , Simd128_Return_F4 , OP_Simd128_ReturnF4 , Float32x4_2 )
  188. DEF3_WMS( CUSTOM , Simd128_Return_I4 , OP_Simd128_ReturnI4 , Int32x4_2 )
  189. //DEF3_WMS( CUSTOM , Simd128_Return_D2 , OP_Simd128_ReturnD2 , Float64x2_2 )
  190. DEF3_WMS( CUSTOM , Simd128_Splat_F4 , OP_Simd128_SplatF4 , Float32x4_1Float1 )
  191. DEF3_WMS( CUSTOM , Simd128_Splat_I4 , OP_Simd128_SplatI4 , Int32x4_1Int1 )
  192. //DEF3_WMS( CUSTOM , Simd128_Splat_D2 , OP_Simd128_SplatD2 , Float64x2_1Double1 )
  193. //DEF3_WMS( CUSTOM , Simd128_FromFloat64x2_F4 , OP_Simd128_FromFloat64x2F4 , Float32x4_1Float64x2_1 )
  194. DEF3_WMS( CUSTOM , Simd128_FromInt32x4_F4 , OP_Simd128_FromInt32x4F4 , Float32x4_1Int32x4_1 )
  195. //DEF3_WMS( CUSTOM , Simd128_FromFloat64x2Bits_F4 , OP_Simd128_FromFloat64x2BitsF4 , Float32x4_1Float64x2_1 )
  196. DEF3_WMS( CUSTOM , Simd128_FromInt32x4Bits_F4 , OP_Simd128_FromInt32x4BitsF4 , Float32x4_1Int32x4_1 )
  197. //DEF3_WMS( CUSTOM , Simd128_FromFloat32x4_D2 , OP_Simd128_FromFloat32x4D2 , Float64x2_1Float32x4_1 )
  198. //DEF3_WMS( CUSTOM , Simd128_FromInt32x4_D2 , OP_Simd128_FromInt32x4D2 , Float64x2_1Int32x4_1 )
  199. //DEF3_WMS( CUSTOM , Simd128_FromFloat32x4Bits_D2 , OP_Simd128_FromFloat32x4BitsD2 , Float64x2_1Float32x4_1 )
  200. //DEF3_WMS( CUSTOM , Simd128_FromInt32x4Bits_D2 , OP_Simd128_FromInt32x4BitsD2 , Float64x2_1Int32x4_1 )
  201. DEF3_WMS( CUSTOM , Simd128_FromFloat32x4_I4 , OP_Simd128_FromFloat32x4I4 , Int32x4_1Float32x4_1 )
  202. //DEF3_WMS( CUSTOM , Simd128_FromFloat64x2_I4 , OP_Simd128_FromFloat64x2I4 , Int32x4_1Float64x2_1 )
  203. DEF3_WMS( CUSTOM , Simd128_FromFloat32x4Bits_I4 , OP_Simd128_FromFloat32x4BitsI4 , Int32x4_1Float32x4_1 )
  204. //DEF3_WMS( CUSTOM , Simd128_FromFloat64x2Bits_I4 , OP_Simd128_FromFloat64x2BitsI4 , Int32x4_1Float64x2_1 )
  205. DEF3_WMS( CUSTOM , Simd128_Abs_F4 , OP_Simd128_AbsF4 , Float32x4_2 )
  206. //DEF3_WMS( CUSTOM , Simd128_Abs_D2 , OP_Simd128_AbsD2 , Float64x2_2 )
  207. DEF3_WMS( CUSTOM , Simd128_Neg_F4 , OP_Simd128_NegF4 , Float32x4_2 )
  208. DEF3_WMS( CUSTOM , Simd128_Neg_I4 , OP_Simd128_NegI4 , Int32x4_2 )
  209. //DEF3_WMS( CUSTOM , Simd128_Neg_D2 , OP_Simd128_NegD2 , Float64x2_2 )
  210. DEF3_WMS( CUSTOM , Simd128_Rcp_F4 , OP_Simd128_RcpF4 , Float32x4_2 )
  211. //DEF3_WMS( CUSTOM , Simd128_Rcp_D2 , OP_Simd128_RcpD2 , Float64x2_2 )
  212. DEF3_WMS( CUSTOM , Simd128_RcpSqrt_F4 , OP_Simd128_RcpSqrtF4 , Float32x4_2 )
  213. //DEF3_WMS( CUSTOM , Simd128_RcpSqrt_D2 , OP_Simd128_RcpSqrtD2 , Float64x2_2 )
  214. DEF3_WMS( CUSTOM , Simd128_Sqrt_F4 , OP_Simd128_SqrtF4 , Float32x4_2 )
  215. //DEF3_WMS( CUSTOM , Simd128_Sqrt_D2 , OP_Simd128_SqrtD2 , Float64x2_2 )
  216. DEF3_WMS( CUSTOM , Simd128_Not_I4 , OP_Simd128_NotI4 , Int32x4_2 )
  217. DEF3_WMS( CUSTOM , Simd128_Add_F4 , OP_Simd128_AddF4 , Float32x4_3 )
  218. DEF3_WMS( CUSTOM , Simd128_Add_I4 , OP_Simd128_AddI4 , Int32x4_3 )
  219. //DEF3_WMS( CUSTOM , Simd128_Add_D2 , OP_Simd128_AddD2 , Float64x2_3 )
  220. DEF3_WMS( CUSTOM , Simd128_Sub_F4 , OP_Simd128_SubF4 , Float32x4_3 )
  221. DEF3_WMS( CUSTOM , Simd128_Sub_I4 , OP_Simd128_SubI4 , Int32x4_3 )
  222. //DEF3_WMS( CUSTOM , Simd128_Sub_D2 , OP_Simd128_SubD2 , Float64x2_3 )
  223. DEF3_WMS( CUSTOM , Simd128_Mul_F4 , OP_Simd128_MulF4 , Float32x4_3 )
  224. DEF3_WMS( CUSTOM , Simd128_Mul_I4 , OP_Simd128_MulI4 , Int32x4_3 )
  225. //DEF3_WMS( CUSTOM , Simd128_Mul_D2 , OP_Simd128_MulD2 , Float64x2_3 )
  226. DEF3_WMS( CUSTOM , Simd128_Div_F4 , OP_Simd128_DivF4 , Float32x4_3 )
  227. //DEF3_WMS( CUSTOM , Simd128_Div_D2 , OP_Simd128_DivD2 , Float64x2_3 )
  228. DEF3_WMS( CUSTOM , Simd128_Min_F4 , OP_Simd128_MinF4 , Float32x4_3 )
  229. //DEF3_WMS( CUSTOM , Simd128_Min_D2 , OP_Simd128_MinD2 , Float64x2_3 )
  230. DEF3_WMS( CUSTOM , Simd128_Max_F4 , OP_Simd128_MaxF4 , Float32x4_3 )
  231. //DEF3_WMS( CUSTOM , Simd128_Max_D2 , OP_Simd128_MaxD2 , Float64x2_3 )
  232. DEF3_WMS( CUSTOM , Simd128_Lt_F4 , OP_Simd128_LtF4 , Bool32x4_1Float32x4_2 )
  233. DEF3_WMS( CUSTOM , Simd128_Lt_I4 , OP_Simd128_LtI4 , Bool32x4_1Int32x4_2 )
  234. //DEF3_WMS( CUSTOM , Simd128_Lt_D2 , OP_Simd128_LtD2 , Float64x2_3 )
  235. DEF3_WMS( CUSTOM , Simd128_Gt_F4 , OP_Simd128_GtF4 , Bool32x4_1Float32x4_2 )
  236. DEF3_WMS( CUSTOM , Simd128_Gt_I4 , OP_Simd128_GtI4 , Bool32x4_1Int32x4_2 )
  237. //DEF3_WMS( CUSTOM , Simd128_Gt_D2 , OP_Simd128_GtD2 , Float64x2_3 )
  238. DEF3_WMS( CUSTOM , Simd128_LtEq_F4 , OP_Simd128_LtEqF4 , Bool32x4_1Float32x4_2 )
  239. //DEF3_WMS( CUSTOM , Simd128_LtEq_D2 , OP_Simd128_LtEqD2 , Float64x2_3 )
  240. DEF3_WMS( CUSTOM , Simd128_GtEq_F4 , OP_Simd128_GtEqF4 , Bool32x4_1Float32x4_2 )
  241. //DEF3_WMS( CUSTOM , Simd128_GtEq_D2 , OP_Simd128_GtEqD2 , Float64x2_3 )
  242. DEF3_WMS( CUSTOM , Simd128_Eq_F4 , OP_Simd128_EqF4 , Bool32x4_1Float32x4_2 )
  243. DEF3_WMS( CUSTOM , Simd128_Eq_I4 , OP_Simd128_EqI4 , Bool32x4_1Int32x4_2 )
  244. //DEF3_WMS( CUSTOM , Simd128_Eq_D2 , OP_Simd128_EqD2 , Float64x2_3 )
  245. DEF3_WMS( CUSTOM , Simd128_Neq_F4 , OP_Simd128_NeqF4 , Bool32x4_1Float32x4_2 )
  246. //DEF3_WMS( CUSTOM , Simd128_Neq_D2 , OP_Simd128_NeqD2 , Float64x2_3 )
  247. DEF3_WMS( CUSTOM , Simd128_And_I4 , OP_Simd128_AndI4 , Int32x4_3 )
  248. DEF3_WMS( CUSTOM , Simd128_Or_I4 , OP_Simd128_OrI4 , Int32x4_3 )
  249. DEF3_WMS( CUSTOM , Simd128_Xor_I4 , OP_Simd128_XorI4 , Int32x4_3 )
  250. // ToDO: Spec change: Change to BitSelect
  251. DEF3_WMS( CUSTOM , Simd128_Select_F4 , OP_Simd128_SelectF4 , Float32x4_1Bool32x4_1Float32x4_2)
  252. DEF3_WMS( CUSTOM , Simd128_Select_I4 , OP_Simd128_SelectI4 , Int32x4_1Bool32x4_1Int32x4_2 )
  253. //DEF3_WMS( CUSTOM , Simd128_Select_D2 , OP_Simd128_SelectD2 , Float64x2_1Int32x4_1Float64x2_2 )
  254. DEF3_WMS( CUSTOM , Simd128_I_ArgOut_F4 , OP_Simd128_I_ArgOutF4 , Reg1Float32x4_1 )
  255. DEF3_WMS( CUSTOM , Simd128_I_ArgOut_I4 , OP_Simd128_I_ArgOutI4 , Reg1Int32x4_1 )
  256. //DEF3_WMS( CUSTOM , Simd128_I_ArgOut_D2 , OP_Simd128_I_ArgOutD2 , Reg1Float64x2_1 )
  257. //Lane acess
  258. DEF3_WMS( CUSTOM , Simd128_ExtractLane_I4 , OP_Simd128_ExtractLaneI4 , Int1Int32x4_1Int1)
  259. DEF3_WMS( CUSTOM , Simd128_ExtractLane_F4 , OP_Simd128_ExtractLaneF4 , Float1Float32x4_1Int1)
  260. DEF3_WMS( CUSTOM , Simd128_ReplaceLane_I4 , OP_Simd128_ReplaceLaneI4 , Int32x4_2Int2)
  261. DEF3_WMS( CUSTOM , Simd128_ReplaceLane_F4 , OP_Simd128_ReplaceLaneF4 , Float32x4_2Int1Float1)
  262. #endif
  263. // help the caller to undefine all the macros
  264. #undef DEF2
  265. #undef DEF3
  266. #undef DEF2_WMS
  267. #undef DEF3_WMS
  268. #undef DEF4_WMS
  269. #undef EXDEF2
  270. #undef EXDEF3
  271. #undef EXDEF2_WMS
  272. #undef EXDEF3_WMS
  273. #undef EXDEF4_WMS