mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 01:42:12 +00:00
- Add MASM assembler files for MSVC x64 projects to support vm_x86 in x64 mode
- Clean up ftol()/snapvector() mess - Make use of SSE instructions for ftol()/snapvector() if available - move ftol/snapvector pure assembler to inline assembler, this will add x86_64 and improve support for different calling conventions - Set FPU control word at program startup to get consistent behaviour on all platforms
This commit is contained in:
parent
471182cba0
commit
03201aff22
22 changed files with 540 additions and 460 deletions
|
@ -36,6 +36,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include <pwd.h>
|
||||
#include <libgen.h>
|
||||
#include <fcntl.h>
|
||||
#include <fenv.h>
|
||||
|
||||
qboolean stdinIsATTY;
|
||||
|
||||
|
@ -125,31 +126,6 @@ int Sys_Milliseconds (void)
|
|||
return curtime;
|
||||
}
|
||||
|
||||
#if !id386
|
||||
/*
|
||||
==================
|
||||
fastftol
|
||||
==================
|
||||
*/
|
||||
long fastftol( float f )
|
||||
{
|
||||
return (long)f;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
Sys_SnapVector
|
||||
==================
|
||||
*/
|
||||
void Sys_SnapVector( float *v )
|
||||
{
|
||||
v[0] = rint(v[0]);
|
||||
v[1] = rint(v[1]);
|
||||
v[2] = rint(v[2]);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
==================
|
||||
Sys_RandomBytes
|
||||
|
@ -756,6 +732,12 @@ void Sys_GLimpInit( void )
|
|||
// NOP
|
||||
}
|
||||
|
||||
void Sys_SetFloatEnv(void)
|
||||
{
|
||||
// rounding towards 0
|
||||
fesetround(FE_TOWARDZERO);
|
||||
}
|
||||
|
||||
/*
|
||||
==============
|
||||
Sys_PlatformInit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue