From f36348b34b4513bc127d1b740e48b72b69f17c01 Mon Sep 17 00:00:00 2001 From: Oleg Endo Date: Sun, 13 Nov 2011 23:00:10 +0000 Subject: re PR target/50694 (SH Target: SH2A little endian does not actually work) PR target/50694 * config/sh/sh.h (IS_LITTLE_ENDIAN_OPTION, UNSUPPORTED_SH2A): New macros. (DRIVER_SELF_SPECS): Use new macros to filter out unsupported options taking the default configuration into account. * gcc.target/sh/pr21255-2-ml.c: Skip if -mb or -m5* is specified. Remove redundant runtime checks. * gcc.target/sh/20080410-1.c: Skip if -mb is specified. Allow for other than -m4. Fix typos in comments. From-SVN: r181340 --- gcc/config/sh/sh.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'gcc/config') diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index cc26e05..1b98745 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -417,7 +417,23 @@ do { \ #define SH_DIV_STR_FOR_SIZE "call" #endif -#define DRIVER_SELF_SPECS "%{m2a:%{ml:%eSH2a does not support little-endian}}" +/* SH2A does not support little-endian. Catch such combinations + taking into account the default configuration. */ +#if TARGET_ENDIAN_DEFAULT == MASK_BIG_ENDIAN +#define IS_LITTLE_ENDIAN_OPTION "%{ml:" +#else +#define IS_LITTLE_ENDIAN_OPTION "%{!mb:" +#endif + +#if TARGET_CPU_DEFAULT & MASK_HARD_SH2A +#define UNSUPPORTED_SH2A IS_LITTLE_ENDIAN_OPTION \ +"%{m2a*|!m1:%{!m2*:%{!m3*:%{!m4*:{!m5*:%eSH2a does not support little-endian}}}}}}" +#else +#define UNSUPPORTED_SH2A IS_LITTLE_ENDIAN_OPTION \ +"%{m2a*:%eSH2a does not support little-endian}}" +#endif + +#define DRIVER_SELF_SPECS UNSUPPORTED_SH2A #define ASSEMBLER_DIALECT assembler_dialect -- cgit v1.1