summaryrefslogtreecommitdiffstats
path: root/src/util/imports.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/imports.h')
-rw-r--r--src/util/imports.h31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/util/imports.h b/src/util/imports.h
index 385b37c81b5..d56bd77e03b 100644
--- a/src/util/imports.h
+++ b/src/util/imports.h
@@ -129,37 +129,6 @@ static inline int IROUND_POS(float f)
return (int) (f + 0.5F);
}
-/** Return (as an integer) floor of float */
-static inline int IFLOOR(float f)
-{
-#if defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__)
- /*
- * IEEE floor for computers that round to nearest or even.
- * 'f' must be between -4194304 and 4194303.
- * This floor operation is done by "(iround(f + .5) + iround(f - .5)) >> 1",
- * but uses some IEEE specific tricks for better speed.
- * Contributed by Josh Vanderhoof
- */
- int ai, bi;
- double af, bf;
- af = (3 << 22) + 0.5 + (double)f;
- bf = (3 << 22) + 0.5 - (double)f;
- /* GCC generates an extra fstp/fld without this. */
- __asm__ ("fstps %0" : "=m" (ai) : "t" (af) : "st");
- __asm__ ("fstps %0" : "=m" (bi) : "t" (bf) : "st");
- return (ai - bi) >> 1;
-#else
- int ai, bi;
- double af, bf;
- fi_type u;
- af = (3 << 22) + 0.5 + (double)f;
- bf = (3 << 22) + 0.5 - (double)f;
- u.f = (float) af; ai = u.i;
- u.f = (float) bf; bi = u.i;
- return (ai - bi) >> 1;
-#endif
-}
-
/**********************************************************************
* Functions