[gs-cvs] rev 8477 - trunk/gs/src

henrys at ghostscript.com henrys at ghostscript.com
Mon Jan 7 10:43:06 PST 2008


Author: henrys
Date: 2008-01-07 10:43:02 -0800 (Mon, 07 Jan 2008)
New Revision: 8477

Removed:
   trunk/gs/src/gsfemu.c
Modified:
   trunk/gs/src/Makefile.in
   trunk/gs/src/bcwin32.mak
   trunk/gs/src/dvx-gcc.mak
   trunk/gs/src/gscie.h
   trunk/gs/src/gsjmorec.h
   trunk/gs/src/gsmisc.c
   trunk/gs/src/gxchar.c
   trunk/gs/src/gxfarith.h
   trunk/gs/src/gxfixed.h
   trunk/gs/src/lib.mak
   trunk/gs/src/macos-mcp.mak
   trunk/gs/src/macosx.mak
   trunk/gs/src/msvc32.mak
   trunk/gs/src/msvccmd.mak
   trunk/gs/src/msvclib.mak
   trunk/gs/src/openvms.mak
   trunk/gs/src/openvms.mmk
   trunk/gs/src/os2.mak
   trunk/gs/src/siscale.c
   trunk/gs/src/ugcclib.mak
   trunk/gs/src/unix-end.mak
   trunk/gs/src/unix-gcc.mak
   trunk/gs/src/unixansi.mak
   trunk/gs/src/watclib.mak
   trunk/gs/src/wccommon.mak
   trunk/gs/src/wctail.mak
   trunk/gs/src/winlib.mak
Log:
Deprecate USE_FPU, no changes expected.


Modified: trunk/gs/src/Makefile.in
===================================================================
--- trunk/gs/src/Makefile.in	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/Makefile.in	2008-01-07 18:43:02 UTC (rev 8477)
@@ -335,17 +335,6 @@
 #XLIBS=Xt Xext X11
 XLIBS=@X_LIBS@
 
-# Define whether this platform has floating point hardware:
-#	FPU_TYPE=2 means floating point is faster than fixed point.
-# (This is the case on some RISCs with multiple instruction dispatch.)
-#	FPU_TYPE=1 means floating point is at worst only slightly slower
-# than fixed point.
-#	FPU_TYPE=0 means that floating point may be considerably slower.
-#	FPU_TYPE=-1 means that floating point is always much slower than
-# fixed point.
-
-FPU_TYPE=1
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.
 

Modified: trunk/gs/src/bcwin32.mak
===================================================================
--- trunk/gs/src/bcwin32.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/bcwin32.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -350,21 +350,6 @@
 
 CPU_TYPE=586
 
-# Define the math coprocessor (FPU) type.
-# Options are -1 (optimize for no FPU), 0 (optimize for FPU present,
-# but do not require a FPU), 87, 287, or 387.
-# If you have a 486 or Pentium CPU, you should normally set FPU_TYPE to 387,
-# since most of these CPUs include the equivalent of an 80387 on-chip;
-# however, the 486SX and the Cyrix 486SLC do not have an on-chip FPU, so if
-# you have one of these CPUs and no external FPU, set FPU_TYPE to -1 or 0.
-# An xx87 option means that the executable will run only if a FPU
-# of that type (or higher) is available: this is NOT currently checked
-# at runtime.
-
-! ifndef FPU_TYPE
-FPU_TYPE=387
-!endif
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.  Don't change this unless you really know
 # what you're doing.

Modified: trunk/gs/src/dvx-gcc.mak
===================================================================
--- trunk/gs/src/dvx-gcc.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/dvx-gcc.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -239,17 +239,6 @@
 # XLIBS=Xt Xext X
 XLIBS=Xt Xext X11
 
-# Define whether this platform has floating point hardware:
-#	FPU_TYPE=2 means floating point is faster than fixed point.
-# (This is the case on some RISCs with multiple instruction dispatch.)
-#	FPU_TYPE=1 means floating point is at worst only slightly slower
-# than fixed point.
-#	FPU_TYPE=0 means that floating point may be considerably slower.
-#	FPU_TYPE=-1 means that floating point is always much slower than
-# fixed point.
-
-FPU_TYPE=1
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.  Don't change this unless you really know
 # what you're doing.

Modified: trunk/gs/src/gscie.h
===================================================================
--- trunk/gs/src/gscie.h	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/gscie.h	2008-01-07 18:43:02 UTC (rev 8477)
@@ -18,7 +18,7 @@
 #ifndef gscie_INCLUDED
 #  define gscie_INCLUDED
 
-#include "std.h"		/* for USE_FPU */
+#include "std.h"
 #include "gsrefct.h"
 #include "gsstype.h"		/* for extern_st */
 #include "gstypes.h"		/* for gs_range_t */
@@ -34,9 +34,6 @@
 
 /* Define whether to use fixed- or floating-point values in the caches. */
 /*#define CIE_CACHE_USE_FIXED */
-#if USE_FPU < 0
-#  define CIE_CACHE_USE_FIXED
-#endif
 
 /* If we are using fixed-point values, define the number of fraction bits. */
 #define CIE_FIXED_FRACTION_BITS 12

Deleted: trunk/gs/src/gsfemu.c
===================================================================
--- trunk/gs/src/gsfemu.c	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/gsfemu.c	2008-01-07 18:43:02 UTC (rev 8477)
@@ -1,845 +0,0 @@
-/* Copyright (C) 2001-2006 Artifex Software, Inc.
-   All Rights Reserved.
-  
-   This software is provided AS-IS with no warranty, either express or
-   implied.
-
-   This software is distributed under license and may not be copied, modified
-   or distributed except as expressly authorized under the terms of that
-   license.  Refer to licensing information at http://www.artifex.com/
-   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
-   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
-*/
-
-/* $Id$ */
-/* Floating point emulator for gcc */
-
-/* We actually only need arch.h + uint and ulong, but because signal.h */
-/* may include <sys/types.h>, we have to include std.h to handle (avoid) */
-/* redefinition of type names. */
-#include "std.h"
-#include <signal.h>
-
-/*#define TEST */
-
-/*
- * This package is not a fully general IEEE floating point implementation.
- * It implements only one rounding mode (round to nearest) and does not
- * generate or properly handle NaNs.
- *
- * The names and interfaces of the routines in this package were designed to
- * work with gcc.  This explains some peculiarities such as the presence of
- * single-precision arithmetic (forbidden by the ANSI standard) and the
- * omission of unsigned-to-float conversions (which gcc implements with
- * truly grotesque inline code).
- *
- * The following routines do not yet handle denormalized numbers:
- *      addd3 (operands or result)
- *      __muldf3 (operands or result)
- *      __divdf3 (operands or result)
- *      __truncdfsf2 (result)
- *      __extendsfdf2 (operand)
- */
-
-/*
- * IEEE single-precision floats have the format:
- *      sign(1) exponent(8) mantissa(23)
- * The exponent is biased by +127.
- * The mantissa is a fraction with an implicit integer part of 1,
- * unless the exponent is zero.
- */
-#define fx(ia) (((ia) >> 23) & 0xff)
-#define fx_bias 127
-/*
- * IEEE double-precision floats have the format:
- *      sign(1) exponent(11) mantissa(52)
- * The exponent is biased by +1023.
- */
-#define dx(ld) ((ld[msw] >> 20) & 0x7ff)
-#define dx_bias 1023
-
-#if arch_is_big_endian
-#  define msw 0
-#  define lsw 1
-#else
-#  define msw 1
-#  define lsw 0
-#endif
-/* Double arguments/results */
-#define la ((const long *)&a)
-#define ula ((const ulong *)&a)
-#define lb ((const long *)&b)
-#define ulb ((const ulong *)&b)
-#define dc (*(const double *)lc)
-/* Float arguments/results */
-#define ia (*(const long *)&a)
-#define ua (*(const ulong *)&a)
-#define ib (*(const long *)&b)
-#define ub (*(const ulong *)&b)
-#define fc (*(const float *)&lc)
-
-/* Round a double-length fraction by adding 1 in the lowest bit and */
-/* then shifting right by 1. */
-#define roundr1(ms, uls)\
-  if ( uls == 0xffffffff ) ms++, uls = 0;\
-  else uls++;\
-  uls = (uls >> 1) + (ms << 31);\
-  ms >>= 1
-
-/* Extend a non-zero float to a double. */
-#define extend(lc, ia)\
-  ((lc)[msw] = ((ia) & 0x80000000) + (((ia) & 0x7fffffff) >> 3) + 0x38000000,\
-   (lc)[lsw] = (ia) << 29)
-
-/* ---------------- Arithmetic ---------------- */
-
-/* -------- Add/subtract/negate -------- */
-
-double
-__negdf2(double a)
-{
-    long lc[2];
-
-    lc[msw] = la[msw] ^ 0x80000000;
-    lc[lsw] = la[lsw];
-    return dc;
-}
-float
-__negsf2(float a)
-{
-    long lc = ia ^ 0x80000000;
-
-    return fc;
-}
-
-double
-__adddf3(double a, double b)
-{
-    long lc[2];
-    int expt = dx(la);
-    int shift = expt - dx(lb);
-    long sign;
-    ulong msa, lsa;
-    ulong msb, lsb;
-
-    if (shift < 0) {		/* Swap a and b so that expt(a) >= expt(b). */
-	double temp = a;
-
-	a = b, b = temp;
-	expt += (shift = -shift);
-    }
-    if (shift >= 54)		/* also picks up most cases where b == 0 */
-	return a;
-    if (!(lb[msw] & 0x7fffffff))
-	return a;
-    sign = la[msw] & 0x80000000;
-    msa = (la[msw] & 0xfffff) + 0x100000, lsa = la[lsw];
-    msb = (lb[msw] & 0xfffff) + 0x100000, lsb = lb[lsw];
-    if ((la[msw] ^ lb[msw]) >= 0) {	/* Adding numbers of the same sign. */
-	if (shift >= 32)
-	    lsb = msb, msb = 0, shift -= 32;
-	if (shift) {
-	    --shift;
-	    lsb = (lsb >> shift) + (msb << (32 - shift));
-	    msb >>= shift;
-	    roundr1(msb, lsb);
-	}
-	if (lsb > (ulong) 0xffffffff - lsa)
-	    msa++;
-	lsa += lsb;
-	msa += msb;
-	if (msa > 0x1fffff) {
-	    roundr1(msa, lsa);
-	    /* In principle, we have to worry about exponent */
-	    /* overflow here, but we don't. */
-	    ++expt;
-	}
-    } else {			/* Adding numbers of different signs. */
-	if (shift > 53)
-	    return a;		/* b can't affect the result, even rounded */
-	if (shift == 0 && (msb > msa || (msb == msa && lsb >= lsa))) {	/* This is the only case where the sign of the result */
-	    /* differs from the sign of the first operand. */
-	    sign ^= 0x80000000;
-	    msa = msb - msa;
-	    if (lsb < lsa)
-		msa--;
-	    lsa = lsb - lsa;
-	} else {
-	    if (shift >= 33) {
-		lsb = ((msb >> (shift - 32)) + 1) >> 1;		/* round */
-		msb = 0;
-	    } else if (shift) {
-		lsb = (lsb >> (shift - 1)) + (msb << (33 - shift));
-		msb >>= shift - 1;
-		roundr1(msb, lsb);
-	    }
-	    msa -= msb;
-	    if (lsb > lsa)
-		msa--;
-	    lsa -= lsb;
-	}
-	/* Now renormalize the result. */
-	/* For the moment, we do this the slow way. */
-	if (!(msa | lsa))
-	    return 0;
-	while (msa < 0x100000) {
-	    msa = (msa << 1) + (lsa >> 31);
-	    lsa <<= 1;
-	    expt -= 1;
-	}
-	if (expt <= 0) {	/* Underflow.  Return 0 rather than a denorm. */
-	    lc[msw] = sign;
-	    lc[lsw] = 0;
-	    return dc;
-	}
-    }
-    lc[msw] = sign + ((ulong) expt << 20) + (msa & 0xfffff);
-    lc[lsw] = lsa;
-    return dc;
-}
-double
-__subdf3(double a, double b)
-{
-    long nb[2];
-
-    nb[msw] = lb[msw] ^ 0x80000000;
-    nb[lsw] = lb[lsw];
-    return a + *(const double *)nb;
-}
-
-float
-__addsf3(float a, float b)
-{
-    long lc;
-    int expt = fx(ia);
-    int shift = expt - fx(ib);
-    long sign;
-    ulong ma, mb;
-
-    if (shift < 0) {		/* Swap a and b so that expt(a) >= expt(b). */
-	long temp = ia;
-
-	*(long *)&a = ib;
-	*(long *)&b = temp;
-	expt += (shift = -shift);
-    }
-    if (shift >= 25)		/* also picks up most cases where b == 0 */
-	return a;
-    if (!(ib & 0x7fffffff))
-	return a;
-    sign = ia & 0x80000000;
-    ma = (ia & 0x7fffff) + 0x800000;
-    mb = (ib & 0x7fffff) + 0x800000;
-    if ((ia ^ ib) >= 0) {	/* Adding numbers of the same sign. */
-	if (shift) {
-	    --shift;
-	    mb = ((mb >> shift) + 1) >> 1;
-	}
-	ma += mb;
-	if (ma > 0xffffff) {
-	    ma = (ma + 1) >> 1;
-	    /* In principle, we have to worry about exponent */
-	    /* overflow here, but we don't. */
-	    ++expt;
-	}
-    } else {			/* Adding numbers of different signs. */
-	if (shift > 24)
-	    return a;		/* b can't affect the result, even rounded */
-	if (shift == 0 && mb >= ma) {
-	    /* This is the only case where the sign of the result */
-	    /* differs from the sign of the first operand. */
-	    sign ^= 0x80000000;
-	    ma = mb - ma;
-	} else {
-	    if (shift) {
-		--shift;
-		mb = ((mb >> shift) + 1) >> 1;
-	    }
-	    ma -= mb;
-	}
-	/* Now renormalize the result. */
-	/* For the moment, we do this the slow way. */
-	if (!ma)
-	    return 0;
-	while (ma < 0x800000) {
-	    ma <<= 1;
-	    expt -= 1;
-	}
-	if (expt <= 0) {
-	    /* Underflow.  Return 0 rather than a denorm. */
-	    lc = sign;
-	    return fc;
-	}
-    }
-    lc = sign + ((ulong)expt << 23) + (ma & 0x7fffff);
-    return fc;
-}
-
-float
-__subsf3(float a, float b)
-{
-    long lc = ib ^ 0x80000000;
-
-    return a + fc;
-}
-
-/* -------- Multiplication -------- */
-
-double
-__muldf3(double a, double b)
-{
-    long lc[2];
-    ulong sign;
-    uint H, I, h, i;
-    ulong p0, p1, p2;
-    ulong expt;
-
-    if (!(la[msw] & 0x7fffffff) || !(lb[msw] & 0x7fffffff))
-	return 0;
-    /*
-     * We now have to multiply two 53-bit fractions to produce a 53-bit
-     * result.  Since the idiots who specified the standard C libraries
-     * don't allow us to use the 32 x 32 => 64 multiply that every
-     * 32-bit CPU provides, we have to chop these 53-bit numbers up into
-     * 14-bit chunks so we can use 32 x 32 => 32 multiplies.
-     */
-#define chop_ms(ulx, h, i)\
-  h = ((ulx[msw] >> 7) & 0x1fff) | 0x2000,\
-  i = ((ulx[msw] & 0x7f) << 7) | (ulx[lsw] >> 25)
-#define chop_ls(ulx, j, k)\
-  j = (ulx[lsw] >> 11) & 0x3fff,\
-  k = (ulx[lsw] & 0x7ff) << 3
-    chop_ms(ula, H, I);
-    chop_ms(ulb, h, i);
-#undef chop
-#define prod(m, n) ((ulong)(m) * (n))	/* force long multiply */
-    p0 = prod(H, h);
-    p1 = prod(H, i) + prod(I, h);
-    /* If these doubles were produced from floats or ints, */
-    /* all the other products will be zero.  It's worth a check. */
-    if ((ula[lsw] | ulb[lsw]) & 0x1ffffff) {	/* No luck. */
-	/* We can almost always avoid computing p5 and p6, */
-	/* but right now it's not worth the trouble to check. */
-	uint J, K, j, k;
-
-	chop_ls(ula, J, K);
-	chop_ls(ulb, j, k);
-	{
-	    ulong p6 = prod(K, k);
-	    ulong p5 = prod(J, k) + prod(K, j) + (p6 >> 14);
-	    ulong p4 = prod(I, k) + prod(J, j) + prod(K, i) + (p5 >> 14);
-	    ulong p3 = prod(H, k) + prod(I, j) + prod(J, i) + prod(K, h) +
-	    (p4 >> 14);
-
-	    p2 = prod(H, j) + prod(I, i) + prod(J, h) + (p3 >> 14);
-	}
-    } else {
-	p2 = prod(I, i);
-    }
-    /* Now p0 through p2 hold the result. */
-/****** ASSUME expt IS 32 BITS WIDE. ******/
-    expt = (la[msw] & 0x7ff00000) + (lb[msw] & 0x7ff00000) -
-	(dx_bias << 20);
-    /* Now expt is in the range [-1023..3071] << 20. */
-    /* Values outside the range [1..2046] are invalid. */
-    p1 += p2 >> 14;
-    p0 += p1 >> 14;
-    /* Now the 56-bit result consists of p0, the low 14 bits of p1, */
-    /* and the low 14 bits of p2. */
-    /* p0 can be anywhere between 2^26 and almost 2^28, so we might */
-    /* need to adjust the exponent by 1. */
-    if (p0 < 0x8000000) {
-	p0 = (p0 << 1) + ((p1 >> 13) & 1);
-	p1 = (p1 << 1) + ((p2 >> 13) & 1);
-	p2 <<= 1;
-    } else
-	expt += 0x100000;
-    /* The range of expt is now [-1023..3072] << 20. */
-    /* Round the mantissa to 53 bits. */
-    if (!((p2 += 4) & 0x3ffc) && !(++p1 & 0x3fff) && ++p0 >= 0x10000000) {
-	p0 >>= 1, p1 = 0x2000;
-	/* Check for exponent overflow, just in case. */
-	if ((ulong) expt < 0xc0000000)
-	    expt += 0x100000;
-    }
-    sign = (la[msw] ^ lb[msw]) & 0x80000000;
-    if (expt == 0) {		/* Underflow.  Return 0 rather than a denorm. */
-	lc[msw] = sign;
-	lc[lsw] = 0;
-    } else if ((ulong) expt >= 0x7ff00000) {	/* Overflow or underflow. */
-	if ((ulong) expt <= 0xc0000000) {	/* Overflow. */
-	    raise(SIGFPE);
-	    lc[msw] = sign + 0x7ff00000;
-	    lc[lsw] = 0;
-	} else {		/* Underflow.  See above. */
-	    lc[msw] = sign;
-	    lc[lsw] = 0;
-	}
-    } else {
-	lc[msw] = sign + expt + ((p0 >> 7) & 0xfffff);
-	lc[lsw] = (p0 << 25) | ((p1 & 0x3fff) << 11) | ((p2 >> 3) & 0x7ff);
-    }
-    return dc;
-#undef prod
-}
-float
-__mulsf3(float a, float b)
-{
-    uint au, al, bu, bl, cu, cl, sign;
-    long lc;
-    uint expt;
-
-    if (!(ia & 0x7fffffff) || !(ib & 0x7fffffff))
-	return 0;
-    au = ((ia >> 8) & 0x7fff) | 0x8000;
-    bu = ((ib >> 8) & 0x7fff) | 0x8000;
-    /* Since 0x8000 <= au,bu <= 0xffff, 0x40000000 <= cu <= 0xfffe0001. */
-    cu = au * bu;
-    if ((al = ia & 0xff) != 0) {
-	cl = bu * al;
-    } else
-	cl = 0;
-    if ((bl = ib & 0xff) != 0) {
-	cl += au * bl;
-	if (al)
-	    cl += (al * bl) >> 8;
-    }
-    cu += cl >> 8;
-    sign = (ia ^ ib) & 0x80000000;
-    expt = (ia & 0x7f800000) + (ib & 0x7f800000) - (fx_bias << 23);
-    /* expt is now in the range [-127..383] << 23. */
-    /* Values outside [1..254] are invalid. */
-    if (cu <= 0x7fffffff)
-	cu <<= 1;
-    else
-	expt += 1 << 23;
-    cu = ((cu >> 7) + 1) >> 1;
-    if (expt < 1 << 23)
-	lc = sign;		/* underflow */
-    else if (expt > (uint)(254 << 23)) {
-	if (expt <= 0xc0000000) { /* overflow */
-	    raise(SIGFPE);
-	    lc = sign + 0x7f800000;
-	} else {		/* underflow */
-	    lc = sign;
-	}
-    } else
-	lc = sign + expt + cu - 0x800000;
-    return fc;
-}
-
-/* -------- Division -------- */
-
-double
-__divdf3(double a, double b)
-{
-    long lc[2];
-
-    /*
-     * Multi-precision division is really, really awful.
-     * We generate the result more or less brute force,
-     * 11 bits at a time.
-     */
-    ulong sign = (la[msw] ^ lb[msw]) & 0x80000000;
-    ulong msa = (la[msw] & 0xfffff) | 0x100000, lsa = la[lsw];
-    ulong msb = (lb[msw] & 0xfffff) | 0x100000, lsb = lb[lsw];
-    uint qn[5];
-    int i;
-    ulong msq, lsq;
-    int expt = dx(la) - dx(lb) + dx_bias;
-
-    if (!(lb[msw] & 0x7fffffff)) {	/* Division by zero. */
-	raise(SIGFPE);
-	lc[lsw] = 0;
-	lc[msw] =
-	    (la[msw] & 0x7fffffff ?
-	     sign + 0x7ff00000 /* infinity */ :
-	     0x7ff80000 /* NaN */ );
-	return dc;
-    }
-    if (!(la[msw] & 0x7fffffff))
-	return 0;
-    for (i = 0; i < 5; ++i) {
-	uint q;
-	ulong msp, lsp;
-
-	msa = (msa << 11) + (lsa >> 21);
-	lsa <<= 11;
-	q = msa / msb;
-	/* We know that 2^20 <= msb < 2^21; q could be too high by 1, */
-	/* but it can't be too low. */
-	/* Set p = d * q. */
-	msp = q * msb;
-	lsp = q * (lsb & 0x1fffff);
-	{
-	    ulong midp = q * (lsb >> 21);
-
-	    msp += (midp + (lsp >> 21)) >> 11;
-	    lsp += midp << 21;
-	}
-	/* Set a = a - p, i.e., the tentative remainder. */
-	if (msp > msa || (lsp > lsa && msp == msa)) {	/* q was too large. */
-	    --q;
-	    if (lsb > lsp)
-		msp--;
-	    lsp -= lsb;
-	    msp -= msb;
-	}
-	if (lsp > lsa)
-	    msp--;
-	lsa -= lsp;
-	msa -= msp;
-	qn[i] = q;
-    }
-    /* Pack everything together again. */
-    msq = (qn[0] << 9) + (qn[1] >> 2);
-    lsq = (qn[1] << 30) + (qn[2] << 19) + (qn[3] << 8) + (qn[4] >> 3);
-    if (msq < 0x100000) {
-	msq = (msq << 1) + (lsq >> 31);
-	lsq <<= 1;
-	expt--;
-    }
-    /* We should round the quotient, but we don't. */
-    if (expt <= 0) {		/* Underflow.  Return 0 rather than a denorm. */
-	lc[msw] = sign;
-	lc[lsw] = 0;
-    } else if (expt >= 0x7ff) {	/* Overflow. */
-	raise(SIGFPE);
-	lc[msw] = sign + 0x7ff00000;
-	lc[lsw] = 0;
-    } else {
-	lc[msw] = sign + (expt << 20) + (msq & 0xfffff);
-	lc[lsw] = lsq;
-    }
-    return dc;
-}
-float
-__divsf3(float a, float b)
-{
-    return (float)((double)a / (double)b);
-}
-
-/* ---------------- Comparisons ---------------- */
-
-static int
-compared2(const long *pa, const long *pb)
-{
-#define upa ((const ulong *)pa)
-#define upb ((const ulong *)pb)
-    if (pa[msw] == pb[msw]) {
-	int result = (upa[lsw] < upb[lsw] ? -1 :
-		      upa[lsw] > upb[lsw] ? 1 : 0);
-
-	return (pa[msw] < 0 ? -result : result);
-    }
-    if ((pa[msw] & pb[msw]) < 0)
-	return (pa[msw] < pb[msw] ? 1 : -1);
-    /* We have to treat -0 and +0 specially. */
-    else if (!((pa[msw] | pb[msw]) & 0x7fffffff) && !(pa[lsw] | pb[lsw]))
-	return 0;
-    else
-	return (pa[msw] > pb[msw] ? 1 : -1);
-#undef upa
-#undef upb
-}
-
-/* 0 means true */
-int
-__eqdf2(double a, double b)
-{
-    return compared2(la, lb);
-}
-
-/* !=0 means true */
-int
-__nedf2(double a, double b)
-{
-    return compared2(la, lb);
-}
-
-/* >0 means true */
-int
-__gtdf2(double a, double b)
-{
-    return compared2(la, lb);
-}
-
-/* >=0 means true */
-int
-__gedf2(double a, double b)
-{
-    return compared2(la, lb);
-}
-
-/* <0 means true */
-int
-__ltdf2(double a, double b)
-{
-    return compared2(la, lb);
-}
-
-/* <=0 means true */
-int
-__ledf2(double a, double b)
-{
-    return compared2(la, lb);
-}
-
-static int
-comparef2(long va, long vb)
-{				/* We have to treat -0 and +0 specially. */
-    if (va == vb)
-	return 0;
-    if ((va & vb) < 0)
-	return (va < vb ? 1 : -1);
-    else if (!((va | vb) & 0x7fffffff))
-	return 0;
-    else
-	return (va > vb ? 1 : -1);
-}
-
-/* See the __xxdf2 functions above for the return values. */
-int
-__eqsf2(float a, float b)
-{
-    return comparef2(ia, ib);
-}
-int
-__nesf2(float a, float b)
-{
-    return comparef2(ia, ib);
-}
-int
-__gtsf2(float a, float b)
-{
-    return comparef2(ia, ib);
-}
-int
-__gesf2(float a, float b)
-{
-    return comparef2(ia, ib);
-}
-int
-__ltsf2(float a, float b)
-{
-    return comparef2(ia, ib);
-}
-int
-__lesf2(float a, float b)
-{
-    return comparef2(ia, ib);
-}
-
-/* ---------------- Conversion ---------------- */
-
-long
-__fixdfsi(double a)
-{				/* This routine does check for overflow. */
-    long i = (la[msw] & 0xfffff) + 0x100000;
-    int expt = dx(la) - dx_bias;
-
-    if (expt < 0)
-	return 0;
-    if (expt <= 20)
-	i >>= 20 - expt;
-    else if (expt >= 31 &&
-	     (expt > 31 || i != 0x100000 || la[msw] >= 0 ||
-	      ula[lsw] >= 1L << 21)
-	) {
-	raise(SIGFPE);
-	i = (la[msw] < 0 ? 0x80000000 : 0x7fffffff);
-    } else
-	i = (i << (expt - 20)) + (ula[lsw] >> (52 - expt));
-    return (la[msw] < 0 ? -i : i);
-}
-
-long
-__fixsfsi(float a)
-{				/* This routine does check for overflow. */
-    long i = (ia & 0x7fffff) + 0x800000;
-    int expt = fx(ia) - fx_bias;
-
-    if (expt < 0)
-	return 0;
-    if (expt <= 23)
-	i >>= 23 - expt;
-    else if (expt >= 31 && (expt > 31 || i != 0x800000 || ia >= 0)) {
-	raise(SIGFPE);
-	i = (ia < 0 ? 0x80000000 : 0x7fffffff);
-    } else
-	i <<= expt - 23;
-    return (ia < 0 ? -i : i);
-}
-
-double
-__floatsidf(long i)
-{
-    long msc;
-    ulong v;
-    long lc[2];
-
-    if (i > 0)
-	msc = 0x41e00000 - 0x100000, v = i;
-    else if (i < 0)
-	msc = 0xc1e00000 - 0x100000, v = -i;
-    else			/* i == 0 */
-	return 0;
-    while (v < 0x01000000)
-	v <<= 8, msc -= 0x00800000;
-    if (v < 0x10000000)
-	v <<= 4, msc -= 0x00400000;
-    while (v < 0x80000000)
-	v <<= 1, msc -= 0x00100000;
-    lc[msw] = msc + (v >> 11);
-    lc[lsw] = v << 21;
-    return dc;
-}
-
-float
-__floatsisf(long i)
-{
-    long lc;
-
-    if (i == 0)
-	lc = 0;
-    else {
-	ulong v;
-
-	if (i < 0)
-	    lc = 0xcf000000, v = -i;
-	else
-	    lc = 0x4f000000, v = i;
-	while (v < 0x01000000)
-	    v <<= 8, lc -= 0x04000000;
-	while (v < 0x80000000)
-	    v <<= 1, lc -= 0x00800000;
-	v = ((v >> 7) + 1) >> 1;
-	if (v > 0xffffff)
-	    v >>= 1, lc += 0x00800000;
-	lc += v & 0x7fffff;
-    }
-    return fc;
-}
-
-float
-__truncdfsf2(double a)
-{				/* This routine does check for overflow, but it converts */
-    /* underflows to zero rather than to a denormalized number. */
-    long lc;
-
-    if ((la[msw] & 0x7ff00000) < 0x38100000)
-	lc = la[msw] & 0x80000000;
-    else if ((la[msw] & 0x7ff00000) >= 0x47f00000) {
-	raise(SIGFPE);
-	lc = (la[msw] & 0x80000000) + 0x7f800000;	/* infinity */
-    } else {
-	lc = (la[msw] & 0xc0000000) +
-	    ((la[msw] & 0x07ffffff) << 3) +
-	    (ula[lsw] >> 29);
-	/* Round the mantissa.  Simply adding 1 works even if the */
-	/* mantissa overflows, because it increments the exponent and */
-	/* sets the mantissa to zero! */
-	if (ula[lsw] & 0x10000000)
-	    ++lc;
-    }
-    return fc;
-}
-
-double
-__extendsfdf2(float a)
-{
-    long lc[2];
-
-    if (!(ia & 0x7fffffff))
-	lc[msw] = ia, lc[lsw] = 0;
-    else
-	extend(lc, ia);
-    return dc;
-}
-
-/* ---------------- Test program ---------------- */
-
-#ifdef TEST
-
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-test(double v1)
-{
-    double v3 = v1 * 3;
-    double vh = v1 / 2;
-    double vd = v3 - vh;
-    double vdn = v1 - v3;
-
-    printf("%g=1 %g=3 %g=0.5 %g=2.5 %g=-2\n", v1, v3, vh, vd, vdn);
-    return 0;
-}
-
-float
-randf(void)
-{
-    int v = rand();
-
-    v = (v << 16) ^ rand();
-    if (!(v & 0x7f800000))
-	return 0;
-    if ((v & 0x7f800000) == 0x7f800000)
-	return randf();
-    return *(float *)&v;
-}
-
-int
-main(int argc, char *argv[])
-{
-    int i;
-
-    test(1.0);
-    for (i = 0; i < 10; ++i) {
-	float a = randf(), b = randf(), r;
-	int c;
-
-	switch ((rand() >> 12) & 3) {
-	    case 0:
-		r = a + b;
-		c = '+';
-		break;
-	    case 1:
-		r = a - b;
-		c = '-';
-		break;
-	    case 2:
-		r = a * b;
-		c = '*';
-		break;
-	    case 3:
-		if (b == 0)
-		    continue;
-		r = a / b;
-		c = '/';
-		break;
-	}
-	printf("0x%08x %c 0x%08x = 0x%08x\n",
-	       *(int *)&a, c, *(int *)&b, *(int *)&r);
-    }
-}
-
-/*
-   Results from compiling with hardware floating point:
-
-   1=1 3=3 0.5=0.5 2.5=2.5 -2=-2
-   0x6f409924 - 0x01faa67a = 0x6f409924
-   0x00000000 + 0x75418107 = 0x75418107
-   0xe32fab71 - 0xc88f7816 = 0xe32fab71
-   0x94809067 * 0x84ddaeee = 0x00000000
-   0x2b0a5b7d + 0x38f70f50 = 0x38f70f50
-   0xa5efcef3 - 0xc5dc1a2c = 0x45dc1a2c
-   0xe7124521 * 0x3f4206d2 = 0xe6ddb891
-   0x8d175f17 * 0x2ed2c1c0 = 0x80007c9f
-   0x419e7a6d / 0xf2f95a35 = 0x8e22b404
-   0xe0b2f48f * 0xc72793fc = 0x686a49f8
-
- */
-
-
-#endif

