added floating point optimizations to the JIT

standarised a bit more x86_macros.h
some asm optimizations to bintools extension

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40837
This commit is contained in:
Borja Ferrer
2007-05-22 15:15:51 +00:00
parent 307181de8d
commit e60940834b
9 changed files with 852 additions and 129 deletions
+26 -14
View File
@@ -18,17 +18,6 @@
#endif
#define _float_included
/**
* Different methods of rounding.
*/
enum floatround_method
{
floatround_round = 0, /**< Standard IEEE rounding */
floatround_floor, /**< Next lowest integer value. */
floatround_ceil, /**< Next highest integer value. */
floatround_tozero /** Closest integer to zero. */
};
/**
* Converts an integer into a floating point value.
*
@@ -82,13 +71,36 @@ native Float:FloatSub(Float:oper1, Float:oper2);
native Float:FloatFraction(Float:value);
/**
* Rounds a float into an integer number.
* Rounds a float to the closest integer to zero.
*
* @param value Input value to be rounded.
* @param method Rounding method to use.
* @return Rounded value.
*/
native FloatRound(Float:value, floatround_method:method=floatround_round);
native RoundToZero(Float:value);
/**
* Rounds a float to the next highest integer value.
*
* @param value Input value to be rounded.
* @return Rounded value.
*/
native RoundToCeil(Float:value);
/**
* Rounds a float to the next lowest integer value.
*
* @param value Input value to be rounded.
* @return Rounded value.
*/
native RoundToFloor(Float:value);
/**
* Standard IEEE rounding.
*
* @param value Input value to be rounded.
* @return Rounded value.
*/
native RountToNearest(Float:value);
/**
* Compares two floats.