[gs-cvs] rev 8465 - trunk/gs/src
giles at ghostscript.com
giles at ghostscript.com
Fri Dec 28 18:53:22 PST 2007
Author: giles
Date: 2007-12-28 18:53:21 -0800 (Fri, 28 Dec 2007)
New Revision: 8465
Modified:
trunk/gs/src/genarch.c
trunk/gs/src/gxbitops.h
trunk/gs/src/gxshade.c
trunk/gs/src/std.h
Log:
Remove the ARCH_CAN_SHIFT_FULL_LONG define and its derivatives. Bug 689611.
Details:
This was only used in one place, in an attempt to support
non-portable code. However this caused problems with recent
gcc's which optimized the test one way and the code in gxshade.c
another. We're therefore removing it entirely and just using
portable code.
Modified: trunk/gs/src/genarch.c
===================================================================
--- trunk/gs/src/genarch.c 2007-12-27 22:28:36 UTC (rev 8464)
+++ trunk/gs/src/genarch.c 2007-12-29 02:53:21 UTC (rev 8465)
@@ -230,11 +230,6 @@
2);
define_int(f, "ARCH_ARITH_RSHIFT", ars);
/*
- * Some machines can't handle a variable shift by
- * the full width of a long.
- */
- define_int(f, "ARCH_CAN_SHIFT_FULL_LONG", um1 >> lwidth == 0);
- /*
* Determine whether dividing a negative integer by a positive one
* takes the floor or truncates toward zero.
*/
Modified: trunk/gs/src/gxbitops.h
===================================================================
--- trunk/gs/src/gxbitops.h 2007-12-27 22:28:36 UTC (rev 8464)
+++ trunk/gs/src/gxbitops.h 2007-12-29 02:53:21 UTC (rev 8465)
@@ -73,11 +73,6 @@
#define chi_bits(ct,n) (ct)(~(ct)1 << (cbits(ct)-1 - (n)))
# define chunk_hi_bits(n) chi_bits(chunk,n)
-/* Define whether this is a machine where chunks are long, */
-/* but the machine can't shift a long by its full width. */
-#define arch_cant_shift_full_chunk\
- (ARCH_IS_BIG_ENDIAN && !ARCH_INTS_ARE_SHORT && !ARCH_CAN_SHIFT_FULL_LONG)
-
/* Pointer arithmetic macros. */
#define inc_ptr(ptr,delta)\
(ptr = (void *)((byte *)ptr + (delta)))
Modified: trunk/gs/src/gxshade.c
===================================================================
--- trunk/gs/src/gxshade.c 2007-12-27 22:28:36 UTC (rev 8464)
+++ trunk/gs/src/gxshade.c 2007-12-29 02:53:21 UTC (rev 8465)
@@ -166,12 +166,8 @@
{
uint value;
int code = cs->get_value(cs, num_bits, &value);
-#if ARCH_CAN_SHIFT_FULL_LONG
- double max_value = (double)(uint) ((1 << num_bits) - 1);
-#else
double max_value = (double)(uint)
(num_bits == sizeof(uint) * 8 ? ~0 : ((1 << num_bits) - 1));
-#endif
if (code < 0)
return code;
Modified: trunk/gs/src/std.h
===================================================================
--- trunk/gs/src/std.h 2007-12-27 22:28:36 UTC (rev 8464)
+++ trunk/gs/src/std.h 2007-12-29 02:53:21 UTC (rev 8465)
@@ -37,7 +37,6 @@
#define arch_sizeof_double ARCH_SIZEOF_DOUBLE
#define arch_is_big_endian ARCH_IS_BIG_ENDIAN
#define arch_arith_rshift ARCH_ARITH_RSHIFT
-#define arch_can_shift_full_long ARCH_CAN_SHIFT_FULL_LONG
/*
* Define the alignment that the memory manager must preserve.
* We assume all alignment moduli are powers of 2.
More information about the gs-cvs
mailing list