OSDN Git Service

(ADJUST_COST): Add definition.
[pf3gnuchains/gcc-fork.git] / gcc / config / m88k / m88k.h
index cd37ab2..c4c3d82 100644 (file)
@@ -206,9 +206,9 @@ extern char * reg_names[];
 /* Print subsidiary information on the compiler version in use.
    Redefined in m88kv4.h, and m88kluna.h.  */
 #define VERSION_INFO1  "88open OCS/BCS, "
-#define VERSION_INFO2  "04 Jul 1992"
+#define VERSION_INFO2  "08/28/92"
 #define VERSION_STRING version_string
-#define        TM_SCCS_ID      "@(#)m88k.h     2.2.6.7 04 Jul 1992 08:35:55"
+#define        TM_SCCS_ID      "@(#)m88k.h     2.2.7.6 08/28/92 07:51:00"
 
 /* Run-time compilation parameters selecting different hardware subsets.  */
 
@@ -391,9 +391,12 @@ extern char * reg_names[];
 /* Boundary (in *bits*) on which stack pointer should be aligned.  */
 #define STACK_BOUNDARY 128
 
-/* Allocation boundary (in *bits*) for the code of a function.
-   Pack code tightly when compiling crtstuff.c.  */
-#define FUNCTION_BOUNDARY (flag_inhibit_size_directive ? 32 : 128)
+/* Allocation boundary (in *bits*) for the code of a function.  On the
+   m88100, it is desirable to align to a cache line.  However, SVR3 targets
+   only provided 8 byte alignment.  The m88110 cache is small, so align
+   to an 8 byte boundary.  Pack code tightly when compiling crtstuff.c.  */
+#define FUNCTION_BOUNDARY (flag_inhibit_size_directive ? 32 : \
+                          (TARGET_88100 && TARGET_SVR4 ? 128 : 64))
 
 /* No data type wants to be aligned rounder than this.  */
 #define BIGGEST_ALIGNMENT 64
@@ -1549,6 +1552,23 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
 /* Provide the cost of a branch.  Exact meaning under development.  */
 #define BRANCH_COST (TARGET_88100 ? 1 : 2)
 
+/* A C statement (sans semicolon) to update the integer variable COST
+   based on the relationship between INSN that is dependent on
+   DEP_INSN through the dependence LINK.  The default is to make no
+   adjustment to COST.  On the m88k, ignore the cost of anti- and
+   output-dependencies.  On the m88100, a store can issue two cycles
+   before the value (not the address) has finished computing.  */
+#define ADJUST_COST(INSN,LINK,DEP_INSN,COST)                           \
+  do {                                                                 \
+    if (REG_NOTE_KIND (LINK) != 0)                                     \
+      (COST) = 0; /* Anti or output dependence.  */                    \
+    else if (! TARGET_88100                                            \
+            && recog_memoized (INSN) >= 0                              \
+            && get_attr_type (INSN) == TYPE_STORE                      \
+            && SET_SRC (PATTERN (INSN)) == SET_DEST (PATTERN (DEP_INSN))) \
+      (COST) -= 4; /* 88110 store reservation station.  */             \
+  } while (0)
+
 /* Define this to be nonzero if the character `$' should be allowed
    by default in identifier names.  */
 #define        DOLLARS_IN_IDENTIFIERS  1
@@ -1953,8 +1973,15 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
 #define ASM_OUTPUT_ASCII(FILE, P, SIZE)  \
   output_ascii (FILE, ASCII_DATA_ASM_OP, 48, P, SIZE)
 
-/* Override svr4.h.  */
+/* Override svr4.h.  Change to the readonly data section for a table of
+   addresses.  final_scan_insn changes back to the text section.  */
 #undef ASM_OUTPUT_CASE_LABEL
+#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, TABLE)                        \
+  do {                                                                 \
+    if (! CASE_VECTOR_INSNS)                                           \
+      readonly_data_section ();                                                \
+    ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM);                     \
+  } while (0)
 
 /* Epilogue for case labels.  This jump instruction is called by casesi
    to transfer to the appropriate branch instruction within the table.
@@ -1993,10 +2020,12 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
   if ((LOG) != 0)                      \
     fprintf (FILE, "\t%s\t %d\n", ALIGN_ASM_OP, 1<<(LOG))
 
-/* Align the text address to half a cache boundary when it can only be
-   reached by jumping.  Pack code tightly when compiling crtstuff.c.  */
+/* On the m88100, align the text address to half a cache boundary when it
+   can only be reached by jumping.  Pack code tightly when compiling
+   crtstuff.c.  */
 #define ASM_OUTPUT_ALIGN_CODE(FILE) \
-  ASM_OUTPUT_ALIGN (FILE, (flag_inhibit_size_directive ? 2 : 3))
+  ASM_OUTPUT_ALIGN (FILE, \
+                   (TARGET_88100 && !flag_inhibit_size_directive ? 3 : 2))
 
 /* Override svr[34].h.  */
 #undef ASM_OUTPUT_SKIP
@@ -2280,17 +2309,16 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
 
 #define USE_CONST_SECTION DECLARE_ASM_NAME
 
-#if defined(CTORS_SECTION_FUNCTION) /* SVR4 */
+#if defined(USING_SVR4_H)
 
 #define EXTRA_SECTIONS in_const, in_tdesc, in_sdata, in_ctors, in_dtors
 #define INIT_SECTION_FUNCTION
 #define FINI_SECTION_FUNCTION
 
-#elif defined(FINI_SECTION_FUNCTION) /* SVR3 */
+#elif defined(USING_SVR3_H)
 
-#define EXTRA_SECTIONS in_const, in_tdesc, in_sdata, in_init, in_fini
-#define CTORS_SECTION_FUNCTION
-#define DTORS_SECTION_FUNCTION
+#define EXTRA_SECTIONS in_const, in_tdesc, in_sdata, in_ctors, in_dtors, \
+                      in_init, in_fini
 
 #else /* m88kluna or other not based on svr[34].h.  */
 
@@ -2307,7 +2335,7 @@ const_section ()                                                  \
 #define INIT_SECTION_FUNCTION
 #define FINI_SECTION_FUNCTION
 
-#endif /* CTORS_SECTION_FUNCTION */
+#endif /* USING_SVR4_H */
 
 #undef EXTRA_SECTION_FUNCTIONS
 #define EXTRA_SECTION_FUNCTIONS                                                \
@@ -2373,6 +2401,11 @@ sdata_section ()                                                 \
     const_section ();                                                  \
 }
 
+/* Jump tables consist of branch instructions and should be output in
+   the text section.  When we use a table of addresses, we explicitly
+   change to the readonly data section.  */
+#define JUMP_TABLES_IN_TEXT_SECTION 1
+
 /* Define this macro if references to a symbol must be treated differently
    depending on something about the variable or function named by the
    symbol (such as what section it is in).