Modified: trunk/gs/src/gsjmorec.h
===================================================================
--- trunk/gs/src/gsjmorec.h	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/gsjmorec.h	2008-01-07 18:43:02 UTC (rev 8477)
@@ -21,15 +21,12 @@
 
 /* Remove unwanted / unneeded features. */
 #undef DCT_IFAST_SUPPORTED
-#if FPU_TYPE <= 0
-#  undef DCT_FLOAT_SUPPORTED
-#endif
 #undef C_MULTISCAN_FILES_SUPPORTED
 #undef C_PROGRESSIVE_SUPPORTED
 #undef ENTROPY_OPT_SUPPORTED
 #undef INPUT_SMOOTHING_SUPPORTED
+#undef DCT_FLOAT_SUPPORTED
 
-
 /* Progressive JPEG is required for PDF 1.3.
  * Don't undefine D_MULTISCAN_FILES_SUPPORTED and D_PROGRESSIVE_SUPPORTED
  */

Modified: trunk/gs/src/gsmisc.c
===================================================================
--- trunk/gs/src/gsmisc.c	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/gsmisc.c	2008-01-07 18:43:02 UTC (rev 8477)
@@ -606,169 +606,7 @@
 	 "\000\000\001\001\002\002\002\002\003\003\003\003\003\003\003\003"[m] + l);
 }
 
