From 48addd68a8c8d0c026be2d3b87ea6ce23509da91 Mon Sep 17 00:00:00 2001 From: tma Date: Fri, 23 Sep 2005 02:59:15 +0000 Subject: * Replaced lots of __linux__ || __FreeBSD__ with __GNUC__ * MinGW port now uses asm versions of SnapVector and ftol * Improved the handling of mangled symbols in vm_x86.c git-svn-id: svn://svn.icculus.org/quake3/trunk@99 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/win32/win_shared.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'code/win32/win_shared.c') diff --git a/code/win32/win_shared.c b/code/win32/win_shared.c index 0179edc..cbaa8d4 100644 --- a/code/win32/win_shared.c +++ b/code/win32/win_shared.c @@ -53,25 +53,14 @@ int Sys_Milliseconds (void) return sys_curtime; } +#ifndef __GNUC__ //see snapvectora.s /* ================ Sys_SnapVector ================ */ -long fastftol( float f ) { -#ifndef __MINGW32__ - static int tmp; - __asm fld f - __asm fistp tmp - __asm mov eax, tmp -#else - return (long)f; -#endif -} - void Sys_SnapVector( float *v ) { -#ifndef __MINGW32__ int i; float f; @@ -89,19 +78,8 @@ void Sys_SnapVector( float *v ) __asm fld f; __asm fistp i; *v = i; - /* - *v = fastftol(*v); - v++; - *v = fastftol(*v); - v++; - *v = fastftol(*v); - */ -#else - v[0] = rint(v[0]); - v[1] = rint(v[1]); - v[2] = rint(v[2]); -#endif } +#endif /* -- cgit v1.2.3