[ColdFire 18/63] Configuration cleanups

Jeffrey Law law@redhat.com
Wed Jan 10 18:51:00 GMT 2007


On Wed, 2007-01-10 at 11:15 +0000, Richard Sandiford wrote:
> This patch just cleans up some of the configuration header files a little.
> Specifically:
> 
>   - m68k.h defines PCC_STATIC_STRUCT_RETURN, but then every port except
>     openbsd undefines it again.  It would be simpler to define
>     PCC_STATIC_STRUCT_RETURN in openbsd and remove the rest.
> 
>     It isn't clear whether the openbsd behaviour is intentional or not,
>     but I'd rather not change it as I have no way of testing it.
> 
>   - REGISTER_PREFIX_MD is never used.
> 
>   - m68k-none.h's CC1_SPEC is not needed because "" is the default.
> 
>   - m68020-elf.h's LIB_SPEC is not needed.  The file is always included
>     after m68kemb.h, and its identical definition of LIB_SPEC still holds
>     when m68020-elf.h is included.
> 
>   - In the same way, m68k/linux.h's definition of SIZE_TYPE,
>     PTRDIFF_TYPE, WCHAR_TYPE and WCHAR_TYPE_SIZE are redundant
>     with the svr4.h definitions.  Its TARGET_OBJFMT_CPP_BUILTINS
>     is redundant with the elfos.h definition.  Its DBX_REGISTER_NUMBER
>     is redundant with the m68k.h definition.
> 
>   - The linux.h definition of TARGET_OS_CPP_BUILTINS includes some
>     mc680*0 macros.  This code is redundant with TARGET_CPU_CPP_BUILTINS
>     and m68020 is not correct for ColdFire targets.
> 
>   - m68k-elf.h's and netbsd-elf's IMMEDIATE_PREFIX definitions are not
>     needed because "#" is the default.
> 
>   - m68k-elf.h's BSS_ASM_OP isn't needed because the macro is never used.
> 
>   - Likewise m68k-none's CPP_SUBTARGET_SPEC.
> 
>   - m68k-elf.h's NO_DOLLAR_IN_LABEL, ASM_OUTPUT_SKIP and ASM_OUTPUT_ASCII
>     are dead because elfos.h overrides them.  (I can imagine that the
>     include order used to be the other way around, so I'm not sure how
>     intentional the current situation is.  We haven't seen any problems
>     with it here though.)
> 
>   - Several files define ASM_OUTPUT_REG_PUSH and ASM_OUTPUT_REG_POP,
>     but these definitions are really just hard-coding a choice of
>     assembly dialect.  We can make m68k.h define the macros for all
>     configurations and use MOTOROLA to choose the appropriate form.
> 
> Richard
> 
> 
> gcc/
> 200x-xx-xx  Richard Sandiford  <richard@codesourcery.com>
> 	    Nathan Sidwell  <nathan@codesourcery.com>
> 
> 	* config/m68k/m68k.h (PCC_STATIC_STRUCT_RETURN): Delete.
> 	(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Add MOTOROLA cases.
> 	* config/m68k/coff.h (REGISTER_PREFIX_MD): Delete.
> 	* config/m68k/m68020-elf.h (LIB_SPEC): Delete.
> 	* config/m68k/m68k-none.h (CC1_SPEC, CPP_SUBTARGET_SPEC): Delete.
> 	* config/m68k/m68kelf.h (IMMEDIATE_PREFIX, REGISTER_PREFIX_MD)
> 	(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Delete.
> 	(NO_DOLLAR_IN_LABEL, PCC_STATIC_STRUCT_RETURN): Don't undefine.
> 	(BSS_ASM_OP, ASM_OUTPUT_SKIP, ASM_OUTPUT_ASCII): Delete.
> 	* config/m68k/m68kemb.h (PCC_STATIC_STRUCT_RETURN): Don't undefine.
> 	* config/m68k/linux.h (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE)
> 	(WCHAR_TYPE_SIZE, TARGET_OBJFMT_CPP_BUILTINS): Delete.
> 	(TARGET_OS_CPP_BUILTINS): Don't define mc68000 and mc68020 here.
> 	(DBX_REGISTER_NUMBER): Delete.
> 	* config/m68k/netbsd-elf.h (IMMEDIATE_PREFIX): Delete.
> 	(PCC_STATIC_STRUCT_RETURN): Don't undefine.
> 	* config/m68k/openbsd.h (PCC_STATIC_STRUCT_RETURN): Define.
OK.
Jeff




More information about the Gcc-patches mailing list