-#if defined(NEED_SET_FMUL2FIXED)
-
 /*
- * Floating multiply with fixed result, for avoiding floating point in
- * common coordinate transformations.  Assumes IEEE representation,
- * 16-bit short, 32-bit long.  Optimized for the case where the first
- * operand has no more than 16 mantissa bits, e.g., where it is a user space
- * coordinate (which are often integers).
- *
- * The assembly language version of this code is actually faster than
- * the FPU, if the code is compiled with FPU_TYPE=0 (which requires taking
- * a trap on every FPU operation).  If there is no FPU, the assembly
- * language version of this code is over 10 times as fast as the emulated FPU.
- */
-int
-set_fmul2fixed_(fixed * pr, long /*float */ a, long /*float */ b)
-{
-    ulong ma = (ushort)(a >> 8) | 0x8000;
-    ulong mb = (ushort)(b >> 8) | 0x8000;
-    int e = 260 + _fixed_shift - ( ((byte)(a >> 23)) + ((byte)(b >> 23)) );
-    ulong p1 = ma * (b & 0xff);
-    ulong p = ma * mb;
-
-#define p_bits (size_of(p) * 8)
-
-    if ((byte) a) {		/* >16 mantissa bits */
-	ulong p2 = (a & 0xff) * mb;
-
-	p += ((((uint) (byte) a * (uint) (byte) b) >> 8) + p1 + p2) >> 8;
-    } else
-	p += p1 >> 8;
-    if ((uint) e < p_bits)	/* e = -1 is possible */
-	p >>= e;
-    else if (e >= p_bits) {	/* also detects a=0 or b=0 */
-	*pr = fixed_0;
-	return 0;
-    } else if (e >= -(p_bits - 1) || p >= 1L << (p_bits - 1 + e))
-	return_error(gs_error_limitcheck);
-    else
-	p <<= -e;
-    *pr = ((a ^ b) < 0 ? -p : p);
-    return 0;
-}
-int
-set_dfmul2fixed_(fixed * pr, ulong /*double lo */ xalo, long /*float */ b, long /*double hi */ xahi)
-{
-    return set_fmul2fixed_(pr,
-			   (xahi & (3L << 30)) +
-			   ((xahi << 3) & 0x3ffffff8) +
-			   (xalo >> 29),
-			   b);
-}
-
-#endif /* NEED_SET_FMUL2FIXED */
-
-#if USE_FPU_FIXED
-
-/*
- * Convert from floating point to fixed point with scaling.
- * These are efficient algorithms for FPU-less machines.
- */
-#define mbits_float 23
-#define mbits_double 20
-int
-set_float2fixed_(fixed * pr, long /*float */ vf, int frac_bits)
-{
-    fixed mantissa;
-    int shift;
-
-    if (!(vf & 0x7f800000)) {
-	*pr = fixed_0;
-	return 0;
-    }
-    mantissa = (fixed) ((vf & 0x7fffff) | 0x800000);
-    shift = ((vf >> 23) & 255) - (127 + 23) + frac_bits;
-    if (shift >= 0) {
-	if (shift >= sizeof(fixed) * 8 - 24)
-	    return_error(gs_error_limitcheck);
-	if (vf < 0)
-	    mantissa = -mantissa;
-	*pr = (fixed) (mantissa << shift);
-    } else
-	*pr = (shift < -24 ? fixed_0 :
-	       vf < 0 ? -(fixed) (mantissa >> -shift) :		/* truncate */
-	       (fixed) (mantissa >> -shift));
-    return 0;
-}
-int
-set_double2fixed_(fixed * pr, ulong /*double lo */ lo,
-		  long /*double hi */ hi, int frac_bits)
-{
-    fixed mantissa;
-    int shift;
-
-    if (!(hi & 0x7ff00000)) {
-	*pr = fixed_0;
-	return 0;
-    }
-    /* We only use 31 bits of mantissa even if sizeof(long) > 4. */
-    mantissa = (fixed) (((hi & 0xfffff) << 10) | (lo >> 22) | 0x40000000);
-    shift = ((hi >> 20) & 2047) - (1023 + 30) + frac_bits;
-    if (shift > 0)
-	return_error(gs_error_limitcheck);
-    *pr = (shift < -30 ? fixed_0 :
-	   hi < 0 ? -(fixed) (mantissa >> -shift) :	/* truncate */
-	   (fixed) (mantissa >> -shift));
-    return 0;
-}
-/*
- * Given a fixed value x with fbits bits of fraction, set v to the mantissa
- * (left-justified in 32 bits) and f to the exponent word of the
- * corresponding floating-point value with mbits bits of mantissa in the
- * first word.  (The exponent part of f is biased by -1, because we add the
- * top 1-bit of the mantissa to it.)
- */
-static const byte f2f_shifts[] =
-{4, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0};
-
-#define f2f_declare(v, f)\
-	ulong v;\
-	long f
-#define f2f(x, v, f, mbits, fbits)\
-	if ( x < 0 )\
-	  f = 0xc0000000 + (29 << mbits) - ((long)fbits << mbits), v = -x;\
-	else\
-	  f = 0x40000000 + (29 << mbits) - ((long)fbits << mbits), v = x;\
-	if ( v < 0x8000 )\
-	  v <<= 15, f -= 15 << mbits;\
-	if ( v < 0x800000 )\
-	  v <<= 8, f -= 8 << mbits;\
-	if ( v < 0x8000000 )\
-	  v <<= 4, f -= 4 << mbits;\
-	{ int shift = f2f_shifts[v >> 28];\
-	  v <<= shift, f -= shift << mbits;\
-	}
-long
-fixed2float_(fixed x, int frac_bits)
-{
-    f2f_declare(v, f);
-
-    if (x == 0)
-	return 0;
-    f2f(x, v, f, mbits_float, frac_bits);
-    return f + (((v >> 7) + 1) >> 1);
-}
-void
-set_fixed2double_(double *pd, fixed x, int frac_bits)
-{
-    f2f_declare(v, f);
-
-    if (x == 0) {
-	((long *)pd)[1 - arch_is_big_endian] = 0;
-	((ulong *) pd)[arch_is_big_endian] = 0;
-    } else {
-	f2f(x, v, f, mbits_double, frac_bits);
-	((long *)pd)[1 - arch_is_big_endian] = f + (v >> 11);
-	((ulong *) pd)[arch_is_big_endian] = v << 21;
-    }
-}
-
-#endif				/* USE_FPU_FIXED */
-
-/*
  * Compute A * B / C when 0 <= B < C and A * B exceeds (or might exceed)
  * the capacity of a long.
  * Note that this procedure takes the floor, rather than truncating
@@ -789,7 +627,7 @@
 #define ROUND_BITS\
   (ARCH_SIZEOF_FIXED * 8 * 2 - ARCH_DOUBLE_MANTISSA_BITS)
 
-#if USE_FPU_FIXED || ROUND_BITS >= MAX_OTHER_FACTOR_BITS - 1
+#if ROUND_BITS >= MAX_OTHER_FACTOR_BITS - 1
 
 #ifdef DEBUG
 struct {
@@ -1012,199 +850,6 @@
     return orig_sqrt(x);
 }
 
-/*
- * Define sine and cosine functions that take angles in degrees rather than
- * radians, and that are implemented efficiently on machines with slow
- * (or no) floating point.
- */
-#if USE_FPU < 0			/****** maybe should be <= 0 ? ***** */
-
-#define sin0 0.00000000000000000
-#define sin1 0.01745240643728351
-#define sin2 0.03489949670250097
-#define sin3 0.05233595624294383
-#define sin4 0.06975647374412530
-#define sin5 0.08715574274765817
-#define sin6 0.10452846326765346
-#define sin7 0.12186934340514748
-#define sin8 0.13917310096006544
-#define sin9 0.15643446504023087
-#define sin10 0.17364817766693033
-#define sin11 0.19080899537654480
-#define sin12 0.20791169081775931
-#define sin13 0.22495105434386498
-#define sin14 0.24192189559966773
-#define sin15 0.25881904510252074
-#define sin16 0.27563735581699916
-#define sin17 0.29237170472273671
-#define sin18 0.30901699437494740
-#define sin19 0.32556815445715670
-#define sin20 0.34202014332566871
-#define sin21 0.35836794954530027
-#define sin22 0.37460659341591201
-#define sin23 0.39073112848927377
-#define sin24 0.40673664307580015
-#define sin25 0.42261826174069944
-#define sin26 0.43837114678907740
-#define sin27 0.45399049973954675
-#define sin28 0.46947156278589081
-#define sin29 0.48480962024633706
-#define sin30 0.50000000000000000
-#define sin31 0.51503807491005416
-#define sin32 0.52991926423320490
-#define sin33 0.54463903501502708
-#define sin34 0.55919290347074679
-#define sin35 0.57357643635104605
-#define sin36 0.58778525229247314
-#define sin37 0.60181502315204827
-#define sin38 0.61566147532565829
-#define sin39 0.62932039104983739
-#define sin40 0.64278760968653925
-#define sin41 0.65605902899050728
-#define sin42 0.66913060635885824
-#define sin43 0.68199836006249848
-#define sin44 0.69465837045899725
-#define sin45 0.70710678118654746
-#define sin46 0.71933980033865108
-#define sin47 0.73135370161917046
-#define sin48 0.74314482547739413
-#define sin49 0.75470958022277201
-#define sin50 0.76604444311897801
-#define sin51 0.77714596145697090
-#define sin52 0.78801075360672190
-#define sin53 0.79863551004729283
-#define sin54 0.80901699437494745
-#define sin55 0.81915204428899180
-#define sin56 0.82903757255504174
-#define sin57 0.83867056794542394
-#define sin58 0.84804809615642596
-#define sin59 0.85716730070211222
-#define sin60 0.86602540378443860
-#define sin61 0.87461970713939574
-#define sin62 0.88294759285892688
-#define sin63 0.89100652418836779
-#define sin64 0.89879404629916704
-#define sin65 0.90630778703664994
-#define sin66 0.91354545764260087
-#define sin67 0.92050485345244037
-#define sin68 0.92718385456678731
-#define sin69 0.93358042649720174
-#define sin70 0.93969262078590832
-#define sin71 0.94551857559931674
-#define sin72 0.95105651629515353
-#define sin73 0.95630475596303544
-#define sin74 0.96126169593831889
-#define sin75 0.96592582628906831
-#define sin76 0.97029572627599647
-#define sin77 0.97437006478523525
-#define sin78 0.97814760073380558
-#define sin79 0.98162718344766398
-#define sin80 0.98480775301220802
-#define sin81 0.98768834059513777
-#define sin82 0.99026806874157036
-#define sin83 0.99254615164132198
-#define sin84 0.99452189536827329
-#define sin85 0.99619469809174555
-#define sin86 0.99756405025982420
-#define sin87 0.99862953475457383
-#define sin88 0.99939082701909576
-#define sin89 0.99984769515639127
-#define sin90 1.00000000000000000
-
-static const double sin_table[361] =
-{
-    sin0,
-    sin1, sin2, sin3, sin4, sin5, sin6, sin7, sin8, sin9, sin10,
-    sin11, sin12, sin13, sin14, sin15, sin16, sin17, sin18, sin19, sin20,
-    sin21, sin22, sin23, sin24, sin25, sin26, sin27, sin28, sin29, sin30,
-    sin31, sin32, sin33, sin34, sin35, sin36, sin37, sin38, sin39, sin40,
-    sin41, sin42, sin43, sin44, sin45, sin46, sin47, sin48, sin49, sin50,
-    sin51, sin52, sin53, sin54, sin55, sin56, sin57, sin58, sin59, sin60,
-    sin61, sin62, sin63, sin64, sin65, sin66, sin67, sin68, sin69, sin70,
-    sin71, sin72, sin73, sin74, sin75, sin76, sin77, sin78, sin79, sin80,
-    sin81, sin82, sin83, sin84, sin85, sin86, sin87, sin88, sin89, sin90,
-    sin89, sin88, sin87, sin86, sin85, sin84, sin83, sin82, sin81, sin80,
-    sin79, sin78, sin77, sin76, sin75, sin74, sin73, sin72, sin71, sin70,
-    sin69, sin68, sin67, sin66, sin65, sin64, sin63, sin62, sin61, sin60,
-    sin59, sin58, sin57, sin56, sin55, sin54, sin53, sin52, sin51, sin50,
-    sin49, sin48, sin47, sin46, sin45, sin44, sin43, sin42, sin41, sin40,
-    sin39, sin38, sin37, sin36, sin35, sin34, sin33, sin32, sin31, sin30,
-    sin29, sin28, sin27, sin26, sin25, sin24, sin23, sin22, sin21, sin20,
-    sin19, sin18, sin17, sin16, sin15, sin14, sin13, sin12, sin11, sin10,
-    sin9, sin8, sin7, sin6, sin5, sin4, sin3, sin2, sin1, sin0,
-    -sin1, -sin2, -sin3, -sin4, -sin5, -sin6, -sin7, -sin8, -sin9, -sin10,
-    -sin11, -sin12, -sin13, -sin14, -sin15, -sin16, -sin17, -sin18, -sin19, -sin20,
-    -sin21, -sin22, -sin23, -sin24, -sin25, -sin26, -sin27, -sin28, -sin29, -sin30,
-    -sin31, -sin32, -sin33, -sin34, -sin35, -sin36, -sin37, -sin38, -sin39, -sin40,
-    -sin41, -sin42, -sin43, -sin44, -sin45, -sin46, -sin47, -sin48, -sin49, -sin50,
-    -sin51, -sin52, -sin53, -sin54, -sin55, -sin56, -sin57, -sin58, -sin59, -sin60,
-    -sin61, -sin62, -sin63, -sin64, -sin65, -sin66, -sin67, -sin68, -sin69, -sin70,
-    -sin71, -sin72, -sin73, -sin74, -sin75, -sin76, -sin77, -sin78, -sin79, -sin80,
-    -sin81, -sin82, -sin83, -sin84, -sin85, -sin86, -sin87, -sin88, -sin89, -sin90,
-    -sin89, -sin88, -sin87, -sin86, -sin85, -sin84, -sin83, -sin82, -sin81, -sin80,
-    -sin79, -sin78, -sin77, -sin76, -sin75, -sin74, -sin73, -sin72, -sin71, -sin70,
-    -sin69, -sin68, -sin67, -sin66, -sin65, -sin64, -sin63, -sin62, -sin61, -sin60,
-    -sin59, -sin58, -sin57, -sin56, -sin55, -sin54, -sin53, -sin52, -sin51, -sin50,
-    -sin49, -sin48, -sin47, -sin46, -sin45, -sin44, -sin43, -sin42, -sin41, -sin40,
-    -sin39, -sin38, -sin37, -sin36, -sin35, -sin34, -sin33, -sin32, -sin31, -sin30,
-    -sin29, -sin28, -sin27, -sin26, -sin25, -sin24, -sin23, -sin22, -sin21, -sin20,
-    -sin19, -sin18, -sin17, -sin16, -sin15, -sin14, -sin13, -sin12, -sin11, -sin10,
-    -sin9, -sin8, -sin7, -sin6, -sin5, -sin4, -sin3, -sin2, -sin1, -sin0
-};
-
-double
-gs_sin_degrees(double ang)
-{
-    int ipart;
-
-    if (is_fneg(ang))
-	ang = 180 - ang;
-    ipart = (int)ang;
-    if (ipart >= 360) {
-	int arem = ipart % 360;
-
-	ang -= (ipart - arem);
-	ipart = arem;
-    }
-    return
-	(ang == ipart ? sin_table[ipart] :
-	 sin_table[ipart] + (sin_table[ipart + 1] - sin_table[ipart]) *
-	 (ang - ipart));
-}
-
-double
-gs_cos_degrees(double ang)
-{
-    int ipart;
-
-    if (is_fneg(ang))
-	ang = 90 - ang;
-    else
-	ang += 90;
-    ipart = (int)ang;
-    if (ipart >= 360) {
-	int arem = ipart % 360;
-
-	ang -= (ipart - arem);
-	ipart = arem;
-    }
-    return
-	(ang == ipart ? sin_table[ipart] :
-	 sin_table[ipart] + (sin_table[ipart + 1] - sin_table[ipart]) *
-	 (ang - ipart));
-}
-
-void
-gs_sincos_degrees(double ang, gs_sincos_t * psincos)
-{
-    psincos->sin = gs_sin_degrees(ang);
-    psincos->cos = gs_cos_degrees(ang);
-    psincos->orthogonal =
-	(is_fzero(psincos->sin) || is_fzero(psincos->cos));
-}
-
-#else /* we have floating point */
-
 static const int isincos[5] =
 {0, 1, 0, -1, 0};
 
