This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/RFA] Generic big/little-endian handling for SH


This comes out of a discussion Joern and I had about the NetBSD SH
configuration.  What is does is allow the default byte order of the
target to be selected by including sh/little.h before the other tm
files (not unlike how the MIPS target works).  It also provides generic
big/little-endian tmake files that set the other byte order for multilib.

OK to commit?

	* config/sh/little.h: New file.
	* config/sh/sh.h (TARGET_ENDIAN_DEFAULT): If not already
	defined, define to 0 to select big-endian.
	(target_flags): Move the extern and the bit definitions
	further up the file so that they're available for testing
	by the preprocessor.
	(SUBTARGET_CPP_ENDIAN_SPEC): Provide defaults for big-
	and little-endian.
	(SUBTARGET_ASM_ENDIAN_SPEC): Likewise.
	(TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT.
	* config/sh/sh64.h (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT.
	* config/sh/t-be: New file.
	* config/sh/t-le: New file.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

Attachment: sh-patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]