diff options
Diffstat (limited to 'gcc/config/h8300/h8300.h')
-rw-r--r-- | gcc/config/h8300/h8300.h | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h index 50dd7e7..bf20ce2 100644 --- a/gcc/config/h8300/h8300.h +++ b/gcc/config/h8300/h8300.h @@ -23,11 +23,6 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_H8300_H #define GCC_H8300_H -/* Which CPU to compile for. - We use int for CPU_TYPE to avoid lots of casts. */ -#if 0 /* defined in insn-attr.h, here for documentation */ -enum attr_cpu { CPU_H8300, CPU_H8300H }; -#endif extern int cpu_type; /* Various globals defined in h8300.c. */ @@ -57,7 +52,7 @@ extern const char * const *h8_reg_names; builtin_define ("__NORMAL_MODE__"); \ } \ } \ - else if (TARGET_H8300H) \ + else \ { \ builtin_define ("__H8300H__"); \ builtin_assert ("cpu=h8300h"); \ @@ -67,12 +62,6 @@ extern const char * const *h8_reg_names; builtin_define ("__NORMAL_MODE__"); \ } \ } \ - else \ - { \ - builtin_define ("__H8300__"); \ - builtin_assert ("cpu=h8300"); \ - builtin_assert ("machine=h8300"); \ - } \ } \ while (0) @@ -81,7 +70,6 @@ extern const char * const *h8_reg_names; /* Macros used in the machine description to test the flags. */ /* Select between the H8/300 and H8/300H CPUs. */ -#define TARGET_H8300 (! TARGET_H8300H && ! TARGET_H8300S) #define TARGET_H8300S (TARGET_H8300S_1 || TARGET_H8300SX) /* Some multiply instructions are not available in all H8SX variants. Use this macro instead of TARGET_H8300SX to indicate this, even @@ -114,7 +102,7 @@ extern const char * const *h8_reg_names; /* Default target_flags if no switches specified. */ #ifndef TARGET_DEFAULT -#define TARGET_DEFAULT (MASK_QUICKCALL) +#define TARGET_DEFAULT (MASK_H8300H | MASK_QUICKCALL) #endif /* We want dwarf2 info available to gdb. */ @@ -154,7 +142,7 @@ extern const char * const *h8_reg_names; #define MAX_BITS_PER_WORD 32 /* Width of a word, in units (bytes). */ -#define UNITS_PER_WORD (TARGET_H8300H || TARGET_H8300S ? 4 : 2) +#define UNITS_PER_WORD 4 #define MIN_UNITS_PER_WORD 2 #define SHORT_TYPE_SIZE 16 @@ -168,7 +156,7 @@ extern const char * const *h8_reg_names; #define MAX_FIXED_MODE_SIZE 32 /* Allocation boundary (in *bits*) for storing arguments in argument list. */ -#define PARM_BOUNDARY (TARGET_H8300H || TARGET_H8300S ? 32 : 16) +#define PARM_BOUNDARY 32 /* Allocation boundary (in *bits*) for the code of a function. */ #define FUNCTION_BOUNDARY 16 @@ -182,10 +170,10 @@ extern const char * const *h8_reg_names; /* No data type wants to be aligned rounder than this. 32-bit values are aligned as such on the H8/300H and H8S for speed. */ #define BIGGEST_ALIGNMENT \ -(((TARGET_H8300H || TARGET_H8300S) && ! TARGET_ALIGN_300) ? 32 : 16) +((! TARGET_ALIGN_300) ? 32 : 16) -/* The stack goes in 16/32 bit lumps. */ -#define STACK_BOUNDARY (TARGET_H8300 ? 16 : 32) +/* The stack goes in 32 bit lumps. */ +#define STACK_BOUNDARY 32 /* Define this if move instructions will actually fail to work when given unaligned data. */ @@ -478,8 +466,8 @@ struct cum_arg (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ || (GET_CODE (X) == CONST_INT \ /* We handle signed and unsigned offsets here. */ \ - && INTVAL (X) > (TARGET_H8300 ? -0x10000 : -0x1000000) \ - && INTVAL (X) < (TARGET_H8300 ? 0x10000 : 0x1000000)) \ + && INTVAL (X) > -0x1000000 \ + && INTVAL (X) < 0x1000000) \ || (GET_CODE (X) == HIGH || GET_CODE (X) == CONST)) /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx @@ -530,7 +518,7 @@ struct cum_arg /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ -#define MOVE_MAX (TARGET_H8300H || TARGET_H8300S ? 4 : 2) +#define MOVE_MAX 4 #define MAX_MOVE_MAX 4 /* Nonzero if access to memory by bytes is slow and undesirable. */ @@ -545,18 +533,18 @@ struct cum_arg After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */ #define Pmode \ - ((TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL_MODE ? SImode : HImode) + (!TARGET_NORMAL_MODE ? SImode : HImode) /* ANSI C types. We use longs for the H8/300H and the H8S because ints can be 16 or 32. GCC requires SIZE_TYPE to be the same size as pointers. */ #define SIZE_TYPE \ - (TARGET_H8300 || TARGET_NORMAL_MODE ? TARGET_INT32 ? "short unsigned int" : "unsigned int" : "long unsigned int") + (TARGET_NORMAL_MODE ? TARGET_INT32 ? "short unsigned int" : "unsigned int" : "long unsigned int") #define PTRDIFF_TYPE \ - (TARGET_H8300 || TARGET_NORMAL_MODE ? TARGET_INT32 ? "short int" : "int" : "long int") + (TARGET_NORMAL_MODE ? TARGET_INT32 ? "short int" : "int" : "long int") #define POINTER_SIZE \ - ((TARGET_H8300H || TARGET_H8300S) && !TARGET_NORMAL_MODE ? 32 : 16) + (!TARGET_NORMAL_MODE ? 32 : 16) #define WCHAR_TYPE "short unsigned int" #define WCHAR_TYPE_SIZE 16 @@ -611,7 +599,7 @@ struct cum_arg /* The assembler op to get a word, 2 bytes for the H8/300, 4 for H8/300H. */ #define ASM_WORD_OP \ - (TARGET_H8300 || TARGET_NORMAL_MODE ? "\t.word\t" : "\t.long\t") + (TARGET_NORMAL_MODE ? "\t.word\t" : "\t.long\t") #define TEXT_SECTION_ASM_OP "\t.section .text" #define DATA_SECTION_ASM_OP "\t.section .data" |