@@ -1262,8 +907,6 @@
     }
 }
 
-#endif /* USE_FPU */
-
 /*
  * Define an atan2 function that returns an angle in degrees and uses
  * the PostScript quadrant rules.  Note that it may return

Modified: trunk/gs/src/gxchar.c
===================================================================
--- trunk/gs/src/gxchar.c	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/gxchar.c	2008-01-07 18:43:02 UTC (rev 8477)
@@ -1241,7 +1241,6 @@
 	/* Normally, char_tm is valid because of show_state_setup, */
 	/* but if we're in a cshow, it may not be. */
 	gs_currentcharmatrix(pgs, NULL, true);
-#if 1				/*USE_FPU <= 0 */
 	if (pgs->ctm.txy_fixed_valid && pgs->char_tm.txy_fixed_valid) {
 	    fixed tx = pgs->ctm.tx_fixed;
 	    fixed ty = pgs->ctm.ty_fixed;
@@ -1249,9 +1248,7 @@
 	    gs_settocharmatrix(pgs);
 	    cpt.x += pgs->ctm.tx_fixed - tx;
 	    cpt.y += pgs->ctm.ty_fixed - ty;
-	} else
-#endif
-	{
+	} else 	{
 	    double tx = pgs->ctm.tx;
 	    double ty = pgs->ctm.ty;
 	    double fpx, fpy;
@@ -1500,14 +1497,12 @@
 	penum->obox.p.y = fixed2int_var(cbox.p.y);
 	penum->obox.q.x = fixed2int_var_ceiling(cbox.q.x);
 	penum->obox.q.y = fixed2int_var_ceiling(cbox.q.y);
-#if 1				/*USE_FPU <= 0 */
 	if (pgs->ctm.txy_fixed_valid && pgs->char_tm.txy_fixed_valid) {
 	    penum->ftx = (int)fixed2long(pgs->char_tm.tx_fixed -
 					 pgs->ctm.tx_fixed);
 	    penum->fty = (int)fixed2long(pgs->char_tm.ty_fixed -
 					 pgs->ctm.ty_fixed);
 	} else {
-#endif
 	    double fdx = pgs->char_tm.tx - pgs->ctm.tx;
 	    double fdy = pgs->char_tm.ty - pgs->ctm.ty;
 

Modified: trunk/gs/src/gxfarith.h
===================================================================
--- trunk/gs/src/gxfarith.h	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/gxfarith.h	2008-01-07 18:43:02 UTC (rev 8477)
@@ -17,107 +17,9 @@
 #ifndef gxfarith_INCLUDED
 #  define gxfarith_INCLUDED
 
-#include "std.h"		/* for USE_FPU */
 #include "gxarith.h"
 
 /*
- * The following macros replace the ones in gxarith.h on machines
- * that are likely to have very slow floating point.
- *
- * None of these macros would be necessary if compilers had a clue
- * about generating good floating point comparisons on machines with
- * slow (or no) floating point hardware.
- */
-
-# if USE_FPU <= 0 && ARCH_FLOATS_ARE_IEEE && (arch_sizeof_float == arch_sizeof_int || arch_sizeof_float == arch_sizeof_long)
-
-#  if arch_sizeof_float == arch_sizeof_int
-typedef int _f_int_t;
-typedef uint _f_uint_t;
-
-#  else				/* arch_sizeof_float == arch_sizeof_long */
-typedef long _f_int_t;
-typedef ulong _f_uint_t;
-
-#  endif
-#  define _f_as_int(f) *(const _f_int_t *)(&(f))
-#  define _f_as_uint(f) *(const _f_uint_t *)(&(f))
-
-#  if arch_sizeof_double == arch_sizeof_int
-#    define _d_int_t int
-#  else
-#   if arch_sizeof_double == arch_sizeof_long
-#    define _d_int_t long
-#   endif
-#  endif
-#  define _d_uint_t unsigned _d_int_t
-#  define _d_as_int(f) *(const _d_int_t *)(&(f))
-#  define _d_as_uint(f) *(const _d_uint_t *)(&(f))
-
-#  define _ftest(v,f,n)\
-     (sizeof(v)==sizeof(float)?(f):(n))
-#  ifdef _d_int_t
-#    define _fdtest(v,f,d,n)\
-	(sizeof(v)==sizeof(float)?(f):sizeof(v)==sizeof(double)?(d):(n))
-#  else
-#    define _fdtest(v,f,d,n)\
-	_ftest(v,f,n)
-#  endif
-
-#  undef is_fzero
-#  define is_fzero(f)	/* must handle both +0 and -0 */\
-     _fdtest(f, (_f_as_int(f) << 1) == 0, (_d_as_int(f) << 1) == 0,\
-       (f) == 0.0)
-
-#  undef is_fzero2
-#  define is_fzero2(f1,f2)\
-     (sizeof(f1) == sizeof(float) && sizeof(f2) == sizeof(float) ?\
-      ((_f_as_int(f1) | _f_as_int(f2)) << 1) == 0 :\
-      (f1) == 0.0 && (f2) == 0.0)
-
-#  undef is_fneg
-#  if arch_is_big_endian
-#    define _is_fnegb(f) (*(const byte *)&(f) >= 0x80)
-#  else
-#    define _is_fnegb(f) (((const byte *)&(f))[sizeof(f) - 1] >= 0x80)
-#  endif
-#  if arch_sizeof_float == arch_sizeof_int
-#    define is_fneg(f)\
-       (sizeof(f) == sizeof(float) ? _f_as_int(f) < 0 :\
-	_is_fnegb(f))
-#  else
-#    define is_fneg(f) _is_fnegb(f)
-#  endif
-
-#  define IEEE_expt 0x7f800000	/* IEEE exponent mask */
-#  define IEEE_f1 0x3f800000	/* IEEE 1.0 */
-
-#  undef is_fge1
-#  if arch_sizeof_float == arch_sizeof_int
-#    define is_fge1(f)\
-       (sizeof(f) == sizeof(float) ?\
-	(_f_as_int(f)) >= IEEE_f1 :\
-	(f) >= 1.0)
-#  else				/* arch_sizeof_float == arch_sizeof_long */
-#    define is_fge1(f)\
-       (sizeof(f) == sizeof(float) ?\
-	(int)(_f_as_int(f) >> 16) >= (IEEE_f1 >> 16) :\
-	(f) >= 1.0)
-#  endif
-
-#  undef f_fits_in_ubits
-#  undef f_fits_in_bits
-#  define _f_bits(n) (4.0 * (1L << ((n) - 2)))
-#  define f_fits_in_ubits(f, n)\
-	_ftest(f, _f_as_uint(f) < (_f_uint_t)IEEE_f1 + ((_f_uint_t)(n) << 23),\
-	  (f) >= 0 && (f) < _f_bits(n))
-#  define f_fits_in_bits(f, n)\
-	_ftest(f, (_f_as_uint(f) & IEEE_expt) < IEEE_f1 + ((_f_uint_t)((n)-1) << 23),\
-	  (f) >= -_f_bits((n)-1) && (f) < _f_bits((n)-1))
-
-# endif				/* USE_FPU <= 0 & ... */
-
-/*
  * Define sine and cosine functions that take angles in degrees rather than
  * radians, hit exact values at multiples of 90 degrees, and are implemented
  * efficiently on machines with slow (or no) floating point.

Modified: trunk/gs/src/gxfixed.h
===================================================================
--- trunk/gs/src/gxfixed.h	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/gxfixed.h	2008-01-07 18:43:02 UTC (rev 8477)
@@ -124,13 +124,6 @@
 #  define max_int_in_fixed max_int
 #  define min_int_in_fixed min_int
 #endif
-
-#ifdef USE_FPU
-#  define USE_FPU_FIXED (USE_FPU < 0 && ARCH_FLOATS_ARE_IEEE && arch_sizeof_long == 4)
-#else
-#  define USE_FPU_FIXED 0
-#endif
-
 /*
  * Define a macro for checking for overflow of the sum of two fixed values
  * and and setting the result to the sum if no overflow.
@@ -196,27 +189,7 @@
  *	if (code < 0) ...;
  *	FINISH_DFMUL2FIXED_VARS(R, dtemp);
  */
-#if USE_FPU_FIXED && arch_sizeof_short == 2
-#define NEED_SET_FMUL2FIXED
-int set_fmul2fixed_(fixed *, long, long);
-#define CHECK_FMUL2FIXED_VARS(vr, vfa, vfb, dtemp)\
-  set_fmul2fixed_(&vr, *(const long *)&vfa, *(const long *)&vfb)
-#define FINISH_FMUL2FIXED_VARS(vr, dtemp)\
-  DO_NOTHING
-int set_dfmul2fixed_(fixed *, ulong, long, long);
-#  if ARCH_IS_BIG_ENDIAN
-#  define CHECK_DFMUL2FIXED_VARS(vr, vda, vfb, dtemp)\
-     set_dfmul2fixed_(&vr, ((const ulong *)&vda)[1], *(const long *)&vfb, *(const long *)&vda)
-#  else
-#  define CHECK_DFMUL2FIXED_VARS(vr, vda, vfb, dtemp)\
-     set_dfmul2fixed_(&vr, *(const ulong *)&vda, *(const long *)&vfb, ((const long *)&vda)[1])
-#  endif
-#define FINISH_DFMUL2FIXED_VARS(vr, dtemp)\
-  DO_NOTHING
 
-#else /* don't bother */
-
-#undef NEED_SET_FMUL2FIXED
 #define CHECK_FMUL2FIXED_VARS(vr, vfa, vfb, dtemp)\
   (dtemp = (vfa) * (vfb),\
    (f_fits_in_bits(dtemp, fixed_int_bits) ? 0 :\
@@ -228,8 +201,6 @@
 #define FINISH_DFMUL2FIXED_VARS(vr, dtemp)\
   FINISH_FMUL2FIXED_VARS(vr, dtemp)
 
-#endif
-
 /*
  * set_float2fixed_vars(R, F) does the equivalent of R = float2fixed(F):
  *      R is a fixed, F is a float or a double.
@@ -239,38 +210,14 @@
  *      R is a double, V is a fixed, E is an int.
  * R and F must be variables, not expressions; V and E may be expressions.
  */
-#if USE_FPU_FIXED
-int set_float2fixed_(fixed *, long, int);
-int set_double2fixed_(fixed *, ulong, long, int);
 
 # define set_float2fixed_vars(vr,vf)\
-    (sizeof(vf) == sizeof(float) ?\
-     set_float2fixed_(&vr, *(const long *)&vf, fixed_fraction_bits) :\
-     set_double2fixed_(&vr, ((const ulong *)&vf)[ARCH_IS_BIG_ENDIAN],\
-		       ((const long *)&vf)[1 - ARCH_IS_BIG_ENDIAN],\
-		       fixed_fraction_bits))
-long fixed2float_(fixed, int);
-void set_fixed2double_(double *, fixed, int);
-
-/*
- * We need the (double *)&vf cast to prevent compile-time error messages,
- * even though the call will only be executed if vf has the correct type.
- */
-# define set_fixed2float_var(vf,x)\
-    (sizeof(vf) == sizeof(float) ?\
-     (*(long *)&vf = fixed2float_(x, fixed_fraction_bits), 0) :\
-     (set_fixed2double_((double *)&vf, x, fixed_fraction_bits), 0))
-#define set_ldexp_fixed2double(vd, x, exp)\
-  set_fixed2double_(&vd, x, -(exp))
-#else
-# define set_float2fixed_vars(vr,vf)\
     (f_fits_in_bits(vf, fixed_int_bits) ? (vr = float2fixed(vf), 0) :\
      gs_note_error(gs_error_limitcheck))
 # define set_fixed2float_var(vf,x)\
     (vf = fixed2float(x), 0)
 # define set_ldexp_fixed2double(vd, x, exp)\
     discard(vd = ldexp((double)(x), exp))
-#endif
 
 /* A point with fixed coordinates */
 typedef struct gs_fixed_point_s {

Modified: trunk/gs/src/lib.mak
===================================================================
--- trunk/gs/src/lib.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/lib.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -245,11 +245,6 @@
  $(gserrors_h)
 	$(GLCC) $(GLO_)gsargs.$(OBJ) $(C_) $(GLSRC)gsargs.c
 
-# FPU emulation
-# gsfemu is only used in FPU-less configurations, and currently only with gcc.
-$(GLOBJ)gsfemu.$(OBJ) : $(GLSRC)gsfemu.c $(AK) $(std_h)
-	$(GLCC) $(GLO_)gsfemu.$(OBJ) $(C_) $(GLSRC)gsfemu.c
-
 $(GLOBJ)gsmisc.$(OBJ) : $(GLSRC)gsmisc.c $(GXERR)\
  $(vmsmath_h)\
  $(ctype__h) $(malloc__h) $(math__h) $(memory__h) $(string__h)\

Modified: trunk/gs/src/macos-mcp.mak
===================================================================
--- trunk/gs/src/macos-mcp.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/macos-mcp.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -159,18 +159,6 @@
 LDFLAGS=
 EXTRALIBS=
 STDLIBS=
-
-# Define whether this platform has floating point hardware:
-#	FPU_TYPE=2 means floating point is faster than fixed point.
-# (This is the case on some RISCs with multiple instruction dispatch.)
-#	FPU_TYPE=1 means floating point is at worst only slightly slower
-# than fixed point.
-#	FPU_TYPE=0 means that floating point may be considerably slower.
-#	FPU_TYPE=-1 means that floating point is always much slower than
-# fixed point.
-
-FPU_TYPE=2
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.
 # No real sync in MacOS 8/9, so leave it at nosync

Modified: trunk/gs/src/macosx.mak
===================================================================
--- trunk/gs/src/macosx.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/macosx.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -303,18 +303,6 @@
 #XLIBS=Xt Xext X11
 XLIBS=
 
-# Define whether this platform has floating point hardware:
-#	FPU_TYPE=2 means floating point is faster than fixed point.
-# (This is the case on some RISCs with multiple instruction dispatch.)
-#	FPU_TYPE=1 means floating point is at worst only slightly slower
-# than fixed point.
-#	FPU_TYPE=0 means that floating point may be considerably slower.
-#	FPU_TYPE=-1 means that floating point is always much slower than
-# fixed point.
-
-# might as well be true on ppc
-FPU_TYPE=2
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.
 

Modified: trunk/gs/src/msvc32.mak
===================================================================
--- trunk/gs/src/msvc32.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/msvc32.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -587,27 +587,6 @@
 #CPU_TYPE=601
 !endif
 
-!if "$(CPU_FAMILY)"=="i386"
-
-# Intel(-compatible) processors are the only ones for which the CPU type
-# doesn't indicate whether a math coprocessor is present.
-# For Intel processors only, define the math coprocessor (FPU) type.
-# Options are -1 (optimize for no FPU), 0 (optimize for FPU present,
-# but do not require a FPU), 87, 287, or 387.
-# If you have a 486 or Pentium CPU, you should normally set FPU_TYPE to 387,
-# since most of these CPUs include the equivalent of an 80387 on-chip;
-# however, the 486SX and the Cyrix 486SLC do not have an on-chip FPU, so if
-# you have one of these CPUs and no external FPU, set FPU_TYPE to -1 or 0.
-# An xx87 option means that the executable will run only if a FPU
-# of that type (or higher) is available: this is NOT currently checked
-# at runtime.
-
-! ifndef FPU_TYPE
-FPU_TYPE=387
-! endif
-
-!endif
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.  Don't change this unless you really know
 # what you're doing.
@@ -692,21 +671,6 @@
 
 # ---------------------------- End of options ---------------------------- #
 
-# Derive values for FPU_TYPE for non-Intel processors.
-
-!if "$(CPU_FAMILY)"=="ppc"
-! if $(CPU_TYPE)>601
-FPU_TYPE=2
-! else
-FPU_TYPE=1
-! endif
-!endif
-
-!if "$(CPU_FAMILY)"=="alpha"
-# *** alpha *** This needs fixing
-FPU_TYPE=1
-!endif
-
 # Define the name of the makefile -- used in dependencies.
 
 MAKEFILE=$(PSSRCDIR)\msvc32.mak

Modified: trunk/gs/src/msvccmd.mak
===================================================================
--- trunk/gs/src/msvccmd.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/msvccmd.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -106,7 +106,7 @@
 !endif
 !endif
 
-!if $(FPU_TYPE)>0 && $(MSVC_VERSION)<5
+!if $(MSVC_VERSION)<5
 FPFLAGS=/FPi87
 !else
 FPFLAGS=

Modified: trunk/gs/src/msvclib.mak
===================================================================
--- trunk/gs/src/msvclib.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/msvclib.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -352,27 +352,6 @@
 #CPU_TYPE=601
 !endif
 
-!if "$(CPU_FAMILY)"=="i386"
-
-# Intel(-compatible) processors are the only ones for which the CPU type
-# doesn't indicate whether a math coprocessor is present.
-# For Intel processors only, define the math coprocessor (FPU) type.
-# Options are -1 (optimize for no FPU), 0 (optimize for FPU present,
-# but do not require a FPU), 87, 287, or 387.
-# If you have a 486 or Pentium CPU, you should normally set FPU_TYPE to 387,
-# since most of these CPUs include the equivalent of an 80387 on-chip;
-# however, the 486SX and the Cyrix 486SLC do not have an on-chip FPU, so if
-# you have one of these CPUs and no external FPU, set FPU_TYPE to -1 or 0.
-# An xx87 option means that the executable will run only if a FPU
-# of that type (or higher) is available: this is NOT currently checked
-# at runtime.
-
-! ifndef FPU_TYPE
-FPU_TYPE=387
-! endif
-
-!endif
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.  Don't change this unless you really know
 # what you're doing.
@@ -450,21 +429,6 @@
 
 # ---------------------------- End of options ---------------------------- #
 
-# Derive values for FPU_TYPE for non-Intel processors.
-
-!if "$(CPU_FAMILY)"=="ppc"
-! if $(CPU_TYPE)>601
-FPU_TYPE=2
-! else
-FPU_TYPE=1
-! endif
-!endif
-
-!if "$(CPU_FAMILY)"=="alpha"
-# *** alpha *** This needs fixing
-FPU_TYPE=1
-!endif
-
 # Define the name of the makefile -- used in dependencies.
 
 MAKEFILE=$(GLSRCDIR)\msvclib.mak

Modified: trunk/gs/src/openvms.mak
===================================================================
--- trunk/gs/src/openvms.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/openvms.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -547,5 +547,4 @@
 	$(EXP)$(ECHOGS_XE) -w $(gconfig__h) -x 23 define "HAVE_SYS_TIME_H"
 
 $(gconfigv_h) : $(TOP_MAKEFILES) $(ECHOGS_XE)
-	$(EXP)$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define "USE_FPU" 1
 	$(EXP)$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define "EXTEND_NAMES" 0$(EXTEND_NAMES)

Modified: trunk/gs/src/openvms.mmk
===================================================================
--- trunk/gs/src/openvms.mmk	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/openvms.mmk	2008-01-07 18:43:02 UTC (rev 8477)
@@ -555,5 +555,4 @@
 	$(EXP)$(ECHOGS_XE) -w $(gconfig__h) -x 23 define "HAVE_SYS_TIME_H"
 
 $(gconfigv_h) : $(TOP_MAKEFILES) $(ECHOGS_XE)
-	$(EXP)$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define "USE_FPU" 1
 	$(EXP)$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define "EXTEND_NAMES" 0$(EXTEND_NAMES)

Modified: trunk/gs/src/os2.mak
===================================================================
--- trunk/gs/src/os2.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/os2.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -219,17 +219,6 @@
 # EMX requires 386 or higher
 CPU_TYPE=386
 
-# Define the math coprocessor (FPU) type.
-# Options are -1 (optimize for no FPU), 0 (optimize for FPU present,
-# but do not require a FPU), 87, 287, or 387.
-# If CPU_TYPE is 486 or above, FPU_TYPE is implicitly set to 387,
-# since 486DX and later processors include the equivalent of an 80387 on-chip.
-# An xx87 option means that the executable will run only if a FPU
-# of that type (or higher) is available: this is NOT currently checked
-# at runtime.
-
-FPU_TYPE=387
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.  Don't change this unless you really know
 # what you're doing.
@@ -601,7 +590,6 @@
 	$(ECHOGS_XE) -w $(gconfig__h) /* This file deliberately left blank. */
 
 $(gconfigv_h): $(PSSRCDIR)\os2.mak $(TOP_MAKEFILES) $(ECHOGS_XE)
-	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define USE_FPU -x 2028 -q $(FPU_TYPE)-0 -x 29
 	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define EXTEND_NAMES 0$(EXTEND_NAMES)
 
 # ----------------------------- Main program ------------------------------ #

Modified: trunk/gs/src/siscale.c
===================================================================
--- trunk/gs/src/siscale.c	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/siscale.c	2008-01-07 18:43:02 UTC (rev 8477)
@@ -27,38 +27,6 @@
 
 /* ---------------- ImageScaleEncode/Decode ---------------- */
 
-/* Define whether to accumulate pixels in fixed or floating point. */
-#if USE_FPU <= 0
-
-	/* Accumulate pixels in fixed point. */
-
-typedef int PixelWeight;
-
-#  if ARCH_INTS_ARE_SHORT
-typedef long AccumTmp;
-#  else
-typedef int AccumTmp;
-#  endif
-
-/*
- *    The optimal scaling for fixed point arithmetic is a function of the
- *    size of AccumTmp type, the size if the input pixel, the size of the
- *    intermediate pixel (PixelTmp) and the size of the output pixel.  This
- *    is set by these definitions and the fraction_bits variables in the
- *    functions.
- */
-#define num_weight_bits\
-  ((sizeof(AccumTmp) - maxSizeofPixel) * 8 - (LOG2_MAX_ISCALE_SUPPORT + 1))
-#define numScaleBits  ((maxSizeofPixel - sizeof(PixelTmp)) * 8 )
-#define fixedScaleFactor  ((int) (1 << numScaleBits))
-#define scale_PixelWeight(factor) ((int)((factor) * (1 << num_weight_bits)))
-#define unscale_AccumTmp(atemp, fraction_bits) arith_rshift(atemp, fraction_bits)
-#define NEED_FRACTION_BITS
-
-#else /* USE_FPU > 0 */
-
-	/* Accumulate pixels in floating point. */
-
 typedef float PixelWeight;
 typedef double AccumTmp;
 
@@ -68,8 +36,6 @@
 #define unscale_AccumTmp(atemp, fraction_bits) ((int)(atemp + 0.5))
 /*#undef NEED_FRACTION_BITS*/
 
-#endif /* USE_FPU */
-
 /* Temporary intermediate values */
 typedef byte PixelTmp;
 typedef int PixelTmp2;		/* extra width for clamping sum */

Modified: trunk/gs/src/ugcclib.mak
===================================================================
--- trunk/gs/src/ugcclib.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/ugcclib.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -100,7 +100,6 @@
 XLIBDIR=
 XLIBS=Xt Xext X11
 
-FPU_TYPE=1
 SYNC=posync
 
 FEATURE_DEVS=$(GLD)dps2lib.dev $(GLD)psl2cs.dev $(GLD)cielib.dev\

Modified: trunk/gs/src/unix-end.mak
===================================================================
--- trunk/gs/src/unix-end.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/unix-end.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -64,7 +64,6 @@
 # The rule for gconfigv.h is here because it is shared between Unix and
 # DV/X environments.
 $(gconfigv_h): $(GLSRC)unix-end.mak $(TOP_MAKEFILES) $(ECHOGS_XE)
-	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define USE_FPU -x 2028 -q $(FPU_TYPE)-0 -x 29
 	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define EXTEND_NAMES 0$(EXTEND_NAMES)
 
 # Emacs tags maintenance.

Modified: trunk/gs/src/unix-gcc.mak
===================================================================
--- trunk/gs/src/unix-gcc.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/unix-gcc.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -300,17 +300,6 @@
 XLIBDIR=
 XLIBS=Xt Xext X11
 
-# Define whether this platform has floating point hardware:
-#	FPU_TYPE=2 means floating point is faster than fixed point.
-# (This is the case on some RISCs with multiple instruction dispatch.)
-#	FPU_TYPE=1 means floating point is at worst only slightly slower
-# than fixed point.
-#	FPU_TYPE=0 means that floating point may be considerably slower.
-#	FPU_TYPE=-1 means that floating point is always much slower than
-# fixed point.
-
-FPU_TYPE=1
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.
 

Modified: trunk/gs/src/unixansi.mak
===================================================================
--- trunk/gs/src/unixansi.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/unixansi.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -275,17 +275,6 @@
 XLIBDIR=
 XLIBS=Xt Xext X11
 
-# Define whether this platform has floating point hardware:
-#	FPU_TYPE=2 means floating point is faster than fixed point.
-# (This is the case on some RISCs with multiple instruction dispatch.)
-#	FPU_TYPE=1 means floating point is at worst only slightly slower
-# than fixed point.
-#	FPU_TYPE=0 means that floating point may be considerably slower.
-#	FPU_TYPE=-1 means that floating point is always much slower than
-# fixed point.
-
-FPU_TYPE=1
-
 # Define the .dev module that implements thread and synchronization
 # primitives for this platform.  Don't change this unless you really know
 # what you're doing.

Modified: trunk/gs/src/watclib.mak
===================================================================
--- trunk/gs/src/watclib.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/watclib.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -110,9 +110,6 @@
 !ifndef CPU_TYPE
 CPU_TYPE=386
 !endif
-!ifndef FPU_TYPE
-FPU_TYPE=0
-!endif
 
 !ifndef SYNC
 SYNC=winsync

Modified: trunk/gs/src/wccommon.mak
===================================================================
--- trunk/gs/src/wccommon.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/wccommon.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -25,7 +25,7 @@
 #	PLATFORM, MAKEFILE, AK, CC*, DEBUG, CP_, RM_, RMN_
 #   Configuration, internal, specific to DOS/Windows:
 #	TDEBUG, COMPDIR, LIBPATHS,
-#	CPU_TYPE, FPU_TYPE
+#	CPU_TYPE,
 
 # We want Unix-compatible behavior.  This is part of it.
 

Modified: trunk/gs/src/wctail.mak
===================================================================
--- trunk/gs/src/wctail.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/wctail.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -85,5 +85,4 @@
 	echo /* This file deliberately left blank. */ >$(gconfig__h)
 
 $(gconfigv_h): $(WCTAIL_MAK) $(TOP_MAKEFILES) $(ECHOGS_XE)
-	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define USE_FPU -x 2028 -q $(FPU_TYPE)-0 -x 29
 	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define EXTEND_NAMES 0$(EXTEND_NAMES)

Modified: trunk/gs/src/winlib.mak
===================================================================
--- trunk/gs/src/winlib.mak	2008-01-03 21:58:19 UTC (rev 8476)
+++ trunk/gs/src/winlib.mak	2008-01-07 18:43:02 UTC (rev 8477)
@@ -130,7 +130,6 @@
 	$(ECHOGS_XE) -w $(gconfig__h) -x 2f2a20 This file deliberately left blank. -x 2a2f
 
 $(gconfigv_h): $(TOP_MAKEFILES) $(ECHOGS_XE)
-	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define USE_FPU -x 2028 -q $(FPU_TYPE)-0 -x 29
 	$(ECHOGS_XE) -a $(gconfigv_h) -x 23 define EXTEND_NAMES 0$(EXTEND_NAMES)
 
 # -------------------------------- Library -------------------------------- #



More information about the gs-cvs mailing list