--- gcc/config/m88k/m88k.h 2018/04/24 18:10:23 1.1.1.1 +++ gcc/config/m88k/m88k.h 2018/04/24 18:13:54 1.1.1.2 @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. Motorola m88100 in an 88open OCS/BCS environment. - Copyright (C) 1988, 1989, 1990, 1991 Free Software Foundation, Inc. + Copyright (C) 1988, 1989, 1990, 1991, 1993 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@mcc.com) Enhanced by Michael Meissner (meissner@osf.org) Version 2 port by Tom Wood (Tom_Wood@NeXT.com) @@ -207,7 +207,7 @@ extern char * reg_names[]; /* Names to predefine in the preprocessor for this target machine. Redefined in m88kv3.h, m88kv4.h, m88kdgux.h, and m88kluna.h. */ -#define CPP_PREDEFINES "-Dm88000 -Dm88k -Dunix -D__CLASSIFY_TYPE__=2" +#define CPP_PREDEFINES "-Dm88000 -Dm88k -Dunix -D__CLASSIFY_TYPE__=2 -Asystem(unix) -Acpu(m88k) -Amachine(m88k)" #define TARGET_VERSION fprintf (stderr, " (%s%s)", \ VERSION_INFO1, VERSION_INFO2) @@ -241,13 +241,11 @@ extern char * reg_names[]; #define MASK_IDENTIFY_REVISION 0x00001000 /* Emit ident, with GCC rev */ #define MASK_WARN_PASS_STRUCT 0x00002000 /* Warn about passed structs */ #define MASK_OPTIMIZE_ARG_AREA 0x00004000 /* Save stack space */ -#define MASK_SERIALIZE_VOLATILE 0x00008000 /* Serialize volatile refs */ -#define MASK_NO_SERIALIZE_VOLATILE 0x00010000 /* Don't serialize */ +#define MASK_NO_SERIALIZE_VOLATILE 0x00008000 /* Serialize volatile refs */ #define MASK_88000 (MASK_88100 | MASK_88110) #define MASK_EITHER_LARGE_SHIFT (MASK_TRAP_LARGE_SHIFT | \ MASK_HANDLE_LARGE_SHIFT) -#define MASK_SERIALIZE (MASK_SERIALIZE_VOLATILE | MASK_NO_SERIALIZE_VOLATILE) #define TARGET_88100 ((target_flags & MASK_88000) == MASK_88100) #define TARGET_88110 ((target_flags & MASK_88000) == MASK_88110) @@ -265,7 +263,7 @@ extern char * reg_names[]; #define TARGET_IDENTIFY_REVISION (target_flags & MASK_IDENTIFY_REVISION) #define TARGET_WARN_PASS_STRUCT (target_flags & MASK_WARN_PASS_STRUCT) #define TARGET_OPTIMIZE_ARG_AREA (target_flags & MASK_OPTIMIZE_ARG_AREA) -#define TARGET_SERIALIZE_VOLATILE (target_flags & MASK_SERIALIZE_VOLATILE) +#define TARGET_SERIALIZE_VOLATILE (!(target_flags & MASK_NO_SERIALIZE_VOLATILE)) #define TARGET_EITHER_LARGE_SHIFT (target_flags & MASK_EITHER_LARGE_SHIFT) @@ -295,8 +293,8 @@ extern char * reg_names[]; { "warn-passed-structs", MASK_WARN_PASS_STRUCT }, \ { "optimize-arg-area", MASK_OPTIMIZE_ARG_AREA }, \ { "no-optimize-arg-area", -MASK_OPTIMIZE_ARG_AREA }, \ - { "serialize-volatile", MASK_SERIALIZE_VOLATILE }, \ { "no-serialize-volatile", MASK_NO_SERIALIZE_VOLATILE }, \ + { "serialize-volatile", -MASK_NO_SERIALIZE_VOLATILE }, \ SUBTARGET_SWITCHES \ /* Default switches */ \ { "", TARGET_DEFAULT }, \ @@ -322,12 +320,6 @@ extern char * reg_names[]; m88k_cpu = (TARGET_88000 ? CPU_M88000 \ : (TARGET_88100 ? CPU_M88100 : CPU_M88110)); \ \ - if (! TARGET_88100 && (target_flags & MASK_SERIALIZE) == 0) \ - target_flags |= MASK_SERIALIZE_VOLATILE; \ - \ - if ((target_flags & MASK_NO_SERIALIZE_VOLATILE) != 0) \ - target_flags &= ~MASK_SERIALIZE_VOLATILE; \ - \ if (TARGET_BIG_PIC) \ flag_pic = 2; \ \ @@ -1256,6 +1248,12 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE /*** Addressing Modes ***/ +#define EXTRA_CC_MODES CCEVENmode + +#define EXTRA_CC_NAMES "CCEVEN" + +#define SELECT_CC_MODE(OP,X,Y) CCmode + /* #define HAVE_POST_INCREMENT */ /* #define HAVE_POST_DECREMENT */ @@ -1459,7 +1457,11 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE {"add_operand", {SUBREG, REG, CONST_INT}}, \ {"reg_or_bbx_mask_operand", {SUBREG, REG, CONST_INT}}, \ {"real_or_0_operand", {SUBREG, REG, CONST_DOUBLE}}, \ + {"reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \ {"relop", {EQ, NE, LT, LE, GE, GT, LTU, LEU, GEU, GTU}}, \ + {"even_relop", {EQ, LT, GT, LTU, GTU}}, \ + {"odd_relop", { NE, LE, GE, LEU, GEU}}, \ + {"partial_ccmode_register_operand", { SUBREG, REG}}, \ {"relop_no_unsigned", {EQ, NE, LT, LE, GE, GT}}, \ {"equality_op", {EQ, NE}}, \ {"pc_or_label_ref", {PC, LABEL_REF}}, @@ -1515,9 +1517,15 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE in one reasonably fast instruction. */ #define MOVE_MAX 8 -/* Define if normal loads of shorter-than-word items from memory clears - the rest of the bigs in the register. */ -#define BYTE_LOADS_ZERO_EXTEND +/* Define if operations between registers always perform the operation + on the full register even if a narrower mode is specified. */ +#define WORD_REGISTER_OPERATIONS + +/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD + will either zero-extend or sign-extend. The value of this macro should + be the code that says which one of the two operations is implicitly + done, NIL if none. */ +#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND /* Zero if access to memory by bytes is faster. */ #define SLOW_BYTE_ACCESS 1 @@ -1820,7 +1828,10 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE #undef ASM_FILE_END #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \ - fprintf (FILE, "\t%s\t \"%s\"\n", FILE_ASM_OP, NAME) + do { fprintf (FILE, "\t%s\t ", FILE_ASM_OP); \ + output_quoted_string (FILE, NAME); \ + fprintf (FILE, "\n"); \ + } while (0) #ifdef SDB_DEBUGGING_INFO #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \ @@ -1910,25 +1921,49 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE /* Write the extra assembler code needed to declare an object properly. */ #undef ASM_DECLARE_OBJECT_NAME -#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ - do { \ - if (DECLARE_ASM_NAME) \ - { \ - fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ - assemble_name (FILE, NAME); \ - putc (',', FILE); \ - fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ - putc ('\n', FILE); \ - if (!flag_inhibit_size_directive) \ - { \ - fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ - assemble_name (FILE, NAME); \ - fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (decl))); \ - } \ - } \ - ASM_OUTPUT_LABEL(FILE, NAME); \ +#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \ + do { \ + if (DECLARE_ASM_NAME) \ + { \ + fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \ + assemble_name (FILE, NAME); \ + putc (',', FILE); \ + fprintf (FILE, TYPE_OPERAND_FMT, "object"); \ + putc ('\n', FILE); \ + size_directive_output = 0; \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \ + { \ + size_directive_output = 1; \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, NAME); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + } \ + ASM_OUTPUT_LABEL(FILE, NAME); \ } while (0) +/* Output the size directive for a decl in rest_of_decl_compilation + in the case where we did not do so before the initializer. + Once we find the error_mark_node, we know that the value of + size_directive_output was set + by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */ + +#undef ASM_FINISH_DECLARE_OBJECT +#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ +do { \ + char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ + if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ + && DECLARE_ASM_NAME \ + && ! AT_END && TOP_LEVEL \ + && DECL_INITIAL (DECL) == error_mark_node \ + && !size_directive_output) \ + { \ + fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \ + assemble_name (FILE, name); \ + fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \ + } \ + } while (0) + /* This is how to declare the size of a function. */ #undef ASM_DECLARE_FUNCTION_SIZE #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \