| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- //-------------------------------------------------------------------------------------------------------
- // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
- // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
- //-------------------------------------------------------------------------------------------------------
- #pragma once
- namespace Js
- {
- class AsmJsMath
- {
- public:
- template<typename T> static T Add( T aLeft, T aRight );
- template<typename T> static T Sub( T aLeft, T aRight );
- template<typename T> static T Mul( T aLeft, T aRight );
- template<typename T> static bool DivWouldTrap(T aLeft, T aRight);
- template<typename T> static T DivUnsafe(T aLeft, T aRight);
- template<typename T> static T DivChecked(T aLeft, T aRight);
- template<typename T> static bool RemWouldTrap(T aLeft, T aRight);
- template<typename T> static T RemUnsafe(T aLeft, T aRight);
- template<typename T> static T RemChecked(T aLeft, T aRight);
- template<typename T> static T Min( T aLeft, T aRight );
- template<typename T> static T Max( T aLeft, T aRight );
- template<typename T> static T Abs( T aLeft );
- template<typename T = int> static T And( T aLeft, T aRight );
- template<typename T = int> static T Or( T aLeft, T aRight );
- template<typename T = int> static T Xor( T aLeft, T aRight );
- template<typename T = int> static T Shl( T aLeft, T aRight );
- template<typename T = int> static T Shr( T aLeft, T aRight );
- template<typename T = int> static T ShrU( T aLeft, T aRight );
- template<typename T> static T Neg( T aLeft);
- static int Not( int aLeft);
- static int LogNot( int aLeft);
- static int ToBool( int aLeft );
- static int Clz32( int value);
- template<typename T> static int CmpLt( T aLeft, T aRight );
- template<typename T> static int CmpLe( T aLeft, T aRight );
- template<typename T> static int CmpGt( T aLeft, T aRight );
- template<typename T> static int CmpGe( T aLeft, T aRight );
- template<typename T> static int CmpEq( T aLeft, T aRight );
- template<typename T> static int CmpNe( T aLeft, T aRight );
- };
- }
- #include "AsmJsMath.inl"
|