projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7fe183
)
Removed bogus OS/2 floating point->integer conversion routine
author
Kendall Bennett
<KendallB@scitechsoft.com>
Fri, 3 Oct 2003 01:38:28 +0000
(
01:38
+0000)
committer
Kendall Bennett
<KendallB@scitechsoft.com>
Fri, 3 Oct 2003 01:38:28 +0000
(
01:38
+0000)
src/mesa/main/imports.h
patch
|
blob
|
history
diff --git
a/src/mesa/main/imports.h
b/src/mesa/main/imports.h
index 104ef4a4c0860afc7558e9c1b5a1712c1cfae27e..2c9c2fc34290fc512bd8a52098995673c316a2cd 100644
(file)
--- a/
src/mesa/main/imports.h
+++ b/
src/mesa/main/imports.h
@@
-391,9
+391,9
@@
static INLINE int iround(float f)
return r;
}
#define IROUND(x) iround(x)
return r;
}
#define IROUND(x) iround(x)
-#elif defined(
USE_X86_ASM) && defined(__WATCOMC
__)
+#elif defined(
__WATCOMC__) && defined(__386
__)
long iround(float f);
long iround(float f);
-#pragma aux iround =
\
+#pragma aux iround = \
"push eax" \
"fistp dword ptr [esp]" \
"pop eax" \
"push eax" \
"fistp dword ptr [esp]" \
"pop eax" \
@@
-401,16
+401,6
@@
long iround(float f);
value [eax] \
modify exact [eax];
#define IROUND(x) iround(x)
value [eax] \
modify exact [eax];
#define IROUND(x) iround(x)
-#elif defined(__OS2__)
-#ifndef FIST_MAGIC
-#define FIST_MAGIC ((((65536.0 * 65536.0 * 16)+(65536.0 * 0.5))* 65536.0))
-#endif
-static INLINE int iround(float x)
-{
- double dtemp = FIST_MAGIC + x;
- return ((*(int *)&dtemp) - 0x80000000);
-}
-#define IROUND(f) iround((float)f)
#else
#define IROUND(f) ((int) (((f) >= 0.0F) ? ((f) + 0.5F) : ((f) - 0.5F)))
#endif
#else
#define IROUND(f) ((int) (((f) >= 0.0F) ? ((f) + 0.5F) : ((f) - 0.5F)))
#endif