[PATCH] Prepare for the VAX architecture

Peter S. Mazinger ps.m at gmx.net
Thu Jan 26 10:41:46 UTC 2006


On Wed, 25 Jan 2006, Jan-Benedict Glaw wrote:

> +config TARGET_HAS_SIGNED_ZERO_FLOATS
> +	bool "    Target CPU differs between +0.0 and -0.0"
> +	default y if !TARGET_vax
> +	default n if TARGET_vax
> +	depends on UCLIBC_HAS_FLOATS
> +	help
> +	  If your target CPU can differ +0.0 and -0.0 (IEEE floating point
> +	  support works that way), then you should enable this option.
> +
> +	  Most people will answer Y, because nearly all CPUs do use IEEE
> +	  floating point support. VAX CPUs are the rare exception, because
> +	  they're older than the IEEE standards for floating point
> +	  representation.
> +
> diff -Nurp src-uclibc-fresh/libc/stdio/_fpmaxtostr.c src-uclibc-hacked/libc/stdio/_fpmaxtostr.c
> --- src-uclibc-fresh/libc/stdio/_fpmaxtostr.c	2006-01-22 16:49:49.000000000 +0100
> +++ src-uclibc-hacked/libc/stdio/_fpmaxtostr.c	2006-01-25 22:45:09.000000000 +0100
> @@ -280,11 +280,11 @@ ssize_t attribute_hidden _fpmaxtostr(FIL
>  	}
>  
>  	if (x == 0) {				/* Handle 0 now to avoid false positive. */
> -#if 1
> +#ifdef __TARGET_HAS_SIGNED_ZERO_FLOATS__
>  		if (zeroisnegative(x)) { /* Handle 'signed' zero. */
>  			*sign_str = '-';
>  		}
> -#endif
> +#endif /* __TARGET_HAS_SIGNED_ZERO_FLOATS__ */
>  		exp = -1;
>  		goto GENERATE_DIGITS;
>  	}

relevant is only above. We began to use bits/uClibc_arch_features.h. If 
there is no cpu that uses both, I wouldn't make it a config option at all, 
add #define ...some... or #undef ...some... to those files

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list