InterpreterHandlerAsmJs.inl 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771
  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. #ifdef ASMJS_PLAT
  6. // See Lib\Runtime\Language\InterpreterProcessOpCodeAsmJs.h for Handler Process
  7. // ( HandlerProcess , OpCodeAsmJs , HandlerFunction , LayoutAsmJs , Type )
  8. // ( | , | , | , | , | )
  9. // ( | , | , | , | , | )
  10. // ( V , V , V , V , V )
  11. DEF2 ( NOPASMJS , Nop , Empty )
  12. EXDEF2 (NOPASMJS , InvalidOpCode, Empty )
  13. DEF2 ( NOPASMJS , Label , Empty )
  14. DEF2 ( BR_ASM , AsmBr , OP_Br )
  15. DEF2_WMS( FALLTHROUGH_ASM , LdSlotArr , /* Common case with LdSlot */ )
  16. DEF3_WMS( CUSTOM_ASMJS , LdSlot , OP_LdAsmJsSlot , ElementSlot )
  17. // Function Calls
  18. DEF2 ( FALLTHROUGH_ASM , I_StartCall, /* Common case with StartCall */ )
  19. DEF3 ( CUSTOM_ASMJS , StartCall , OP_AsmStartCall , StartCall )
  20. DEF3_WMS( CUSTOM_ASMJS , I_Call , OP_I_AsmCall , AsmCall )
  21. DEF3_WMS( CUSTOM_ASMJS , ProfiledI_Call, OP_ProfiledI_AsmCall , ProfiledAsmCall )
  22. DEF3_WMS( CUSTOM_ASMJS , Call , OP_AsmCall , AsmCall )
  23. DEF3 ( CUSTOM_ASMJS , CheckHeap , OP_EnsureHeapAttached , Empty )
  24. DEF2_WMS( D1toR1Out , I_ArgOut_Db , OP_I_SetOutAsmDb ) // set double as internal outparam
  25. DEF2_WMS( D1toR1Out , ArgOut_Db , OP_SetOutAsmDb ) // convert double to var and set it as outparam
  26. DEF2_WMS( I1toR1Out , I_ArgOut_Int , OP_I_SetOutAsmInt ) // set int as internal outparam
  27. DEF2_WMS( I1toR1Out , ArgOut_Int , OP_SetOutAsmInt ) // convert int to var and set it as outparam
  28. DEF2_WMS( F1toR1Out , I_ArgOut_Flt , OP_I_SetOutAsmFlt ) // set float as internal outparam
  29. DEF2_WMS( F1toR1Out , ArgOut_Flt , OP_SetOutAsmFlt ) // convert float to var and set as outparam
  30. DEF2_WMS( L1toR1Out , I_ArgOut_Long, OP_I_SetOutAsmLong ) // set int64 as internal outparam
  31. DEF2_WMS( R1toD1Mem , Conv_VTD , JavascriptConversion::ToNumber ) // convert var to double
  32. DEF2_WMS( R1toF1Mem , Conv_VTF , JavascriptConversion::ToNumber ) // convert var to float
  33. DEF2_WMS( R1toI1Mem , Conv_VTI , JavascriptMath::ToInt32 ) // convert var to int
  34. DEF3_WMS( CUSTOM_ASMJS , Conv_VTL , (OP_InvalidWasmTypeConversion<Wasm::WasmTypes::I64,false>) , Long1Reg1 ) // convert var to int64
  35. DEF3_WMS( CUSTOM_ASMJS , ArgOut_Long , (OP_InvalidWasmTypeConversion<Wasm::WasmTypes::I64,true>) , Reg1Long1 ) // convert int64 to Var
  36. DEF3_WMS( CUSTOM_ASMJS , LdArr_Func , OP_LdArrFunc , ElementSlot )
  37. DEF3_WMS( CUSTOM_ASMJS , LdArr_WasmFunc,OP_LdArrWasmFunc , ElementSlot )
  38. DEF3_WMS( CUSTOM_ASMJS , CheckSignature,OP_CheckSignature , Reg1IntConst1 )
  39. DEF4_WMS( TEMPLATE_ASMJS , LdSlot_Db , OP_LdSlotPrimitive , ElementSlot, double )
  40. DEF4_WMS( TEMPLATE_ASMJS , LdSlot_Int , OP_LdSlotPrimitive , ElementSlot, int )
  41. DEF4_WMS( TEMPLATE_ASMJS , LdSlot_Long , OP_LdSlotPrimitive , ElementSlot, int64 )
  42. DEF4_WMS( TEMPLATE_ASMJS , LdSlot_Flt , OP_LdSlotPrimitive , ElementSlot, float )
  43. DEF4_WMS( TEMPLATE_ASMJS , StSlot_Db , OP_StSlotPrimitive , ElementSlot, double )
  44. DEF4_WMS( TEMPLATE_ASMJS , StSlot_Int , OP_StSlotPrimitive , ElementSlot, int )
  45. DEF4_WMS( TEMPLATE_ASMJS , StSlot_Long , OP_StSlotPrimitive , ElementSlot, int64 )
  46. DEF4_WMS( TEMPLATE_ASMJS , StSlot_Flt , OP_StSlotPrimitive , ElementSlot, float )
  47. DEF3_WMS( CUSTOM_ASMJS , LdArr , OP_LdArrGeneric , AsmTypedArr )
  48. DEF3_WMS( CUSTOM_ASMJS , LdArrWasm , OP_LdArrWasm , WasmMemAccess )
  49. DEF3_WMS( CUSTOM_ASMJS , StArrWasm , OP_StArrWasm , WasmMemAccess )
  50. EXDEF3_WMS( CUSTOM_ASMJS , LdArrAtomic , OP_LdArrAtomic , WasmMemAccess )
  51. EXDEF3_WMS( CUSTOM_ASMJS , StArrAtomic , OP_StArrAtomic , WasmMemAccess )
  52. DEF3_WMS( CUSTOM_ASMJS , LdArrConst , OP_LdArrConstIndex , AsmTypedArr )
  53. DEF3_WMS( CUSTOM_ASMJS , StArr , OP_StArrGeneric , AsmTypedArr )
  54. DEF3_WMS( CUSTOM_ASMJS , StArrConst , OP_StArrConstIndex , AsmTypedArr )
  55. DEF2_WMS( C1toI1 , Ld_IntConst , None )
  56. DEF2_WMS( C1toL1 , Ld_LongConst , None )
  57. DEF2_WMS( C1toF1 , Ld_FltConst , None )
  58. DEF2_WMS( C1toD1 , Ld_DbConst , None )
  59. DEF2_WMS( BR_ASM_MemStack , BrTrue_Int , None ) // Jumps to location if int reg is true
  60. DEF2_WMS( BR_ASM_MemStackF , BrFalse_Int , None ) // Jumps to location if int reg is false
  61. DEF2_WMS( BR_ASM_Mem , BrEq_Int , AsmJsMath::CmpEq<int> ) // Jumps to location if both int reg are equal
  62. DEF2_WMS( I1toF1Mem , Reinterpret_ITF, NumberUtilities::ReinterpretBits ) // reinterpret bits of int to float
  63. DEF2_WMS( F1toI1Mem , Reinterpret_FTI, NumberUtilities::ToSpecial ) // reinterpret bits of float to int
  64. DEF2_WMS( L1toD1Mem , Reinterpret_LTD, NumberUtilities::ReinterpretBits ) // reinterpret bits of long to double
  65. DEF2_WMS( D1toL1Mem , Reinterpret_DTL, NumberUtilities::ToSpecial ) // reinterpret bits of double to long
  66. DEF2_WMS( D1toI1Mem , Conv_DTI , JavascriptConversion::ToInt32 ) // convert double to int
  67. DEF2_WMS( D1toI1Mem , Conv_DTU , JavascriptConversion::ToUInt32 ) // convert double to unsigned int
  68. DEF2_WMS( F1toI1Mem , Conv_FTI , JavascriptConversion::ToInt32 ) // convert float to int
  69. DEF2_WMS( F1toI1Mem , Conv_FTU , JavascriptConversion::ToUInt32 ) // convert float to unsigned int
  70. DEF2_WMS( I1toD1Mem , Conv_ITD , (double) ) // convert int to double
  71. DEF2_WMS( U1toD1Mem , Conv_UTD , (double) ) // convert unsigned int to double
  72. DEF2_WMS( U1toF1Mem , Conv_UTF , (float) ) // convert unsigned int to float
  73. DEF2_WMS( F1toD1Mem , Conv_FTD , (double) ) // convert unsigned float to double
  74. DEF2_WMS( I1toL1Mem , Conv_ITL , (int64) ) // extend signed int to int64
  75. DEF2_WMS( U1toL1Mem , Conv_UTL , (int64) ) // extend unsigned int to int64
  76. DEF2_WMS( L1toD1Mem , Conv_ULTD , JavascriptConversion::ULongToDouble )
  77. DEF2_WMS( L1toD1Mem , Conv_LTD , JavascriptConversion::LongToDouble )
  78. DEF2_WMS( L1toF1Mem , Conv_ULTF , JavascriptConversion::ULongToFloat )
  79. DEF2_WMS( L1toF1Mem , Conv_LTF , JavascriptConversion::LongToFloat )
  80. DEF2_WMS( L1toI1Mem , Conv_LTI , (int) ) // wrap int64 to int
  81. DEF2_WMS( I1toI1Mem , Ld_Int , (int) )
  82. DEF2_WMS( L1toL1Mem , Ld_Long , (int64) )
  83. DEF2_WMS( D1toD1Mem , Ld_Db , (double) )
  84. DEF2_WMS( F1toF1Mem , Ld_Flt , (float) )
  85. DEF2_WMS( D1toD1Mem , Return_Db , (double) )
  86. DEF2_WMS( F1toF1Mem , Return_Flt , (float) )
  87. DEF2_WMS( I1toI1Mem , Return_Int , (int) )
  88. DEF2_WMS( L1toL1Mem , Return_Long , (int64) )
  89. // Wasm Sign Extension operators
  90. DEF2_WMS( I1toI1Mem , I32Extend8_s , (Wasm::WasmMath::SignExtend<int32, int8> ) )
  91. DEF2_WMS( I1toI1Mem , I32Extend16_s, (Wasm::WasmMath::SignExtend<int32, int16>) )
  92. DEF2_WMS( L1toL1Mem , I64Extend8_s , (Wasm::WasmMath::SignExtend<int64, int8> ) )
  93. DEF2_WMS( L1toL1Mem , I64Extend16_s, (Wasm::WasmMath::SignExtend<int64, int16>) )
  94. DEF2_WMS( L1toL1Mem , I64Extend32_s, (Wasm::WasmMath::SignExtend<int64, int32>) )
  95. DEF2_WMS( I1toI1Mem , BeginSwitch_Int, (int) )
  96. DEF2 ( BR_ASM , EndSwitch_Int, OP_Br )
  97. DEF2_WMS( BR_ASM_Mem , Case_Int , AsmJsMath::CmpEq<int> )
  98. DEF2_WMS( BR_ASM_Const , Case_IntConst, AsmJsMath::CmpEq<int> )
  99. // Int32 Math
  100. DEF2_WMS( I1toI1Mem , Neg_Int , AsmJsMath::Neg<int> ) // int unary '-'
  101. DEF2_WMS( I1toI1Mem , Not_Int , AsmJsMath::Not ) // int unary '~'
  102. DEF2_WMS( I1toI1Mem , LogNot_Int , AsmJsMath::LogNot ) // int unary '!'
  103. DEF2_WMS( I1toI1Mem , Conv_ITB , AsmJsMath::ToBool ) // convert an int to a bool (0|1)
  104. DEF2_WMS( I2toI1Mem , Add_Int , AsmJsMath::Add<int> )
  105. DEF2_WMS( I2toI1Mem , Sub_Int , AsmJsMath::Sub<int> )
  106. DEF2_WMS( I2toI1Mem , Mul_Int , AsmJsMath::Mul<int> )
  107. DEF2_WMS( I2toI1Mem , Div_Int , AsmJsMath::DivChecked<int> )
  108. DEF2_WMS( I2toI1Mem , Rem_Int , AsmJsMath::RemChecked<int> )
  109. DEF2_WMS( I2toI1Ctx , Div_Trap_Int, (OP_DivOverflow<int, &AsmJsMath::DivUnsafe<int>>) )
  110. DEF2_WMS( I2toI1Ctx , Rem_Trap_Int, (OP_RemOverflow<int, &AsmJsMath::RemUnsafe<int>>) )
  111. DEF2_WMS( I2toI1Mem , And_Int , AsmJsMath::And )
  112. DEF2_WMS( I2toI1Mem , Or_Int , AsmJsMath::Or )
  113. DEF2_WMS( I2toI1Mem , Xor_Int , AsmJsMath::Xor )
  114. DEF2_WMS( I2toI1Mem , Shl_Int , AsmJsMath::Shl )
  115. DEF2_WMS( I2toI1Mem , Shr_Int , AsmJsMath::Shr )
  116. DEF2_WMS( I2toI1Mem , Shr_UInt , AsmJsMath::ShrU<uint> )
  117. DEF2_WMS( I2toI1Mem , Rol_Int , Wasm::WasmMath::Rol )
  118. DEF2_WMS( I2toI1Mem , Ror_Int , Wasm::WasmMath::Ror )
  119. DEF2_WMS( I1toI1Mem , PopCnt_Int , ::Math::PopCnt32 )
  120. DEF2_WMS( I1toI1Mem , Abs_Int , ::abs )
  121. DEF2_WMS( I2toI1Mem , Min_Int , min )
  122. DEF2_WMS( I2toI1Mem , Max_Int , max )
  123. DEF2_WMS( I1toI1Mem , Clz32_Int , AsmJsMath::Clz32 )
  124. DEF2_WMS( I1toI1Mem , Ctz_Int , Wasm::WasmMath::Ctz )
  125. // Unsigned Int32 Math
  126. DEF2_WMS( I2toI1Mem , Div_UInt , AsmJsMath::DivChecked<uint32> )
  127. DEF2_WMS( I2toI1Mem , Rem_UInt , AsmJsMath::RemChecked<uint32> )
  128. DEF2_WMS( I2toI1Ctx , Div_Trap_UInt, (OP_UnsignedDivRemCheck<uint32, &AsmJsMath::DivUnsafe<uint32>>) )
  129. DEF2_WMS( I2toI1Ctx , Rem_Trap_UInt, (OP_UnsignedDivRemCheck<uint32, &AsmJsMath::RemUnsafe<uint32>>) )
  130. // Int64 Math
  131. DEF2_WMS( L2toL1Mem , Add_Long , AsmJsMath::Add<int64>)
  132. DEF2_WMS( L2toL1Mem , Sub_Long , AsmJsMath::Sub<int64>)
  133. DEF2_WMS( L2toL1Mem , Mul_Long , AsmJsMath::Mul<int64>)
  134. DEF2_WMS( L2toL1Ctx , Div_Trap_Long, (OP_DivOverflow<int64, &AsmJsMath::DivUnsafe<int64>>) )
  135. DEF2_WMS( L2toL1Ctx , Rem_Trap_Long, (OP_RemOverflow<int64, &AsmJsMath::RemUnsafe<int64>>) )
  136. DEF2_WMS( L2toL1Mem , And_Long , AsmJsMath::And<int64>)
  137. DEF2_WMS( L2toL1Mem , Or_Long , AsmJsMath::Or<int64>)
  138. DEF2_WMS( L2toL1Mem , Xor_Long , AsmJsMath::Xor<int64>)
  139. DEF2_WMS( L2toL1Mem , Shl_Long , Wasm::WasmMath::Shl<int64>)
  140. DEF2_WMS( L2toL1Mem , Shr_Long , Wasm::WasmMath::Shr<int64>)
  141. DEF2_WMS( L2toL1Mem , Shr_ULong , Wasm::WasmMath::ShrU<uint64>)
  142. DEF2_WMS( L2toL1Mem , Rol_Long , Wasm::WasmMath::Rol<int64>)
  143. DEF2_WMS( L2toL1Mem , Ror_Long , Wasm::WasmMath::Ror<int64>)
  144. DEF2_WMS( L1toL1Mem , Clz_Long , Wasm::WasmMath::Clz<int64>)
  145. DEF2_WMS( L1toL1Mem , Ctz_Long , Wasm::WasmMath::Ctz<int64>)
  146. DEF2_WMS( L1toL1Mem , PopCnt_Long , Wasm::WasmMath::PopCnt<int64>)
  147. // Unsigned Int64 Math
  148. DEF2_WMS( L2toL1Ctx , Div_Trap_ULong, (OP_UnsignedDivRemCheck<uint64, &AsmJsMath::DivUnsafe<uint64>>) )
  149. DEF2_WMS( L2toL1Ctx , Rem_Trap_ULong, (OP_UnsignedDivRemCheck<uint64, &AsmJsMath::RemUnsafe<uint64>>) )
  150. // Double Math
  151. DEF2_WMS( D1toD1Mem , Neg_Db , AsmJsMath::Neg<double> )
  152. DEF2_WMS( D2toD1Mem , Add_Db , AsmJsMath::Add<double> )
  153. DEF2_WMS( D2toD1Mem , Sub_Db , AsmJsMath::Sub<double> )
  154. DEF2_WMS( D2toD1Mem , Mul_Db , AsmJsMath::Mul<double> )
  155. DEF2_WMS( D2toD1Mem , Div_Db , AsmJsMath::DivChecked<double> )
  156. DEF2_WMS( D2toD1Mem , Rem_Db , AsmJsMath::RemChecked<double> )
  157. // Float Math
  158. DEF2_WMS( F1toF1Mem , Neg_Flt , AsmJsMath::Neg<float> )
  159. DEF2_WMS( F2toF1Mem , Add_Flt , AsmJsMath::Add<float> )
  160. DEF2_WMS( F2toF1Mem , Sub_Flt , AsmJsMath::Sub<float> )
  161. DEF2_WMS( F2toF1Mem , Mul_Flt , AsmJsMath::Mul<float> )
  162. DEF2_WMS( F2toF1Mem , Div_Flt , AsmJsMath::DivChecked<float> )
  163. // Int32 comparisons
  164. DEF2_WMS( I2toI1Mem , CmLt_Int , AsmJsMath::CmpLt<int> )
  165. DEF2_WMS( I2toI1Mem , CmLe_Int , AsmJsMath::CmpLe<int> )
  166. DEF2_WMS( I2toI1Mem , CmGt_Int , AsmJsMath::CmpGt<int> )
  167. DEF2_WMS( I2toI1Mem , CmGe_Int , AsmJsMath::CmpGe<int> )
  168. DEF2_WMS( I2toI1Mem , CmEq_Int , AsmJsMath::CmpEq<int> )
  169. DEF2_WMS( I2toI1Mem , CmNe_Int , AsmJsMath::CmpNe<int> )
  170. DEF2_WMS( I1toI1Mem , Eqz_Int , Wasm::WasmMath::Eqz<int> )
  171. // Unsigned Int32 comparisons
  172. DEF2_WMS( I2toI1Mem , CmLt_UInt , AsmJsMath::CmpLt<unsigned int> )
  173. DEF2_WMS( I2toI1Mem , CmLe_UInt , AsmJsMath::CmpLe<unsigned int> )
  174. DEF2_WMS( I2toI1Mem , CmGt_UInt , AsmJsMath::CmpGt<unsigned int> )
  175. DEF2_WMS( I2toI1Mem , CmGe_UInt , AsmJsMath::CmpGe<unsigned int> )
  176. // Int64 comparisons
  177. DEF2_WMS( L2toI1Mem , CmEq_Long , AsmJsMath::CmpEq<int64>)
  178. DEF2_WMS( L2toI1Mem , CmNe_Long , AsmJsMath::CmpNe<int64>)
  179. DEF2_WMS( L2toI1Mem , CmLt_Long , AsmJsMath::CmpLt<int64>)
  180. DEF2_WMS( L2toI1Mem , CmLe_Long , AsmJsMath::CmpLe<int64>)
  181. DEF2_WMS( L2toI1Mem , CmGt_Long , AsmJsMath::CmpGt<int64>)
  182. DEF2_WMS( L2toI1Mem , CmGe_Long , AsmJsMath::CmpGe<int64>)
  183. DEF2_WMS( L1toI1Mem , Eqz_Long , Wasm::WasmMath::Eqz<int64>)
  184. // Unsigned Int64 comparisons
  185. DEF2_WMS( L2toI1Mem , CmLt_ULong , AsmJsMath::CmpLt<uint64>)
  186. DEF2_WMS( L2toI1Mem , CmLe_ULong , AsmJsMath::CmpLe<uint64>)
  187. DEF2_WMS( L2toI1Mem , CmGt_ULong , AsmJsMath::CmpGt<uint64>)
  188. DEF2_WMS( L2toI1Mem , CmGe_ULong , AsmJsMath::CmpGe<uint64>)
  189. // Double comparisons
  190. DEF2_WMS( D2toI1Mem , CmLt_Db , AsmJsMath::CmpLt<double> )
  191. DEF2_WMS( D2toI1Mem , CmLe_Db , AsmJsMath::CmpLe<double> )
  192. DEF2_WMS( D2toI1Mem , CmGt_Db , AsmJsMath::CmpGt<double> )
  193. DEF2_WMS( D2toI1Mem , CmGe_Db , AsmJsMath::CmpGe<double> )
  194. DEF2_WMS( D2toI1Mem , CmEq_Db , AsmJsMath::CmpEq<double> )
  195. DEF2_WMS( D2toI1Mem , CmNe_Db , AsmJsMath::CmpNe<double> )
  196. // Float comparisons
  197. DEF2_WMS( F2toI1Mem , CmLt_Flt , AsmJsMath::CmpLt<float> )
  198. DEF2_WMS( F2toI1Mem , CmLe_Flt , AsmJsMath::CmpLe<float> )
  199. DEF2_WMS( F2toI1Mem , CmGt_Flt , AsmJsMath::CmpGt<float> )
  200. DEF2_WMS( F2toI1Mem , CmGe_Flt , AsmJsMath::CmpGe<float> )
  201. DEF2_WMS( F2toI1Mem , CmEq_Flt , AsmJsMath::CmpEq<float> )
  202. DEF2_WMS( F2toI1Mem , CmNe_Flt , AsmJsMath::CmpNe<float> )
  203. // Standard Math lib
  204. DEF2_WMS( I2toI1Mem , Imul_Int , AsmJsMath::Mul<int> )
  205. DEF2_WMS( D1toD1Mem , Sin_Db , Math::Sin )
  206. DEF2_WMS( D1toD1Mem , Cos_Db , Math::Cos )
  207. DEF2_WMS( D1toD1Mem , Tan_Db , Math::Tan )
  208. DEF2_WMS( D1toD1Mem , Asin_Db , Math::Asin )
  209. DEF2_WMS( D1toD1Mem , Acos_Db , Math::Acos )
  210. DEF2_WMS( D1toD1Mem , Atan_Db , Math::Atan )
  211. DEF2_WMS( D1toD1Mem , Ceil_Db , ::ceil )
  212. DEF2_WMS( F1toF1Mem , Ceil_Flt , ::ceilf )
  213. DEF2_WMS( D1toD1Mem , Floor_Db , ::floor )
  214. DEF2_WMS( F1toF1Mem , Floor_Flt , ::floorf )
  215. DEF2_WMS( D1toD1Mem , Exp_Db , Math::Exp )
  216. DEF2_WMS( D1toD1Mem , Log_Db , Math::Log )
  217. DEF2_WMS( D2toD1Mem , Pow_Db , Math::Pow )
  218. DEF2_WMS( D1toD1Mem , Sqrt_Db , ::sqrt )
  219. DEF2_WMS( F1toF1Mem , Sqrt_Flt , ::sqrtf )
  220. DEF2_WMS( D1toD1Mem , Abs_Db , AsmJsMath::Abs<double> )
  221. DEF2_WMS( F1toF1Mem , Abs_Flt , AsmJsMath::Abs<float> )
  222. DEF2_WMS( D2toD1Mem , Atan2_Db , Math::Atan2 )
  223. DEF2_WMS( D2toD1Mem , Min_Db , AsmJsMath::Min<double> )
  224. DEF2_WMS( F2toF1Mem , Min_Flt , AsmJsMath::Min<float> )
  225. DEF2_WMS( D2toD1Mem , Max_Db , AsmJsMath::Max<double> )
  226. DEF2_WMS( F2toF1Mem , Max_Flt , AsmJsMath::Max<float> )
  227. DEF2_WMS( F1toF1Mem , Fround_Flt , (float) )
  228. DEF2_WMS( D1toF1Mem , Fround_Db , (float) )
  229. DEF2_WMS( I1toF1Mem , Fround_Int , (float) )
  230. EXDEF2_WMS( F2toF1Mem , Copysign_Flt , Wasm::WasmMath::Copysign<float> )
  231. EXDEF2_WMS( D2toD1Mem , Copysign_Db , Wasm::WasmMath::Copysign<double> )
  232. EXDEF2_WMS( F1toF1Mem , Trunc_Flt , Wasm::WasmMath::Trunc<float> )
  233. EXDEF2_WMS( F1toF1Mem , Nearest_Flt , Wasm::WasmMath::Nearest<float> )
  234. EXDEF2_WMS( D1toD1Mem , Trunc_Db , Wasm::WasmMath::Trunc<double> )
  235. EXDEF2_WMS( D1toD1Mem , Nearest_Db , Wasm::WasmMath::Nearest<double> )
  236. EXDEF2_WMS( VtoI1Mem , MemorySize_Int , OP_GetMemorySize )
  237. EXDEF2_WMS( I1toI1Mem , GrowMemory , OP_GrowMemory )
  238. EXDEF2 ( EMPTYASMJS , Unreachable_Void , OP_Unreachable )
  239. EXDEF2_WMS( D1toI1Ctx , Conv_Check_DTI , Wasm::WasmMath::F64ToI32<false /* saturating */> )
  240. EXDEF2_WMS( F1toI1Ctx , Conv_Check_FTI , Wasm::WasmMath::F32ToI32<false /* saturating */> )
  241. EXDEF2_WMS( D1toI1Ctx , Conv_Check_DTU , Wasm::WasmMath::F64ToU32<false /* saturating */> )
  242. EXDEF2_WMS( F1toI1Ctx , Conv_Check_FTU , Wasm::WasmMath::F32ToU32<false /* saturating */> )
  243. EXDEF2_WMS( F1toL1Ctx , Conv_Check_FTL , Wasm::WasmMath::F32ToI64<false /* saturating */> )
  244. EXDEF2_WMS( F1toL1Ctx , Conv_Check_FTUL , Wasm::WasmMath::F32ToU64<false /* saturating */> )
  245. EXDEF2_WMS( D1toL1Ctx , Conv_Check_DTL , Wasm::WasmMath::F64ToI64<false /* saturating */> )
  246. EXDEF2_WMS( D1toL1Ctx , Conv_Check_DTUL , Wasm::WasmMath::F64ToU64<false /* saturating */> )
  247. EXDEF2_WMS( D1toI1Ctx , Conv_Sat_DTI , Wasm::WasmMath::F64ToI32<true /* saturating */> )
  248. EXDEF2_WMS( F1toI1Ctx , Conv_Sat_FTI , Wasm::WasmMath::F32ToI32<true /* saturating */> )
  249. EXDEF2_WMS( D1toI1Ctx , Conv_Sat_DTU , Wasm::WasmMath::F64ToU32<true /* saturating */> )
  250. EXDEF2_WMS( F1toI1Ctx , Conv_Sat_FTU , Wasm::WasmMath::F32ToU32<true /* saturating */> )
  251. EXDEF2_WMS( F1toL1Ctx , Conv_Sat_FTL , Wasm::WasmMath::F32ToI64<true /* saturating */> )
  252. EXDEF2_WMS( F1toL1Ctx , Conv_Sat_FTUL , Wasm::WasmMath::F32ToU64<true /* saturating */> )
  253. EXDEF2_WMS( D1toL1Ctx , Conv_Sat_DTL , Wasm::WasmMath::F64ToI64<true /* saturating */> )
  254. EXDEF2_WMS( D1toL1Ctx , Conv_Sat_DTUL , Wasm::WasmMath::F64ToU64<true /* saturating */> )
  255. DEF2_WMS( IP_TARG_ASM , AsmJsLoopBodyStart, OP_ProfiledLoopBodyStart )
  256. DEF2_WMS( IP_TARG_ASM , WasmLoopBodyStart , OP_ProfiledWasmLoopBodyStart )
  257. #if ENABLE_DEBUG_CONFIG_OPTIONS
  258. EXDEF3_WMS( CUSTOM_ASMJS, PrintFuncName , OP_WasmPrintFunc , Int2)
  259. EXDEF2 ( EMPTYASMJS, PrintArgSeparator, WAsmJs::Tracing::PrintArgSeparator)
  260. EXDEF2 ( EMPTYASMJS, PrintBeginCall, WAsmJs::Tracing::PrintBeginCall)
  261. EXDEF2 ( EMPTYASMJS, PrintNewLine, WAsmJs::Tracing::PrintNewLine)
  262. EXDEF3_WMS( CUSTOM_ASMJS, PrintEndCall, WAsmJs::Tracing::PrintEndCall, Int2)
  263. EXDEF2_WMS( I1toI1Mem, PrintI32, WAsmJs::Tracing::PrintI32 )
  264. EXDEF2_WMS( L1toL1Mem, PrintI64, WAsmJs::Tracing::PrintI64 )
  265. EXDEF2_WMS( F1toF1Mem, PrintF32, WAsmJs::Tracing::PrintF32 )
  266. EXDEF2_WMS( D1toD1Mem, PrintF64, WAsmJs::Tracing::PrintF64 )
  267. #endif
  268. //unary ops
  269. #ifdef ENABLE_WASM_SIMD
  270. EXDEF2_WMS( SIMD_F4_1toF4_1 , Simd128_Ld_F4 , (AsmJsSIMDValue) )
  271. DEF2_WMS( SIMD_I4_1toI4_1 , Simd128_Ld_I4 , (AsmJsSIMDValue) )
  272. EXDEF2_WMS( SIMD_B4_1toB4_1 , Simd128_Ld_B4 , (AsmJsSIMDValue) )
  273. EXDEF2_WMS( SIMD_B8_1toB8_1 , Simd128_Ld_B8 , (AsmJsSIMDValue) )
  274. EXDEF2_WMS( SIMD_B16_1toB16_1, Simd128_Ld_B16 , (AsmJsSIMDValue) )
  275. EXDEF2_WMS( SIMD_F4toF4_1 , Simd128_FloatsToF4 , SIMDFloat32x4Operation::OpFloat32x4 )
  276. DEF2_WMS( SIMD_I4toI4_1 , Simd128_IntsToI4 , SIMDInt32x4Operation::OpInt32x4 )
  277. EXDEF4_WMS( TEMPLATE_ASMJS , Simd128_LdSlot_F4 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  278. DEF4_WMS( TEMPLATE_ASMJS , Simd128_LdSlot_I4 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  279. EXDEF4_WMS(TEMPLATE_ASMJS , Simd128_StSlot_F4 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  280. DEF4_WMS(TEMPLATE_ASMJS , Simd128_StSlot_I4 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  281. EXDEF2_WMS( SIMD_F4_1toF4_1 , Simd128_Return_F4 , (AsmJsSIMDValue) )
  282. DEF2_WMS( SIMD_I4_1toI4_1 , Simd128_Return_I4 , (AsmJsSIMDValue) )
  283. EXDEF2_WMS(SIMD_D1toD2_1 , Simd128_Splat_D2 , Js::SIMDFloat64x2Operation::OpSplat )
  284. EXDEF2_WMS( SIMD_F1toF4_1 , Simd128_Splat_F4 ,Js::SIMDFloat32x4Operation::OpSplat )
  285. EXDEF2_WMS( SIMD_L1toI2_1 , Simd128_Splat_I2 ,Js::SIMDInt64x2Operation::OpSplat )
  286. DEF2_WMS( SIMD_I1toI4_1 , Simd128_Splat_I4 ,Js::SIMDInt32x4Operation::OpSplat )
  287. //EXDEF2_WMS( SIMD_D2_1toF4_1 , Simd128_FromFloat64x2_F4 ,SIMDFloat32x4Operation::OpFromFloat64x2 )
  288. //EXDEF2_WMS( SIMD_D2_1toF4_1 , Simd128_FromFloat64x2Bits_F4,Js::FromSimdBits )
  289. EXDEF2_WMS( SIMD_I4_1toF4_1 , Simd128_FromInt32x4_F4 ,SIMDFloat32x4Operation::OpFromInt32x4 )
  290. EXDEF2_WMS( SIMD_I4_1toF4_1 , Simd128_FromInt32x4Bits_F4 ,Js::SIMDUtils::FromSimdBits )
  291. DEF3_WMS( CUSTOM_ASMJS , Simd128_FromFloat32x4_I4 , OP_SimdInt32x4FromFloat32x4 , Int32x4_1Float32x4_1 )
  292. //DEF2_WMS( SIMD_D2_1toI4_1 , Simd128_FromFloat64x2_I4 ,SIMDInt32x4Operation::OpFromFloat64x2 )
  293. //DEF2_WMS( SIMD_D2_1toI4_1 , Simd128_FromFloat64x2Bits_I4,Js::FromSimdBits )
  294. DEF2_WMS( SIMD_F4_1toI4_1 , Simd128_FromFloat32x4Bits_I4,Js::SIMDUtils::FromSimdBits )
  295. EXDEF2_WMS( SIMD_F4_1toF4_1 , Simd128_Abs_F4 ,SIMDFloat32x4Operation::OpAbs )
  296. EXDEF2_WMS( SIMD_I2_1toI2_1 , Simd128_Neg_I2 ,SIMDInt64x2Operation::OpNeg )
  297. EXDEF2_WMS( SIMD_F4_1toF4_1 , Simd128_Neg_F4 ,SIMDFloat32x4Operation::OpNeg )
  298. DEF2_WMS( SIMD_I4_1toI4_1 , Simd128_Neg_I4 ,SIMDInt32x4Operation::OpNeg )
  299. EXDEF2_WMS( SIMD_F4_1toF4_1 , Simd128_Rcp_F4 ,SIMDFloat32x4Operation::OpReciprocal )
  300. EXDEF2_WMS( SIMD_F4_1toF4_1 , Simd128_RcpSqrt_F4 ,SIMDFloat32x4Operation::OpReciprocalSqrt )
  301. EXDEF2_WMS( SIMD_F4_1toF4_1 , Simd128_Sqrt_F4 ,SIMDFloat32x4Operation::OpSqrt )
  302. DEF2_WMS( SIMD_I4_1toI4_1 , Simd128_Not_I4 , Js::SIMDInt32x4Operation::OpNot )
  303. EXDEF2_WMS( SIMD_B4_1toB4_1 , Simd128_Not_B4 , Js::SIMDInt32x4Operation::OpNot )
  304. EXDEF2_WMS( SIMD_B8_1toB8_1 , Simd128_Not_B8 , Js::SIMDInt32x4Operation::OpNot )
  305. EXDEF2_WMS( SIMD_B16_1toB16_1, Simd128_Not_B16 , Js::SIMDInt32x4Operation::OpNot )
  306. EXDEF2_WMS( SIMD_B2_1toI1, Simd128_AllTrue_B2 , Js::SIMDBool32x4Operation::OpAllTrue<int64> )
  307. EXDEF2_WMS( SIMD_B4_1toI1, Simd128_AllTrue_B4 , Js::SIMDBool32x4Operation::OpAllTrue<int32> )
  308. EXDEF2_WMS( SIMD_B8_1toI1, Simd128_AllTrue_B8 , Js::SIMDBool32x4Operation::OpAllTrue<int16> )
  309. EXDEF2_WMS( SIMD_B16_1toI1, Simd128_AllTrue_B16 , Js::SIMDBool32x4Operation::OpAllTrue<int8> )
  310. EXDEF2_WMS( SIMD_B2_1toI1, Simd128_AnyTrue_B2 , Js::SIMDBool32x4Operation::OpAnyTrue<int64> )
  311. EXDEF2_WMS( SIMD_B4_1toI1, Simd128_AnyTrue_B4 , Js::SIMDBool32x4Operation::OpAnyTrue<int32> )
  312. EXDEF2_WMS( SIMD_B8_1toI1, Simd128_AnyTrue_B8 , Js::SIMDBool32x4Operation::OpAnyTrue<int16> )
  313. EXDEF2_WMS( SIMD_B16_1toI1, Simd128_AnyTrue_B16 , Js::SIMDBool32x4Operation::OpAnyTrue<int8> )
  314. DEF2_WMS(SIMD_I4_1I1toI4_1 , Simd128_ShLtByScalar_I4 , Js::SIMDInt32x4Operation::OpShiftLeftByScalar)
  315. EXDEF2_WMS(SIMD_I2_1I1toI2_1 , Simd128_ShLtByScalar_I2 , Js::SIMDInt64x2Operation::OpShiftLeftByScalar)
  316. DEF2_WMS(SIMD_I4_1I1toI4_1 , Simd128_ShRtByScalar_I4 , Js::SIMDInt32x4Operation::OpShiftRightByScalar)
  317. EXDEF2_WMS(SIMD_I2_1I1toI2_1 , Simd128_ShRtByScalar_I2 , Js::SIMDInt64x2Operation::OpShiftRightByScalar)
  318. // ternary ops
  319. EXDEF2_WMS( SIMD_I4_3toI4_1 , Simd128_BitSelect_I4 , SIMDUtils::SIMD128BitSelect)
  320. // binary ops
  321. EXDEF2_WMS( SIMD_I2_2toI2_1 , Simd128_Add_I2 , Js::SIMDInt64x2Operation::OpAdd )
  322. EXDEF2_WMS( SIMD_F4_2toF4_1 , Simd128_Add_F4 , Js::SIMDFloat32x4Operation::OpAdd )
  323. DEF2_WMS( SIMD_I4_2toI4_1 , Simd128_Add_I4 , Js::SIMDInt32x4Operation::OpAdd )
  324. EXDEF2_WMS( SIMD_I2_2toI2_1 , Simd128_Sub_I2 , Js::SIMDInt64x2Operation::OpSub )
  325. EXDEF2_WMS( SIMD_F4_2toF4_1 , Simd128_Sub_F4 , Js::SIMDFloat32x4Operation::OpSub )
  326. DEF2_WMS( SIMD_I4_2toI4_1 , Simd128_Sub_I4 , Js::SIMDInt32x4Operation::OpSub )
  327. EXDEF2_WMS( SIMD_F4_2toF4_1 , Simd128_Mul_F4 , Js::SIMDFloat32x4Operation::OpMul )
  328. DEF2_WMS( SIMD_I4_2toI4_1 , Simd128_Mul_I4 , Js::SIMDInt32x4Operation::OpMul )
  329. EXDEF2_WMS( SIMD_F4_2toF4_1 , Simd128_Div_F4 , Js::SIMDFloat32x4Operation::OpDiv )
  330. EXDEF2_WMS( SIMD_F4_2toF4_1 , Simd128_Min_F4 , Js::SIMDFloat32x4Operation::OpMin )
  331. EXDEF2_WMS( SIMD_F4_2toF4_1 , Simd128_Max_F4 , Js::SIMDFloat32x4Operation::OpMax )
  332. EXDEF2_WMS( SIMD_F4_2toB4_1 , Simd128_Lt_F4 , Js::SIMDFloat32x4Operation::OpLessThan )
  333. DEF2_WMS( SIMD_I4_2toB4_1 , Simd128_Lt_I4 , Js::SIMDInt32x4Operation::OpLessThan )
  334. EXDEF2_WMS( SIMD_F4_2toB4_1 , Simd128_LtEq_F4 , Js::SIMDFloat32x4Operation::OpLessThanOrEqual)
  335. EXDEF2_WMS( SIMD_F4_2toB4_1 , Simd128_Eq_F4 , Js::SIMDFloat32x4Operation::OpEqual )
  336. DEF2_WMS( SIMD_I4_2toB4_1 , Simd128_Eq_I4 , Js::SIMDInt32x4Operation::OpEqual )
  337. EXDEF2_WMS( SIMD_F4_2toB4_1 , Simd128_Neq_F4 , Js::SIMDFloat32x4Operation::OpNotEqual )
  338. EXDEF2_WMS( SIMD_F4_2toB4_1 , Simd128_GtEq_F4 , Js::SIMDFloat32x4Operation::OpGreaterThanOrEqual)
  339. EXDEF2_WMS( SIMD_F4_2toB4_1 , Simd128_Gt_F4 , Js::SIMDFloat32x4Operation::OpGreaterThan )
  340. DEF2_WMS( SIMD_I4_2toB4_1 , Simd128_Gt_I4 , Js::SIMDInt32x4Operation::OpGreaterThan )
  341. DEF2_WMS( SIMD_I4_2toI4_1 , Simd128_And_I4 , Js::SIMDInt32x4Operation::OpAnd )
  342. EXDEF2_WMS( SIMD_B4_2toB4_1, Simd128_And_B4 , Js::SIMDInt32x4Operation::OpAnd )
  343. EXDEF2_WMS( SIMD_B8_2toB8_1, Simd128_And_B8 , Js::SIMDInt32x4Operation::OpAnd )
  344. EXDEF2_WMS( SIMD_B16_2toB16_1, Simd128_And_B16 , Js::SIMDInt32x4Operation::OpAnd )
  345. DEF2_WMS( SIMD_I4_2toI4_1 , Simd128_Or_I4 , Js::SIMDInt32x4Operation::OpOr )
  346. EXDEF2_WMS( SIMD_B4_2toB4_1 , Simd128_Or_B4 , Js::SIMDInt32x4Operation::OpOr )
  347. EXDEF2_WMS( SIMD_B8_2toB8_1 , Simd128_Or_B8 , Js::SIMDInt32x4Operation::OpOr )
  348. EXDEF2_WMS( SIMD_B16_2toB16_1 , Simd128_Or_B16 , Js::SIMDInt32x4Operation::OpOr )
  349. DEF2_WMS( SIMD_I4_2toI4_1 , Simd128_Xor_I4 , Js::SIMDInt32x4Operation::OpXor )
  350. EXDEF2_WMS( SIMD_B4_2toB4_1, Simd128_Xor_B4 , Js::SIMDInt32x4Operation::OpXor )
  351. EXDEF2_WMS( SIMD_B8_2toB8_1, Simd128_Xor_B8 , Js::SIMDInt32x4Operation::OpXor )
  352. EXDEF2_WMS( SIMD_B16_2toB16_1, Simd128_Xor_B16 , Js::SIMDInt32x4Operation::OpXor )
  353. // ternary ops
  354. EXDEF2_WMS( SIMD_F4_3toF4_1 , Simd128_Clamp_F4 , Js::SIMDFloat32x4Operation::OpClamp )
  355. EXDEF2_WMS( SIMD_B4_1F4_2toF4_1 , Simd128_Select_F4 , Js::SIMDFloat32x4Operation::OpSelect )
  356. DEF2_WMS( SIMD_B4_1I4_2toI4_1 , Simd128_Select_I4 , Js::SIMDInt32x4Operation::OpSelect )
  357. EXDEF2_WMS( SIMD_B8_1I8_2toI8_1 , Simd128_Select_I8 , Js::SIMDInt32x4Operation::OpSelect )
  358. EXDEF2_WMS( SIMD_B16_1I16_2toI16_1 , Simd128_Select_I16 , Js::SIMDInt32x4Operation::OpSelect )
  359. EXDEF2_WMS( SIMD_B4_1U4_2toU4_1 , Simd128_Select_U4 , Js::SIMDInt32x4Operation::OpSelect )
  360. EXDEF2_WMS( SIMD_B8_1U8_2toU8_1 , Simd128_Select_U8 , Js::SIMDInt32x4Operation::OpSelect )
  361. EXDEF2_WMS( SIMD_B16_1U16_2toU16_1 , Simd128_Select_U16 , Js::SIMDInt32x4Operation::OpSelect )
  362. // args out, copy value to outParams
  363. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_ArgOut_F4 , (OP_InvalidWasmTypeConversion<Wasm::WasmTypes::M128,true>) , Reg1Float32x4_1)
  364. EXDEF2_WMS ( SIMD_F4_1toR1Mem , Simd128_I_ArgOut_F4 , OP_I_SetOutAsmSimd )
  365. DEF2_WMS ( SIMD_I4_1toR1Mem , Simd128_I_ArgOut_I4 , OP_I_SetOutAsmSimd )
  366. EXDEF2_WMS ( SIMD_F4_1I4toF4_1 , Simd128_Swizzle_F4 , SIMDUtils::SIMD128InnerShuffle )
  367. EXDEF2_WMS ( SIMD_F4_2I4toF4_1 , Simd128_Shuffle_F4 , SIMDUtils::SIMD128InnerShuffle )
  368. DEF2_WMS ( SIMD_I4_1I4toI4_1 , Simd128_Swizzle_I4 , SIMDUtils::SIMD128InnerShuffle )
  369. DEF2_WMS ( SIMD_I4_2I4toI4_1 , Simd128_Shuffle_I4 , SIMDUtils::SIMD128InnerShuffle )
  370. DEF2_WMS ( SIMD_I8_1toI8_1 , Simd128_Ld_I8 , (AsmJsSIMDValue) )
  371. DEF2_WMS ( SIMD_U4_1toU4_1 , Simd128_Ld_U4 , (AsmJsSIMDValue) )
  372. DEF2_WMS ( SIMD_U8_1toU8_1 , Simd128_Ld_U8 , (AsmJsSIMDValue) )
  373. DEF2_WMS ( SIMD_U16_1toU16_1 , Simd128_Ld_U16 , (AsmJsSIMDValue) )
  374. DEF4_WMS ( TEMPLATE_ASMJS , Simd128_LdSlot_I8 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  375. DEF4_WMS ( TEMPLATE_ASMJS , Simd128_LdSlot_I16 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  376. // Extended opcodes
  377. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_LdSlot_U4 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  378. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_LdSlot_U8 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  379. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_LdSlot_U16 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  380. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_LdSlot_B4 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  381. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_LdSlot_B8 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  382. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_LdSlot_B16 , OP_LdSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  383. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_StSlot_I8 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  384. EXDEF4_WMS(TEMPLATE_ASMJS , Simd128_StSlot_I16 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  385. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_StSlot_U4 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  386. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_StSlot_U8 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  387. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_StSlot_U16 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  388. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_StSlot_B4 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  389. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_StSlot_B8 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  390. EXDEF4_WMS ( TEMPLATE_ASMJS , Simd128_StSlot_B16 , OP_StSlotPrimitive , ElementSlot, AsmJsSIMDValue)
  391. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_IntsToB4 , OP_SimdBool32x4 , Bool32x4_1Int4)
  392. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_IntsToB8 , OP_SimdBool16x8 , Bool16x8_1Int8)
  393. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_IntsToB16 , OP_SimdBool8x16 , Bool8x16_1Int16)
  394. EXDEF2_WMS ( SIMD_I1toB4_1 , Simd128_Splat_B4 , Js::SIMDInt32x4Operation::OpSplat )
  395. EXDEF2_WMS ( SIMD_I1toB8_1 , Simd128_Splat_B8 , Js::SIMDInt32x4Operation::OpSplat )
  396. EXDEF2_WMS ( SIMD_I1toB16_1 , Simd128_Splat_B16 , Js::SIMDInt32x4Operation::OpSplat )
  397. EXDEF2_WMS ( SIMD_I16_1toI16_1 , Simd128_Ld_I16 , (AsmJsSIMDValue) )
  398. EXDEF2_WMS ( SIMD_I1toI16_1 , Simd128_Splat_I16 , Js::SIMDInt8x16Operation::OpSplat )
  399. EXDEF2_WMS ( SIMD_I16_2toI16_1 , Simd128_Add_I16 , Js::SIMDInt8x16Operation::OpAdd )
  400. EXDEF2_WMS ( SIMD_I16_2toI16_1 , Simd128_Sub_I16 , Js::SIMDInt8x16Operation::OpSub )
  401. EXDEF2_WMS ( SIMD_I16_2toI16_1 , Simd128_Mul_I16 , Js::SIMDInt8x16Operation::OpMul )
  402. EXDEF2_WMS ( SIMD_I16_1toI16_1 , Simd128_Neg_I16 , SIMDInt8x16Operation::OpNeg )
  403. EXDEF2_WMS ( SIMD_I16_1toI16_1 , Simd128_Not_I16 , Js::SIMDInt32x4Operation::OpNot )
  404. EXDEF2_WMS ( SIMD_I16_2toB16_1 , Simd128_Lt_I16 , Js::SIMDInt8x16Operation::OpLessThan )
  405. EXDEF2_WMS ( SIMD_I16_2toB16_1 , Simd128_Eq_I16 , Js::SIMDInt8x16Operation::OpEqual )
  406. EXDEF2_WMS ( SIMD_I16_2toB16_1 , Simd128_Gt_I16 , Js::SIMDInt8x16Operation::OpGreaterThan )
  407. EXDEF2_WMS ( SIMD_I16_2toI16_1 , Simd128_And_I16 , Js::SIMDInt32x4Operation::OpAnd )
  408. EXDEF2_WMS ( SIMD_I16_2toI16_1 , Simd128_Or_I16 , Js::SIMDInt32x4Operation::OpOr )
  409. EXDEF2_WMS ( SIMD_I16_2toI16_1 , Simd128_Xor_I16 , Js::SIMDInt32x4Operation::OpXor )
  410. EXDEF2_WMS ( SIMD_I16_1toI16_1 , Simd128_Return_I16 , (AsmJsSIMDValue) )
  411. EXDEF2_WMS ( SIMD_I16_1toR1Mem , Simd128_I_ArgOut_I16 , OP_I_SetOutAsmSimd )
  412. //Lane Access
  413. EXDEF2_WMS ( SIMD_I16_1I1toI1 , Simd128_ExtractLane_I16 , SIMDUtils::SIMD128InnerExtractLaneI16 )
  414. EXDEF2_WMS ( SIMD_I16_1I2toI16_1 , Simd128_ReplaceLane_I16 , SIMDUtils::SIMD128InnerReplaceLaneI16 )
  415. EXDEF2_WMS ( SIMD_I4_1I1toI1 , Simd128_ExtractLane_I4 , SIMDUtils::SIMD128InnerExtractLaneI4 )
  416. EXDEF2_WMS ( SIMD_I2_1I1toL1 , Simd128_ExtractLane_I2 , SIMDUtils::SIMD128InnerExtractLaneI2 )
  417. EXDEF2_WMS ( SIMD_D2_1I1toD1 , Simd128_ExtractLane_D2 , SIMDUtils::SIMD128InnerExtractLaneD2 )
  418. EXDEF2_WMS ( SIMD_D2_1I1D1toD2_1 , Simd128_ReplaceLane_D2 , SIMDUtils::SIMD128InnerReplaceLaneD2 )
  419. EXDEF2_WMS ( SIMD_F4_1I1toF1 , Simd128_ExtractLane_F4 , SIMDUtils::SIMD128InnerExtractLaneF4 )
  420. EXDEF2_WMS ( SIMD_I8_1I1toI1 , Simd128_ExtractLane_I8 , SIMDUtils::SIMD128InnerExtractLaneI8 )
  421. EXDEF2_WMS ( SIMD_U4_1I1toI1 , Simd128_ExtractLane_U4 , SIMDUtils::SIMD128InnerExtractLaneI4 )
  422. EXDEF2_WMS ( SIMD_U8_1I1toI1 , Simd128_ExtractLane_U8 , SIMDUtils::SIMD128InnerExtractLaneI8 )
  423. EXDEF2_WMS ( SIMD_U16_1I1toI1 , Simd128_ExtractLane_U16 , SIMDUtils::SIMD128InnerExtractLaneI16 )
  424. EXDEF2_WMS ( SIMD_B4_1I1toI1 , Simd128_ExtractLane_B4 , SIMDUtils::SIMD128InnerExtractLaneB4 )
  425. EXDEF2_WMS ( SIMD_B8_1I1toI1 , Simd128_ExtractLane_B8 , SIMDUtils::SIMD128InnerExtractLaneB8 )
  426. EXDEF2_WMS ( SIMD_B16_1I1toI1 , Simd128_ExtractLane_B16 , SIMDUtils::SIMD128InnerExtractLaneB16 )
  427. EXDEF2_WMS ( SIMD_I2_1I1L1toI2_1 , Simd128_ReplaceLane_I2 , SIMDUtils::SIMD128InnerReplaceLaneI2 )
  428. EXDEF2_WMS ( SIMD_I4_1I2toI4_1 , Simd128_ReplaceLane_I4 , SIMDUtils::SIMD128InnerReplaceLaneI4 )
  429. EXDEF2_WMS ( SIMD_F4_1I1F1toF4_1 , Simd128_ReplaceLane_F4 , SIMDUtils::SIMD128InnerReplaceLaneF4 )
  430. EXDEF2_WMS ( SIMD_I8_1I2toI8_1 , Simd128_ReplaceLane_I8 , SIMDUtils::SIMD128InnerReplaceLaneI8 )
  431. EXDEF2_WMS ( SIMD_U4_1I2toU4_1 , Simd128_ReplaceLane_U4 , SIMDUtils::SIMD128InnerReplaceLaneI4 )
  432. EXDEF2_WMS ( SIMD_U8_1I2toU8_1 , Simd128_ReplaceLane_U8 , SIMDUtils::SIMD128InnerReplaceLaneI8 )
  433. EXDEF2_WMS ( SIMD_U16_1I2toU16_1 , Simd128_ReplaceLane_U16, SIMDUtils::SIMD128InnerReplaceLaneI16 )
  434. EXDEF2_WMS ( SIMD_B4_1I2toB4_1 , Simd128_ReplaceLane_B4 , SIMDUtils::SIMD128InnerReplaceLaneI4 )
  435. EXDEF2_WMS ( SIMD_B8_1I2toB8_1 , Simd128_ReplaceLane_B8 , SIMDUtils::SIMD128InnerReplaceLaneI8 )
  436. EXDEF2_WMS ( SIMD_B16_1I2toB16_1 , Simd128_ReplaceLane_B16, SIMDUtils::SIMD128InnerReplaceLaneI16 )
  437. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_LdArr_F4 , OP_SimdLdArrGeneric , AsmSimdTypedArr )
  438. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_LdArr_I4 , OP_SimdLdArrGeneric , AsmSimdTypedArr )
  439. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_StArr_F4 , OP_SimdStArrGeneric , AsmSimdTypedArr )
  440. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_StArr_I4 , OP_SimdStArrGeneric , AsmSimdTypedArr )
  441. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_LdArrConst_F4 , OP_SimdLdArrConstIndex , AsmSimdTypedArr )
  442. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_LdArrConst_I4 , OP_SimdLdArrConstIndex , AsmSimdTypedArr )
  443. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_StArrConst_F4 , OP_SimdStArrConstIndex , AsmSimdTypedArr )
  444. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_StArrConst_I4 , OP_SimdStArrConstIndex , AsmSimdTypedArr )
  445. EXDEF2_WMS ( SIMD_U4_1toF4_1 , Simd128_FromUint32x4_F4 , Js::SIMDFloat32x4Operation::OpFromUint32x4 )
  446. EXDEF2_WMS ( SIMD_I8_1toF4_1 , Simd128_FromInt16x8Bits_F4 , Js::SIMDUtils::FromSimdBits )
  447. EXDEF2_WMS ( SIMD_I16_1toF4_1 , Simd128_FromInt8x16Bits_F4 , Js::SIMDUtils::FromSimdBits )
  448. EXDEF2_WMS ( SIMD_U4_1toF4_1 , Simd128_FromUint32x4Bits_F4 , Js::SIMDUtils::FromSimdBits )
  449. EXDEF2_WMS ( SIMD_U8_1toF4_1 , Simd128_FromUint16x8Bits_F4 , Js::SIMDUtils::FromSimdBits )
  450. EXDEF2_WMS ( SIMD_U16_1toF4_1 , Simd128_FromUint8x16Bits_F4 , Js::SIMDUtils::FromSimdBits )
  451. EXDEF2_WMS ( SIMD_I8_1toI4_1 , Simd128_FromInt16x8Bits_I4 , Js::SIMDUtils::FromSimdBits )
  452. EXDEF2_WMS ( SIMD_I16_1toI4_1 , Simd128_FromInt8x16Bits_I4 , Js::SIMDUtils::FromSimdBits )
  453. EXDEF2_WMS ( SIMD_U4_1toI4_1 , Simd128_FromUint32x4Bits_I4 , Js::SIMDUtils::FromSimdBits )
  454. EXDEF2_WMS ( SIMD_U8_1toI4_1 , Simd128_FromUint16x8Bits_I4 , Js::SIMDUtils::FromSimdBits )
  455. EXDEF2_WMS ( SIMD_U16_1toI4_1 , Simd128_FromUint8x16Bits_I4 , Js::SIMDUtils::FromSimdBits )
  456. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_IntsToI8 , OP_SimdInt16x8 , Int16x8_1Int8 )
  457. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_IntsToI16 , OP_SimdInt8x16 , Int8x16_1Int16)
  458. EXDEF2_WMS ( SIMD_I4toU4_1 , Simd128_IntsToU4 , SIMDUint32x4Operation::OpUint32x4 )
  459. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_IntsToU8 , OP_SimdUint16x8 , Uint16x8_1Int8)
  460. EXDEF3_WMS ( CUSTOM_ASMJS , Simd128_IntsToU16 , OP_SimdUint8x16 , Uint8x16_1Int16)
  461. EXDEF2_WMS ( SIMD_I8_1toR1Mem , Simd128_I_ArgOut_I8 , OP_I_SetOutAsmSimd )
  462. EXDEF2_WMS ( SIMD_U4_1toR1Mem , Simd128_I_ArgOut_U4 , OP_I_SetOutAsmSimd )
  463. EXDEF2_WMS ( SIMD_U8_1toR1Mem , Simd128_I_ArgOut_U8 , OP_I_SetOutAsmSimd )
  464. EXDEF2_WMS ( SIMD_U16_1toR1Mem , Simd128_I_ArgOut_U16 , OP_I_SetOutAsmSimd )
  465. EXDEF2_WMS ( SIMD_B4_1toR1Mem , Simd128_I_ArgOut_B4 , OP_I_SetOutAsmSimd )
  466. EXDEF2_WMS ( SIMD_B8_1toR1Mem , Simd128_I_ArgOut_B8 , OP_I_SetOutAsmSimd )
  467. EXDEF2_WMS ( SIMD_B16_1toR1Mem , Simd128_I_ArgOut_B16 , OP_I_SetOutAsmSimd )
  468. EXDEF2_WMS ( SIMD_I8_1toI8_1 , Simd128_Return_I8 , (AsmJsSIMDValue) )
  469. EXDEF2_WMS ( SIMD_U4_1toU4_1 , Simd128_Return_U4 , (AsmJsSIMDValue) )
  470. EXDEF2_WMS ( SIMD_U8_1toU8_1 , Simd128_Return_U8 , (AsmJsSIMDValue) )
  471. EXDEF2_WMS ( SIMD_U16_1toU16_1 , Simd128_Return_U16 , (AsmJsSIMDValue) )
  472. EXDEF2_WMS ( SIMD_B4_1toB4_1 , Simd128_Return_B4 , (AsmJsSIMDValue) )
  473. EXDEF2_WMS ( SIMD_B8_1toB8_1 , Simd128_Return_B8 , (AsmJsSIMDValue) )
  474. EXDEF2_WMS ( SIMD_B16_1toB16_1 , Simd128_Return_B16 , (AsmJsSIMDValue) )
  475. EXDEF2_WMS ( SIMD_I8_1I8toI8_1 , Simd128_Swizzle_I8 , SIMDUtils::SIMD128InnerShuffle )
  476. EXDEF2_WMS ( SIMD_I8_2I8toI8_1 , Simd128_Shuffle_I8 , SIMDUtils::SIMD128InnerShuffle )
  477. EXDEF2_WMS ( SIMD_I16_1I16toI16_1 , Simd128_Swizzle_I16 , SIMDUtils::SIMD128InnerShuffle )
  478. EXDEF2_WMS ( SIMD_I16_2I16toI16_1 , Simd128_Shuffle_I16 , SIMDUtils::SIMD128InnerShuffle )
  479. EXDEF2_WMS ( SIMD_U4_1I4toU4_1 , Simd128_Swizzle_U4 , SIMDUtils::SIMD128InnerShuffle )
  480. EXDEF2_WMS ( SIMD_U4_2I4toU4_1 , Simd128_Shuffle_U4 , SIMDUtils::SIMD128InnerShuffle )
  481. EXDEF2_WMS ( SIMD_U8_1I8toU8_1 , Simd128_Swizzle_U8 , SIMDUtils::SIMD128InnerShuffle )
  482. EXDEF2_WMS ( SIMD_U8_2I8toU8_1 , Simd128_Shuffle_U8 , SIMDUtils::SIMD128InnerShuffle )
  483. EXDEF2_WMS ( SIMD_U16_1I16toU16_1 , Simd128_Swizzle_U16 , SIMDUtils::SIMD128InnerShuffle )
  484. EXDEF2_WMS ( SIMD_U16_2I16toU16_1 , Simd128_Shuffle_U16 , SIMDUtils::SIMD128InnerShuffle )
  485. EXDEF2_WMS( SIMD_I1toI8_1 , Simd128_Splat_I8 ,Js::SIMDInt16x8Operation::OpSplat )
  486. EXDEF2_WMS( SIMD_I1toU4_1 , Simd128_Splat_U4 ,Js::SIMDUint32x4Operation::OpSplat )
  487. EXDEF2_WMS( SIMD_I1toU8_1 , Simd128_Splat_U8 ,Js::SIMDInt16x8Operation::OpSplat )
  488. EXDEF2_WMS( SIMD_I1toU16_1 , Simd128_Splat_U16 ,Js::SIMDInt8x16Operation::OpSplat )
  489. EXDEF2_WMS( SIMD_I8_2toI8_1 , Simd128_And_I8 , Js::SIMDInt16x8Operation::OpAnd )
  490. EXDEF2_WMS( SIMD_U4_2toU4_1 , Simd128_And_U4 , Js::SIMDInt32x4Operation::OpAnd )
  491. EXDEF2_WMS( SIMD_U8_2toU8_1 , Simd128_And_U8 , Js::SIMDInt32x4Operation::OpAnd )
  492. EXDEF2_WMS( SIMD_U16_2toU16_1 , Simd128_And_U16 , Js::SIMDInt32x4Operation::OpAnd )
  493. EXDEF2_WMS( SIMD_I8_2toI8_1 , Simd128_Or_I8 , Js::SIMDInt16x8Operation::OpOr )
  494. EXDEF2_WMS( SIMD_U4_2toU4_1 , Simd128_Or_U4 , Js::SIMDInt32x4Operation::OpOr )
  495. EXDEF2_WMS( SIMD_U8_2toU8_1 , Simd128_Or_U8 , Js::SIMDInt32x4Operation::OpOr )
  496. EXDEF2_WMS( SIMD_U16_2toU16_1 , Simd128_Or_U16 , Js::SIMDInt32x4Operation::OpOr )
  497. EXDEF2_WMS( SIMD_I8_2toI8_1 , Simd128_Xor_I8 , Js::SIMDInt16x8Operation::OpXor )
  498. EXDEF2_WMS( SIMD_U4_2toU4_1 , Simd128_Xor_U4 , Js::SIMDInt32x4Operation::OpXor )
  499. EXDEF2_WMS( SIMD_U8_2toU8_1 , Simd128_Xor_U8 , Js::SIMDInt32x4Operation::OpXor )
  500. EXDEF2_WMS( SIMD_U16_2toU16_1 , Simd128_Xor_U16 , Js::SIMDInt32x4Operation::OpXor )
  501. EXDEF2_WMS( SIMD_I8_1toI8_1 , Simd128_Not_I8 , Js::SIMDInt16x8Operation::OpNot )
  502. EXDEF2_WMS( SIMD_U4_1toU4_1 , Simd128_Not_U4 , Js::SIMDInt32x4Operation::OpNot )
  503. EXDEF2_WMS( SIMD_U8_1toU8_1 , Simd128_Not_U8 , Js::SIMDInt32x4Operation::OpNot )
  504. EXDEF2_WMS( SIMD_U16_1toU16_1 , Simd128_Not_U16 , Js::SIMDInt32x4Operation::OpNot )
  505. EXDEF2_WMS( SIMD_I8_2toI8_1 , Simd128_Add_I8 , Js::SIMDInt16x8Operation::OpAdd )
  506. EXDEF2_WMS( SIMD_U4_2toU4_1 , Simd128_Add_U4 , Js::SIMDInt32x4Operation::OpAdd )
  507. EXDEF2_WMS( SIMD_U8_2toU8_1 , Simd128_Add_U8 , Js::SIMDInt16x8Operation::OpAdd )
  508. EXDEF2_WMS( SIMD_U16_2toU16_1 , Simd128_Add_U16 , Js::SIMDInt8x16Operation::OpAdd )
  509. EXDEF2_WMS( SIMD_I8_2toI8_1 , Simd128_Sub_I8 , Js::SIMDInt16x8Operation::OpSub )
  510. EXDEF2_WMS( SIMD_U4_2toU4_1 , Simd128_Sub_U4 , Js::SIMDInt32x4Operation::OpSub )
  511. EXDEF2_WMS( SIMD_U8_2toU8_1 , Simd128_Sub_U8 , Js::SIMDInt16x8Operation::OpSub )
  512. EXDEF2_WMS( SIMD_U16_2toU16_1 , Simd128_Sub_U16 , Js::SIMDInt8x16Operation::OpSub )
  513. EXDEF2_WMS( SIMD_I8_1toI8_1 , Simd128_Neg_I8 , SIMDInt16x8Operation::OpNeg )
  514. EXDEF2_WMS( SIMD_I8_2toI8_1 , Simd128_Mul_I8 , Js::SIMDInt16x8Operation::OpMul )
  515. EXDEF2_WMS( SIMD_U4_2toU4_1 , Simd128_Mul_U4 , Js::SIMDInt32x4Operation::OpMul )
  516. EXDEF2_WMS( SIMD_U8_2toU8_1 , Simd128_Mul_U8 , Js::SIMDInt16x8Operation::OpMul )
  517. EXDEF2_WMS( SIMD_U16_2toU16_1 , Simd128_Mul_U16 , Js::SIMDInt8x16Operation::OpMul )
  518. EXDEF2_WMS(SIMD_I8_1I1toI8_1 , Simd128_ShLtByScalar_I8 , Js::SIMDInt16x8Operation::OpShiftLeftByScalar )
  519. EXDEF2_WMS(SIMD_I8_1I1toI8_1 , Simd128_ShRtByScalar_I8 , Js::SIMDInt16x8Operation::OpShiftRightByScalar )
  520. EXDEF2_WMS(SIMD_I16_1I1toI16_1 , Simd128_ShLtByScalar_I16 , Js::SIMDInt8x16Operation::OpShiftLeftByScalar )
  521. EXDEF2_WMS(SIMD_I16_1I1toI16_1 , Simd128_ShRtByScalar_I16 , Js::SIMDInt8x16Operation::OpShiftRightByScalar )
  522. EXDEF2_WMS(SIMD_U4_1I1toU4_1 , Simd128_ShLtByScalar_U4 , Js::SIMDInt32x4Operation::OpShiftLeftByScalar )
  523. EXDEF2_WMS(SIMD_U4_1I1toU4_1 , Simd128_ShRtByScalar_U4 , Js::SIMDUint32x4Operation::OpShiftRightByScalar )
  524. EXDEF2_WMS(SIMD_I2_1I1toI2_1 , Simd128_ShRtByScalar_U2 , Js::SIMDInt64x2Operation::OpShiftRightByScalarU)
  525. EXDEF2_WMS(SIMD_U8_1I1toU8_1 , Simd128_ShLtByScalar_U8 , Js::SIMDInt16x8Operation::OpShiftLeftByScalar )
  526. EXDEF2_WMS(SIMD_U8_1I1toU8_1 , Simd128_ShRtByScalar_U8 , Js::SIMDUint16x8Operation::OpShiftRightByScalar )
  527. EXDEF2_WMS(SIMD_U16_1I1toU16_1 , Simd128_ShLtByScalar_U16 , Js::SIMDInt8x16Operation::OpShiftLeftByScalar )
  528. EXDEF2_WMS(SIMD_U16_1I1toU16_1 , Simd128_ShRtByScalar_U16 , Js::SIMDUint8x16Operation::OpShiftRightByScalar )
  529. EXDEF2_WMS( SIMD_I8_2toI8_1 , Simd128_AddSaturate_I8 , Js::SIMDInt16x8Operation::OpAddSaturate )
  530. EXDEF2_WMS( SIMD_I8_2toI8_1 , Simd128_SubSaturate_I8 , Js::SIMDInt16x8Operation::OpSubSaturate )
  531. EXDEF2_WMS( SIMD_I16_2toI16_1 , Simd128_AddSaturate_I16 , Js::SIMDInt8x16Operation::OpAddSaturate )
  532. EXDEF2_WMS( SIMD_I16_2toI16_1 , Simd128_SubSaturate_I16 , Js::SIMDInt8x16Operation::OpSubSaturate )
  533. EXDEF2_WMS( SIMD_U8_2toU8_1 , Simd128_AddSaturate_U8 , Js::SIMDUint16x8Operation::OpAddSaturate )
  534. EXDEF2_WMS( SIMD_U8_2toU8_1 , Simd128_SubSaturate_U8 , Js::SIMDUint16x8Operation::OpSubSaturate )
  535. EXDEF2_WMS( SIMD_U16_2toU16_1 , Simd128_AddSaturate_U16 , Js::SIMDUint8x16Operation::OpAddSaturate )
  536. EXDEF2_WMS( SIMD_U16_2toU16_1 , Simd128_SubSaturate_U16 , Js::SIMDUint8x16Operation::OpSubSaturate )
  537. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_LdArr_I8 , OP_SimdLdArrGeneric , AsmSimdTypedArr )
  538. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_LdArr_I16 , OP_SimdLdArrGeneric , AsmSimdTypedArr )
  539. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_LdArr_U4 , OP_SimdLdArrGeneric , AsmSimdTypedArr )
  540. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_LdArr_U8 , OP_SimdLdArrGeneric , AsmSimdTypedArr )
  541. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_LdArr_U16 , OP_SimdLdArrGeneric , AsmSimdTypedArr )
  542. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_StArr_I8 , OP_SimdStArrGeneric , AsmSimdTypedArr )
  543. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_StArr_I16 , OP_SimdStArrGeneric , AsmSimdTypedArr )
  544. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_StArr_U4 , OP_SimdStArrGeneric , AsmSimdTypedArr )
  545. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_StArr_U8 , OP_SimdStArrGeneric , AsmSimdTypedArr )
  546. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_StArr_U16 , OP_SimdStArrGeneric , AsmSimdTypedArr )
  547. EXDEF2_WMS( SIMD_F4_1toI8_1 , Simd128_FromFloat32x4Bits_I8 , Js::SIMDUtils::FromSimdBits )
  548. EXDEF2_WMS( SIMD_I4_1toI8_1 , Simd128_FromInt32x4Bits_I8 , Js::SIMDUtils::FromSimdBits )
  549. EXDEF2_WMS( SIMD_I16_1toI8_1 , Simd128_FromInt8x16Bits_I8 , Js::SIMDUtils::FromSimdBits )
  550. EXDEF2_WMS( SIMD_U4_1toI8_1 , Simd128_FromUint32x4Bits_I8 , Js::SIMDUtils::FromSimdBits )
  551. EXDEF2_WMS( SIMD_U8_1toI8_1 , Simd128_FromUint16x8Bits_I8 , Js::SIMDUtils::FromSimdBits )
  552. EXDEF2_WMS( SIMD_U16_1toI8_1 , Simd128_FromUint8x16Bits_I8 , Js::SIMDUtils::FromSimdBits )
  553. EXDEF2_WMS( SIMD_F4_1toI16_1 , Simd128_FromFloat32x4Bits_I16 , Js::SIMDUtils::FromSimdBits )
  554. EXDEF2_WMS( SIMD_I4_1toI16_1 , Simd128_FromInt32x4Bits_I16 , Js::SIMDUtils::FromSimdBits )
  555. EXDEF2_WMS( SIMD_I8_1toI16_1 , Simd128_FromInt16x8Bits_I16 , Js::SIMDUtils::FromSimdBits )
  556. EXDEF2_WMS( SIMD_U4_1toI16_1 , Simd128_FromUint32x4Bits_I16 , Js::SIMDUtils::FromSimdBits )
  557. EXDEF2_WMS( SIMD_U8_1toI16_1 , Simd128_FromUint16x8Bits_I16 , Js::SIMDUtils::FromSimdBits )
  558. EXDEF2_WMS( SIMD_U16_1toI16_1, Simd128_FromUint8x16Bits_I16 , Js::SIMDUtils::FromSimdBits )
  559. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_FromFloat32x4_U4 , OP_SimdUint32x4FromFloat32x4 , Uint32x4_1Float32x4_1)
  560. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_LdC , OP_WasmSimdConst , Float32x4_IntConst4)
  561. EXDEF2_WMS( SIMD_F4_1toU4_1 , Simd128_FromFloat32x4Bits_U4 , Js::SIMDUtils::FromSimdBits )
  562. EXDEF2_WMS( SIMD_I4_1toU4_1 , Simd128_FromInt32x4Bits_U4 , Js::SIMDUtils::FromSimdBits )
  563. EXDEF2_WMS( SIMD_I8_1toU4_1 , Simd128_FromInt16x8Bits_U4 , Js::SIMDUtils::FromSimdBits )
  564. EXDEF2_WMS( SIMD_I16_1toU4_1 , Simd128_FromInt8x16Bits_U4 , Js::SIMDUtils::FromSimdBits )
  565. EXDEF2_WMS( SIMD_U8_1toU4_1 , Simd128_FromUint16x8Bits_U4 , Js::SIMDUtils::FromSimdBits )
  566. EXDEF2_WMS( SIMD_U16_1toU4_1 , Simd128_FromUint8x16Bits_U4 , Js::SIMDUtils::FromSimdBits )
  567. EXDEF2_WMS( SIMD_F4_1toU8_1 , Simd128_FromFloat32x4Bits_U8 , Js::SIMDUtils::FromSimdBits )
  568. EXDEF2_WMS( SIMD_I4_1toU8_1 , Simd128_FromInt32x4Bits_U8 , Js::SIMDUtils::FromSimdBits )
  569. EXDEF2_WMS( SIMD_I8_1toU8_1 , Simd128_FromInt16x8Bits_U8 , Js::SIMDUtils::FromSimdBits )
  570. EXDEF2_WMS( SIMD_I16_1toU8_1 , Simd128_FromInt8x16Bits_U8 , Js::SIMDUtils::FromSimdBits )
  571. EXDEF2_WMS( SIMD_U4_1toU8_1 , Simd128_FromUint32x4Bits_U8 , Js::SIMDUtils::FromSimdBits )
  572. EXDEF2_WMS( SIMD_U16_1toU8_1 , Simd128_FromUint8x16Bits_U8 , Js::SIMDUtils::FromSimdBits )
  573. EXDEF2_WMS( SIMD_F4_1toU16_1 , Simd128_FromFloat32x4Bits_U16 , Js::SIMDUtils::FromSimdBits )
  574. EXDEF2_WMS( SIMD_I4_1toU16_1 , Simd128_FromInt32x4Bits_U16 , Js::SIMDUtils::FromSimdBits )
  575. EXDEF2_WMS( SIMD_I8_1toU16_1 , Simd128_FromInt16x8Bits_U16 , Js::SIMDUtils::FromSimdBits )
  576. EXDEF2_WMS( SIMD_I16_1toU16_1 , Simd128_FromInt8x16Bits_U16 , Js::SIMDUtils::FromSimdBits )
  577. EXDEF2_WMS( SIMD_U4_1toU16_1 , Simd128_FromUint32x4Bits_U16 , Js::SIMDUtils::FromSimdBits )
  578. EXDEF2_WMS( SIMD_U8_1toU16_1 , Simd128_FromUint16x8Bits_U16 , Js::SIMDUtils::FromSimdBits )
  579. EXDEF2_WMS( SIMD_I8_2toB8_1 , Simd128_Lt_I8 , Js::SIMDInt16x8Operation::OpLessThan )
  580. EXDEF2_WMS( SIMD_U4_2toB4_1 , Simd128_Lt_U4 , Js::SIMDUint32x4Operation::OpLessThan )
  581. EXDEF2_WMS( SIMD_U8_2toB8_1 , Simd128_Lt_U8 , Js::SIMDUint16x8Operation::OpLessThan )
  582. EXDEF2_WMS( SIMD_U16_2toB16_1 , Simd128_Lt_U16 , Js::SIMDUint8x16Operation::OpLessThan )
  583. EXDEF2_WMS( SIMD_I4_2toB4_1 , Simd128_LtEq_I4 , Js::SIMDInt32x4Operation::OpLessThanOrEqual )
  584. EXDEF2_WMS( SIMD_I8_2toB8_1 , Simd128_LtEq_I8 , Js::SIMDInt16x8Operation::OpLessThanOrEqual )
  585. EXDEF2_WMS( SIMD_I16_2toB16_1 , Simd128_LtEq_I16 , Js::SIMDInt8x16Operation::OpLessThanOrEqual )
  586. EXDEF2_WMS( SIMD_U4_2toB4_1 , Simd128_LtEq_U4 , Js::SIMDUint32x4Operation::OpLessThanOrEqual )
  587. EXDEF2_WMS( SIMD_U8_2toB8_1 , Simd128_LtEq_U8 , Js::SIMDUint16x8Operation::OpLessThanOrEqual )
  588. EXDEF2_WMS( SIMD_U16_2toB16_1 , Simd128_LtEq_U16 , Js::SIMDUint8x16Operation::OpLessThanOrEqual )
  589. EXDEF2_WMS( SIMD_I8_2toB8_1 , Simd128_Eq_I8 , Js::SIMDInt16x8Operation::OpEqual )
  590. EXDEF2_WMS( SIMD_U4_2toB4_1 , Simd128_Eq_U4 , Js::SIMDInt32x4Operation::OpEqual )
  591. EXDEF2_WMS( SIMD_U8_2toB8_1 , Simd128_Eq_U8 , Js::SIMDInt16x8Operation::OpEqual )
  592. EXDEF2_WMS( SIMD_U16_2toB16_1 , Simd128_Eq_U16 , Js::SIMDInt8x16Operation::OpEqual )
  593. EXDEF2_WMS( SIMD_I4_2toB4_1 , Simd128_Neq_I4 , Js::SIMDInt32x4Operation::OpNotEqual )
  594. EXDEF2_WMS( SIMD_I8_2toB8_1 , Simd128_Neq_I8 , Js::SIMDInt16x8Operation::OpNotEqual )
  595. EXDEF2_WMS( SIMD_I16_2toB16_1 , Simd128_Neq_I16 , Js::SIMDInt8x16Operation::OpNotEqual )
  596. EXDEF2_WMS( SIMD_U4_2toB4_1 , Simd128_Neq_U4 , Js::SIMDInt32x4Operation::OpNotEqual )
  597. EXDEF2_WMS( SIMD_U8_2toB8_1 , Simd128_Neq_U8 , Js::SIMDInt16x8Operation::OpNotEqual )
  598. EXDEF2_WMS( SIMD_U16_2toB16_1 , Simd128_Neq_U16 , Js::SIMDInt8x16Operation::OpNotEqual )
  599. EXDEF2_WMS( SIMD_I4_2toB4_1 , Simd128_GtEq_I4 , Js::SIMDInt32x4Operation::OpGreaterThanOrEqual )
  600. EXDEF2_WMS( SIMD_I8_2toB8_1 , Simd128_GtEq_I8 , Js::SIMDInt16x8Operation::OpGreaterThanOrEqual )
  601. EXDEF2_WMS( SIMD_I16_2toB16_1 , Simd128_GtEq_I16 , Js::SIMDInt8x16Operation::OpGreaterThanOrEqual )
  602. EXDEF2_WMS( SIMD_U4_2toB4_1 , Simd128_GtEq_U4 , Js::SIMDUint32x4Operation::OpGreaterThanOrEqual )
  603. EXDEF2_WMS( SIMD_U8_2toB8_1 , Simd128_GtEq_U8 , Js::SIMDUint16x8Operation::OpGreaterThanOrEqual )
  604. EXDEF2_WMS( SIMD_U16_2toB16_1 , Simd128_GtEq_U16 , Js::SIMDUint8x16Operation::OpGreaterThanOrEqual )
  605. EXDEF2_WMS( SIMD_I8_2toB8_1 , Simd128_Gt_I8 , Js::SIMDInt16x8Operation::OpGreaterThan )
  606. EXDEF2_WMS( SIMD_U4_2toB4_1 , Simd128_Gt_U4 , Js::SIMDUint32x4Operation::OpGreaterThan )
  607. EXDEF2_WMS( SIMD_U8_2toB8_1 , Simd128_Gt_U8 , Js::SIMDUint16x8Operation::OpGreaterThan )
  608. EXDEF2_WMS( SIMD_U16_2toB16_1 , Simd128_Gt_U16 , Js::SIMDUint8x16Operation::OpGreaterThan )
  609. EXDEF2_WMS( SIMD_U4_1toU4_1 , Simd128_Neg_U4 , SIMDInt32x4Operation::OpNeg )
  610. EXDEF2_WMS( SIMD_U8_1toU8_1 , Simd128_Neg_U8 , SIMDInt16x8Operation::OpNeg )
  611. EXDEF2_WMS( SIMD_U16_1toU16_1 , Simd128_Neg_U16 , SIMDInt8x16Operation::OpNeg )
  612. EXDEF3_WMS( CUSTOM_ASMJS , Simd128_Shuffle_V8X16 , OP_SimdShuffleV8X16 , AsmShuffle)
  613. EXDEF2_WMS(SIMD_D2_1toD2_1, Simd128_Abs_D2, SIMDFloat64x2Operation::OpAbs)
  614. EXDEF2_WMS(SIMD_D2_1toD2_1, Simd128_Neg_D2, SIMDFloat64x2Operation::OpNeg)
  615. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Add_D2, Js::SIMDFloat64x2Operation::OpAdd)
  616. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Sub_D2, Js::SIMDFloat64x2Operation::OpSub)
  617. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Mul_D2, Js::SIMDFloat64x2Operation::OpMul)
  618. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Div_D2, Js::SIMDFloat64x2Operation::OpDiv)
  619. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Min_D2, Js::SIMDFloat64x2Operation::OpMin)
  620. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Max_D2, Js::SIMDFloat64x2Operation::OpMax)
  621. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Lt_D2, Js::SIMDFloat64x2Operation::OpLessThan)
  622. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_LtEq_D2, Js::SIMDFloat64x2Operation::OpLessThanOrEqual)
  623. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Eq_D2, Js::SIMDFloat64x2Operation::OpEqual)
  624. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Neq_D2, Js::SIMDFloat64x2Operation::OpNotEqual)
  625. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_GtEq_D2, Js::SIMDFloat64x2Operation::OpGreaterThanOrEqual)
  626. EXDEF2_WMS(SIMD_D2_2toD2_1, Simd128_Gt_D2, Js::SIMDFloat64x2Operation::OpGreaterThan)
  627. EXDEF2_WMS(SIMD_D2_1toD2_1, Simd128_Sqrt_D2, SIMDFloat64x2Operation::OpSqrt)
  628. EXDEF2_WMS(SIMD_I2_1toI2_P, Simd128_FromInt64x2_D2, SIMDFloat64x2Operation::OpConv<int64>)
  629. EXDEF2_WMS(SIMD_I2_1toI2_P, Simd128_FromUint64x2_D2, SIMDFloat64x2Operation::OpConv<uint64>)
  630. EXDEF2_WMS(SIMD_I2_1toI2_P, Simd128_FromFloat64x2_I2, SIMDInt64x2Operation::OpTrunc<int64>)
  631. EXDEF2_WMS(SIMD_I2_1toI2_P, Simd128_FromFloat64x2_U2, SIMDInt64x2Operation::OpTrunc<uint64>)
  632. #if 0
  633. EXDEF2_WMS(SIMD_D2toD2_1, Simd128_DoublesToD2, SIMDFloat64x2Operation::OpFloat64x2)
  634. EXDEF4_WMS(TEMPLATE_ASMJS, Simd128_LdSlot_D2, OP_LdSlotPrimitive, ElementSlot, AsmJsSIMDValue)
  635. EXDEF4_WMS(TEMPLATE_ASMJS, Simd128_StSlot_D2, OP_StSlotPrimitive, ElementSlot, AsmJsSIMDValue)
  636. EXDEF2_WMS(SIMD_D2_1toD2_1, Simd128_Return_D2, (AsmJsSIMDValue))
  637. EXDEF2_WMS(SIMD_F4_1toD2_1, Simd128_FromFloat32x4_D2, SIMDFloat64x2Operation::OpFromFloat32x4)
  638. EXDEF2_WMS(SIMD_F4_1toD2_1, Simd128_FromFloat32x4Bits_D2, Js::FromSimdBits)
  639. EXDEF2_WMS(SIMD_I4_1toD2_1, Simd128_FromInt32x4_D2, SIMDFloat64x2Operation::OpFromInt32x4)
  640. EXDEF2_WMS(SIMD_I4_1toD2_1, Simd128_FromInt32x4Bits_D2, Js::FromSimdBits)
  641. EXDEF2_WMS(SIMD_D2_1toD2_1, Simd128_Rcp_D2, SIMDFloat64x2Operation::OpReciprocal)
  642. EXDEF2_WMS(SIMD_D2_1toD2_1, Simd128_RcpSqrt_D2, SIMDFloat64x2Operation::OpReciprocalSqrt)
  643. EXDEF2_WMS(SIMD_I4_1D2_2toD2_1, Simd128_Select_D2, Js::SIMDFloat64x2Operation::OpSelect)
  644. EXDEF2_WMS(SIMD_D2_3toD2_1, Simd128_Clamp_D2, Js::SIMDFloat64x2Operation::OpClamp)
  645. EXDEF2_WMS(SIMD_D2_1toI1, Simd128_LdSignMask_D2, Js::SIMDFloat64x2Operation::OpGetSignMask)
  646. EXDEF2_WMS(SIMD_D2_1toR1Mem, Simd128_I_ArgOut_D2, OP_I_SetOutAsmSimd)
  647. EXDEF2_WMS(SIMD_D2_1toD2_1, Simd128_Ld_D2, (AsmJsSIMDValue)
  648. EXDEF2_WMS(SIMD_D2_1I2toD2_1, Simd128_Swizzle_D2, SIMD128InnerShuffle)
  649. EXDE2_WMS(SIMD_D2_2I2toD2_1, Simd128_Shuffle_D2, SIMD128InnerShuffle)
  650. EXDEF3_WMS(CUSTOM_ASMJS, Simd128_StArr_D2, OP_SimdStArrGeneric, AsmSimdTypedArr)
  651. EXDEF3_WMS(CUSTOM_ASMJS, Simd128_LdArr_D2, OP_SimdLdArrGeneric, AsmSimdTypedArr)
  652. EXDEF3_WMS(CUSTOM_ASMJS, Simd128_LdArrConst_D2, OP_SimdLdArrConstIndex, AsmSimdTypedArr)
  653. EXDEF3_WMS(CUSTOM_ASMJS, Simd128_StArrConst_D2, OP_SimdStArrConstIndex, AsmSimdTypedArr)
  654. #endif // 0
  655. #endif
  656. #endif