low priority code cleanup needed for rs6000

mike stump mrs@windriver.com
Mon Jun 11 18:12:00 GMT 2001


In sysv4.h we have:

%{!msoft-float: %{!mhard-float: \
    %{mcpu=401: -D_SOFT_FLOAT} \
    %{mcpu=403: -D_SOFT_FLOAT} \
    %{mcpu=ec603e: -D_SOFT_FLOAT} \
    %{mcpu=801: -D_SOFT_FLOAT} \
    %{mcpu=821: -D_SOFT_FLOAT} \
    %{mcpu=823: -D_SOFT_FLOAT} \
    %{mcpu=860: -D_SOFT_FLOAT} \
    %{!mcpu*: %(cpp_float_default) }}}"

and in rs6000.c we have:

	 {"401", PROCESSOR_PPC403,
	    MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS,
	    POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64},
	 {"403", PROCESSOR_PPC403,
	    MASK_POWERPC | MASK_SOFT_FLOAT | MASK_NEW_MNEMONICS | MASK_STRICT_ALIGN,
	    POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64},
	 {"505", PROCESSOR_MPCCORE,
	    MASK_POWERPC | MASK_NEW_MNEMONICS,
	    POWER_MASKS | POWERPC_OPT_MASKS | MASK_POWERPC64},

yet this is the same information, just replicated twice.  This is bad.
If someone adds support for a new chip that doesn't have FP, say, the
405 to be concrete and forgets to update the first list, bad things
happen.  It would be nice if someone could point to a better design,
and if someone could push this port in that direction based upon that
information.

Thanks.



More information about the Gcc-bugs mailing list