port from perforce
This commit is contained in:
66
evoke-64k/ev10/intrin.h
Normal file
66
evoke-64k/ev10/intrin.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
|
||||
unsigned int myrand();
|
||||
|
||||
extern const float c_2PI;
|
||||
extern const float c_PI;
|
||||
|
||||
#ifdef SUPERSMALL
|
||||
|
||||
|
||||
__forceinline float mypow( float a, float b);
|
||||
#endif
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
double __cdecl sin(double);
|
||||
double __cdecl cos(double);
|
||||
double __cdecl sqrt(double);
|
||||
double __cdecl fabs(double);
|
||||
double __cdecl atan2(double, double);
|
||||
|
||||
void* __cdecl memcpy( void* dest, const void* src, size_t count );
|
||||
}
|
||||
|
||||
#pragma intrinsic ( sin, cos, sqrt, fabs, atan2 ) // true intrinsic
|
||||
#pragma intrinsic ( memcpy ) // true intrinsic
|
||||
|
||||
/*
|
||||
__forceinline double sin(double v)
|
||||
{
|
||||
__asm fld v;
|
||||
__asm fsin;
|
||||
__asm fstp v;
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
float cos(float v)
|
||||
{
|
||||
__asm fld v;
|
||||
__asm fcos;
|
||||
__asm fstp v;
|
||||
return v;
|
||||
}
|
||||
*/
|
||||
/*float sqrt(float v)
|
||||
{
|
||||
__asm finit;
|
||||
__asm fld v;
|
||||
__asm fsqrt;
|
||||
__asm fstp v;
|
||||
return v;
|
||||
}*/
|
||||
|
||||
/*float abs(float X)
|
||||
{
|
||||
if(X < 0.0f)
|
||||
return -X;
|
||||
|
||||
return X;
|
||||
}*/
|
||||
|
||||
float maximum(float X, float Y);
|
||||
|
||||
float minimum(float X, float Y);
|
||||
Reference in New Issue
Block a user