expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an expression.
authorIan Lance Taylor <ian@cygnus.com>
Fri, 19 Dec 1997 16:43:29 +0000 (16:43 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 19 Dec 1997 16:43:29 +0000 (09:43 -0700)
        * expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an
        expression.
        * stmt.c (expand_end_case): Likewise.
        * alpha.h (CASE_VECTOR_PC_RELATIVE): Update.
        * fx80.h, gmicro.h, m68k.h, m88k.h, ns32k.h: Likewise.
        * rs6000.h, sh.h, tahoe.h, v850.h vax.h z8k.h: Likewise.

From-SVN: r17155

36 files changed:
gcc/ChangeLog
gcc/config/1750a/1750a.h
gcc/config/a29k/a29k.h
gcc/config/alpha/alpha.h
gcc/config/arc/arc.h
gcc/config/arm/arm.h
gcc/config/clipper/clipper.h
gcc/config/convex/convex.h
gcc/config/dsp16xx/dsp16xx.h
gcc/config/elxsi/elxsi.h
gcc/config/fx80/fx80.h
gcc/config/gmicro/gmicro.h
gcc/config/h8300/h8300.h
gcc/config/i370/i370.h
gcc/config/i386/i386.h
gcc/config/i860/i860.h
gcc/config/i960/i960.h
gcc/config/m32r/m32r.h
gcc/config/m68k/m68k.h
gcc/config/m88k/m88k.h
gcc/config/mips/mips.h
gcc/config/ns32k/ns32k.h
gcc/config/pdp11/pdp11.h
gcc/config/pyr/pyr.h
gcc/config/romp/romp.h
gcc/config/rs6000/rs6000.h
gcc/config/sh/sh.h
gcc/config/sparc/sparc.h
gcc/config/spur/spur.h
gcc/config/tahoe/tahoe.h
gcc/config/v850/v850.h
gcc/config/vax/vax.h
gcc/config/we32k/we32k.h
gcc/expr.c
gcc/stmt.c
gcc/tm.texi

index b6add4afd49f0856294d41793c4ab5c37d5b05ae..505d84b341338e78bc78cc0319e13c7c611850b2 100644 (file)
@@ -1,3 +1,12 @@
+Fri Dec 19 17:31:11 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+       * expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an
+       expression.
+       * stmt.c (expand_end_case): Likewise.
+       * alpha.h (CASE_VECTOR_PC_RELATIVE): Update.
+       * fx80.h, gmicro.h, m68k.h, m88k.h, ns32k.h: Likewise.
+       * rs6000.h, sh.h, tahoe.h, v850.h vax.h z8k.h: Likewise.
+
 Tue Dec 16 15:14:09 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * objc/Make-lang.in: Create runtime-info.h and libobjc_entry.o in
index fd2a7c6afa34bd18d864a1cf87381a4b11c6fb24..1ed9072fe95e0ba5de4c02f07094d139aabeaf4c 100644 (file)
@@ -835,10 +835,11 @@ enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLA
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE QImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
    Do not define this if the table should contain absolute addresses. */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* #define CASE_VECTOR_PC_RELATIVE */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index db6e378d252c350788b72564050e44bfd6e763aa..71c270068beffb4624352e3af1b92b737ce29f54 100644 (file)
@@ -1207,10 +1207,11 @@ extern char *a29k_function_name;
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 2c45a7373ab0d0b9522f4b774179db62493c8a99..f553f33f33650ffea6adf90fee5c7c710b1a0e1b 100644 (file)
@@ -1502,13 +1502,14 @@ extern void alpha_init_expanders ();
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
    On the Alpha, the table is really GP-relative, not relative to the PC
    of the table, but we pretend that it is PC-relative; this should be OK,
    but we should try to find some better way sometime.  */
-#define CASE_VECTOR_PC_RELATIVE
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 4257efaee3ba19311ab243db12ea516e973ce24a..181d45ea6459e3078849d2faf45b3704dd41c24e 100644 (file)
@@ -1539,13 +1539,14 @@ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0)
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE Pmode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
 /* It's not clear what PIC will look like or whether we want to use -fpic
    for the embedded form currently being talked about.  For now require -fpic
    to get pc relative switch tables.  */
-/*#define CASE_VECTOR_PC_RELATIVE*/
+/*#define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Define if operations between registers always perform the operation
    on the full register even if a narrower mode is specified.  */
index 0cdd1e6d2b5fcb0722bc222f179e24d8030cfa5d..59d3ac3c75d352482dc493a79c54670e44612d4c 100644 (file)
@@ -86,7 +86,7 @@ extern int frame_pointer_needed;
 #if TARGET_CPU_DEFAULT == TARGET_CPU_arm2
 #define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_2__"
 #else
-#if TARGET_CPU_DEFAULT == TARGET_CPU_arm6 || TARGET_CPU_DEFUALT == TARGET_CPU_arm610 || TARGET_CPU_DEFAULT == TARGET_CPU_arm7500fe
+#if TARGET_CPU_DEFAULT == TARGET_CPU_arm6 || TARGET_CPU_DEFAULT == TARGET_CPU_arm610 || TARGET_CPU_DEFAULT == TARGET_CPU_arm7500fe
 #define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_3__"
 #else
 #if TARGET_CPU_DEFAULT == TARGET_CPU_arm7m
@@ -346,7 +346,7 @@ extern char *target_fp_name;
   {"apcs-float",               ARM_FLAG_APCS_FLOAT},   \
   {"no-apcs-float",           -ARM_FLAG_APCS_FLOAT},   \
   {"apcs-reentrant",           ARM_FLAG_APCS_REENT},   \
-  {"no-apcs-rentrant",        -ARM_FLAG_APCS_REENT},   \
+  {"no-apcs-reentrant",               -ARM_FLAG_APCS_REENT},   \
   {"short-load-bytes",         ARM_FLAG_SHORT_BYTE},   \
   {"no-short-load-bytes",      -ARM_FLAG_SHORT_BYTE},  \
   {"short-load-words",        -ARM_FLAG_SHORT_BYTE},   \
@@ -437,7 +437,7 @@ extern enum floating_point_type arm_fpu;
 /* What type of floating point instructions are available */
 extern enum floating_point_type arm_fpu_arch;
 
-/* Default floating point archtitecture.  Override in sub-target if
+/* Default floating point architecture.  Override in sub-target if
    necessary.  */
 #define FP_DEFAULT FP_SOFT2
 
@@ -483,6 +483,11 @@ extern int arm_arch4;
       (MODE) = SImode;                         \
     }
 
+/* Define this macro if the promotion described by `PROMOTE_MODE'
+   should also be done for outgoing function arguments.  */
+/* This is required to ensure that push insns always push a word.  */
+#define PROMOTE_FUNCTION_ARGS
+
 /* Define for XFmode extended real floating point support.
    This will automatically cause REAL_ARITHMETIC to be defined.  */
 /* For the ARM:
@@ -905,7 +910,13 @@ enum reg_class
 
 /* If we generate an insn to push BYTES bytes,
    this says how many the stack pointer really advances by.  */
-#define PUSH_ROUNDING(NPUSHED)  (((NPUSHED) + 3) & ~3)
+/* The push insns do not do this rounding implicitly.  So don't define this. */
+/* #define PUSH_ROUNDING(NPUSHED)  (((NPUSHED) + 3) & ~3) */
+
+/* Define this if the maximum size of all the outgoing args is to be
+   accumulated and pushed during the prologue.  The amount can be
+   found in the variable current_function_outgoing_args_size.  */
+#define ACCUMULATE_OUTGOING_ARGS
 
 /* Offset of first parameter from the argument pointer register value.  */
 #define FIRST_PARM_OFFSET(FNDECL)  4
@@ -1102,8 +1113,10 @@ enum reg_class
   int volatile_func = arm_volatile_func ();                            \
   if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\
     (OFFSET) = 0;                                                      \
-  else if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)\
-    (OFFSET) = (get_frame_size () + 3 & ~3);                           \
+  else if ((FROM) == FRAME_POINTER_REGNUM                              \
+          && (TO) == STACK_POINTER_REGNUM)                             \
+    (OFFSET) = (current_function_outgoing_args_size                    \
+               + (get_frame_size () + 3 & ~3));                        \
   else                                                                 \
     {                                                                  \
       int regno;                                                       \
@@ -1125,8 +1138,10 @@ enum reg_class
        {                                                               \
           if (! frame_pointer_needed)                                  \
             offset -= 16;                                              \
-          if (! volatile_func && (regs_ever_live[14] || saved_hard_reg)) \
+          if (! volatile_func                                          \
+              && (regs_ever_live[14] || saved_hard_reg))               \
             offset += 4;                                               \
+          offset += current_function_outgoing_args_size;               \
           (OFFSET) = (get_frame_size () + 3 & ~3) + offset;            \
          }                                                             \
     }                                                                  \
@@ -1390,14 +1405,15 @@ do                                                                      \
       else if (BASE_REGISTER_RTX_P (xop1))                             \
        GO_IF_LEGITIMATE_INDEX (MODE, REGNO (xop1), xop0, LABEL);       \
     }                                                                  \
-  else if (GET_CODE (X) == MINUS)                                      \
+  /* Reload currently can't handle MINUS, so disable this for now */   \
+  /* else if (GET_CODE (X) == MINUS)                                   \
     {                                                                  \
       rtx xop0 = XEXP (X,0);                                           \
       rtx xop1 = XEXP (X,1);                                           \
                                                                        \
       if (BASE_REGISTER_RTX_P (xop0))                                  \
        GO_IF_LEGITIMATE_INDEX (MODE, -1, xop1, LABEL);                 \
-    }                                                                  \
+    } */                                                               \
   else if (GET_MODE_CLASS (MODE) != MODE_FLOAT                         \
           && GET_CODE (X) == SYMBOL_REF                                \
           && CONSTANT_POOL_ADDRESS_P (X))                              \
@@ -1500,10 +1516,11 @@ extern struct rtx_def *legitimize_pic_address ();
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR  FIX_ROUND_EXPR
@@ -1742,27 +1759,23 @@ extern int arm_compare_fp;
   goto JUMPTO
 
 /* Output an internal label definition.  */
-#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM)  \
-  do                                                                   \
-    {                                                                  \
-      char *s = (char *) alloca (40 + strlen (PREFIX));                        \
-      extern int arm_target_label, arm_ccfsm_state;                    \
-      extern rtx arm_target_insn;                                      \
-                                                                       \
-      if (arm_ccfsm_state == 3 && arm_target_label == (NUM)            \
-       && !strcmp (PREFIX, "L"))                                       \
-       {                                                               \
-         arm_ccfsm_state = 0;                                          \
-         arm_target_insn = NULL;                                       \
-       }                                                               \
-       ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM));               \
-       arm_asm_output_label (STREAM, s);                               \
+#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM)         \
+  do                                                           \
+    {                                                          \
+      char *s = (char *) alloca (40 + strlen (PREFIX));                \
+      extern int arm_target_label, arm_ccfsm_state;            \
+      extern rtx arm_target_insn;                              \
+                                                               \
+      if (arm_ccfsm_state == 3 && arm_target_label == (NUM)    \
+       && !strcmp (PREFIX, "L"))                               \
+       {                                                       \
+         arm_ccfsm_state = 0;                                  \
+         arm_target_insn = NULL;                               \
+       }                                                       \
+       ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM));       \
+       ASM_OUTPUT_LABEL (STREAM, s);                           \
     } while (0)
 
-/* Output a label definition.  */
-#define ASM_OUTPUT_LABEL(STREAM,NAME)          \
-  arm_asm_output_label ((STREAM), (NAME))
-
 /* Output a push or a pop instruction (only used when profiling).  */
 #define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \
   fprintf(STREAM,"\tstmfd\t%ssp!,{%s%s}\n", \
@@ -1916,9 +1929,10 @@ do {                                                                     \
          shift += 8;                                                   \
        }                                                               \
     }                                                                  \
-  fprintf (FILE, "\tldr\t%spc, [%spc, #-4]\n", REGISTER_PREFIX,                \
-          REGISTER_PREFIX);                                            \
-  ASM_OUTPUT_INT (FILE, XEXP (DECL_RTL (FUNCTION), 0));                        \
+  fputs ("\tb\t", FILE);                                               \
+  assemble_name (FILE,                                                 \
+                IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION)));  \
+  fputc ('\n', FILE);                                                  \
 } while (0)
 
 /* A C expression whose value is RTL representing the value of the return
@@ -1927,7 +1941,7 @@ do {                                                                      \
 #define RETURN_ADDR_RTX(COUNT, FRAME)  \
   ((COUNT == 0)                                \
    ? gen_rtx (MEM, Pmode, plus_constant (FRAME, -4)) \
-   : (rtx) 0)
+   : NULL_RTX)
 
 /* Used to mask out junk bits from the return address, such as
    processor state, interrupt status, condition codes and the like.  */
@@ -2003,9 +2017,9 @@ int arm_valid_machine_decl_attribute (/* union tree_node *, union tree_node *,
                                         union tree_node *,
                                         union tree_node * */);
 struct rtx_def *arm_gen_load_multiple (/* int, int, struct rtx_def *, 
-                                         int, int */);
+                                         int, int, int, int */);
 struct rtx_def *arm_gen_store_multiple (/* int, int, struct rtx_def *,
-                                          int, int */);
+                                          int, int, int, int */);
 int arm_gen_movstrqi (/* struct rtx_def ** */);
 struct rtx_def *gen_rotated_half_load (/* struct rtx_def * */);
 enum machine_mode arm_select_cc_mode (/* enum rtx_code, struct rtx_def *,
@@ -2024,7 +2038,7 @@ char *output_mov_long_double_arm_from_fpu (/* struct rtx_def ** */);
 char *output_mov_long_double_arm_from_arm (/* struct rtx_def ** */);
 char *output_mov_double_fpu_from_arm (/* struct rtx_def ** */);
 char *output_mov_double_arm_from_fpu (/* struct rtx_def ** */);
-char *output_mov_double (/* struct rtx_def ** */);
+char *output_move_double (/* struct rtx_def ** */);
 char *output_mov_immediate (/* struct rtx_def ** */);
 char *output_add_immediate (/* struct rtx_def ** */);
 char *arithmetic_instr (/* struct rtx_def *, int */);
@@ -2035,8 +2049,6 @@ void output_func_prologue (/* FILE *, int */);
 void output_func_epilogue (/* FILE *, int */);
 void arm_expand_prologue (/* void */);
 void arm_print_operand (/* FILE *, struct rtx_def *, int */);
-void arm_asm_output_label (/* FILE *, char * */);
-void output_lcomm_directive (/* FILE *, char *, int, int */);
 void final_prescan_insn (/* struct rtx_def *, struct rtx_def **, int */);
 #ifdef AOF_ASSEMBLER
 struct rtx_def *aof_pic_entry (/* struct rtx_def * */);
index 9600df3417769d62b8aea3caea2aed20bbf02172..17982c993d33cab91b8c7e436419ffd83deb0965 100644 (file)
@@ -777,10 +777,11 @@ do                                                                              \
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the case instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Define this if the case instruction drops through after the table
    when the index is out of range.  Don't define it if the case insn
index 41f1bacf5d9af13f42238ac2d4fe1f8cc300e97b..7538c1e345580db309b47e7b081a20a50245352b 100644 (file)
@@ -1029,10 +1029,11 @@ enum reg_class {
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the case instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Define this if the case instruction drops through after the table
    when the index is out of range.  Don't define it if the case insn
index 83a97f8979c90af6e9a80694c1b63b2c008baff1..e128b48a787f0b2ccc5867351fd674ade100343d 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  AT&T DSP1600.
-   Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
    Contributed by Michael Collison (collison@world.std.com).
 
 This file is part of GNU CC.
@@ -440,7 +440,7 @@ extern int target_flags;
 /* 1 for registers that have pervasive standard uses
    and are not available for the register allocator.
 
-   The registers are layed out as follows:
+   The registers are laid out as follows:
 
    {a0,a0l,a1,a1l,x,y,yl,p,pl} - Data Arithmetic Unit
    {r0,r1,r2,r3,j,k,ybase} - Y Space Address Arithmetic Unit
@@ -1652,7 +1652,7 @@ const_section ()                                                   \
 /* This is how to output an assembler line defining a `float' constant.  */
 #define ASM_OUTPUT_FLOAT(FILE,VALUE)  asm_output_float (FILE, VALUE)
 
-/* This is how to output and assembler line defininf a 'float' constant of
+/* This is how to output an assembler line defining a 'float' constant of
    size HFmode. */
 #define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE)  asm_output_float (FILE, VALUE)
 
@@ -1921,10 +1921,11 @@ const_section ()                                                   \
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE QImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE  */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index d0d4c73807d2df7e6753680251498cc0f19c7eac..dd0a5f9b68838845d86581d4f080359130871b37 100644 (file)
@@ -618,10 +618,11 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the case instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index b56834a372c791663e07b77f10d0a31be8bd81e8..d1f3694703ac5a129d68d597ceb969718378540b 100644 (file)
@@ -819,10 +819,11 @@ extern enum reg_class regno_reg_class[];
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE HImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 29701f25fd785673a574ac1719238da31f1977b9..4a920239843034f65dccda07bc73c807ce918f03 100644 (file)
@@ -1121,10 +1121,11 @@ extern enum reg_class regno_reg_class[];
 /* #define CASE_VECTOR_MODE HImode */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index a11541ff071ab839ecd3f45c67011ae0e79d9c9a..92e1d9a0dd7b137e7baaff19885aa48b8de12c2d 100644 (file)
@@ -351,7 +351,7 @@ enum reg_class {
 
 #define REG_CLASS_CONTENTS                     \
 {      0,              /* No regs      */      \
-   0x0ff,              /* GENERAL_REGS */      \
+   0x2ff,              /* GENERAL_REGS */      \
    0x100,              /* MAC_REGS */          \
    0x3ff,              /* ALL_REGS     */      \
 }
@@ -780,7 +780,9 @@ struct rtx_def *function_arg();
 #define REG_OK_FOR_INDEX_P(X) 0
 /* Nonzero if X is a hard reg that can be used as a base reg
    or if it is a pseudo reg.  */
-#define REG_OK_FOR_BASE_P(X) 1
+/* Don't use REGNO_OK_FOR_BASE_P here because it uses reg_renumber.  */
+#define REG_OK_FOR_BASE_P(X) \
+       (REGNO (X) >= FIRST_PSEUDO_REGISTER || REGNO (X) != 8)
 #define REG_OK_FOR_INDEX_P_STRICT(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
 #define REG_OK_FOR_BASE_P_STRICT(X) REGNO_OK_FOR_BASE_P (REGNO (X))
 #define STRICT 0
@@ -862,9 +864,7 @@ struct rtx_def *function_arg();
    has an effect that depends on the machine mode it is used for.
 
    On the H8/300, the predecrement and postincrement address depend thus
-   (the amount of decrement or increment being the length of the operand)
-   and all indexed address depend thus (because the index scale factor
-   is the length of the operand).  */
+   (the amount of decrement or increment being the length of the operand).  */
 
 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
   if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) goto LABEL;
@@ -873,10 +873,11 @@ struct rtx_def *function_arg();
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE Pmode
 
-/* Define this if the case instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/*#define CASE_VECTOR_PC_RELATIVE*/
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/*#define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Define this if the case instruction drops through after the table
    when the index is out of range.  Don't define it if the case insn
@@ -986,7 +987,7 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
 /* Tell final.c how to eliminate redundant test instructions.  */
 
 /* Here we define machine-dependent flags and fields in cc_status
-   (see `conditions.h').  No extra ones are needed for the vax.  */
+   (see `conditions.h').  No extra ones are needed for the h8300.  */
 
 /* Store in cc_status the expressions
    that the condition codes will describe
@@ -1347,7 +1348,7 @@ do { char dstr[30];                                       \
 #define PRINT_OPERAND(FILE, X, CODE)  print_operand(FILE,X,CODE)
 
 /* Print a memory operand whose address is X, on file FILE.
-   This uses a function in output-vax.c.  */
+   This uses a function in h8300.c.  */
 
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
 
index 576a44912f75f00be9d850a90cf13b53357aae67..28279b24dfaf3105b5febd58a337d2a0c3b681f1 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  System/370 version.
-   Copyright (C) 1989, 1993, 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1989, 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
    Contributed by Jan Stein (jan@cd.chalmers.se).
    Modified for C/370 MVS by Dave Pitts (dpitts@nyx.cs.du.edu)
 
@@ -20,12 +20,6 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#ifdef sun
-#include <sys/types.h>
-#include <ctype.h>
-#endif
-#include <time.h>
-
 #define TARGET_VERSION printf (" (370/MVS)");
 
 /* Options for the preprocessor for this target machine.  */
@@ -489,103 +483,7 @@ enum reg_class
 
 /* This macro generates the assembly code for function entry.
    All of the C/370 environment is preserved.  */
-
-#if MACROPROLOGUE == 1
-#define FUNCTION_PROLOGUE(FILE, LSIZE)                                 \
-{                                                                      \
-  fprintf (FILE, "\tEDCPRLG USRDSAL=%d,BASEREG=%d\n",                  \
-          STACK_POINTER_OFFSET + LSIZE - 120 +                         \
-          current_function_outgoing_args_size, BASE_REGISTER);         \
-  fprintf (FILE, "PG%d\tEQU\t*\n", mvs_page_num );                     \
-  fprintf (FILE, "\tLR\t11,1\n");                                      \
-  fprintf (FILE, "\tL\t%d,=A(PGT%d)\n", PAGE_REGISTER, mvs_page_num);  \
-  mvs_page_code = 6;                                                   \
-  mvs_page_lit = 4;                                                    \
-  mvs_check_page (FILE, 0, 0);                                         \
-  function_base_page = mvs_page_num;                                   \
-}
-#else /* MACROPROLOGUE != 1 */
-#define FUNCTION_PROLOGUE(FILE, LSIZE)                                 \
-{                                                                      \
-  static int function_label_index = 1;                                 \
-  static int function_first = 0;                                       \
-  static int function_year, function_month, function_day;              \
-  static int function_hour, function_minute, function_second;          \
-  int i;                                                               \
-  if (!function_first)                                                 \
-    {                                                                  \
-      struct tm *function_time;                                                \
-      time_t lcltime;                                                  \
-      time (&lcltime);                                                 \
-      function_time = localtime (&lcltime);                            \
-      function_year = function_time->tm_year + 1900;                   \
-      function_month = function_time->tm_mon + 1;                      \
-      function_day = function_time->tm_mday;                           \
-      function_hour = function_time->tm_hour;                          \
-      function_minute = function_time->tm_min;                         \
-      function_second = function_time->tm_sec;                         \
-      fprintf (FILE, "PPA2\tDS\t0F\n");                                        \
-      fprintf (FILE, "\tDC\tX'03',X'00',X'33',X'00'\n");               \
-      fprintf (FILE, "\tDC\tV(CEESTART),A(0)\n");                      \
-      fprintf (FILE, "\tDC\tA(CEETIMES)\n");                           \
-      fprintf (FILE, "CEETIMES\tDS\t0F\n");                            \
-      fprintf (FILE, "\tDC\tCL4'%d',CL4'%02d%02d',CL6'%02d%02d00'\n",  \
-                function_year, function_month, function_day,           \
-                function_hour, function_minute, function_second);      \
-      fprintf (FILE, "\tDC\tCL2'01',CL4'0100'\n");                     \
-    }                                                                  \
-  fprintf (FILE, "$DSD%03d\tDSECT\n", function_label_index);           \
-  fprintf (FILE, "\tDS\tD\n");                                         \
-  fprintf (FILE, "\tDS\tCL(%d)\n", STACK_POINTER_OFFSET + LSIZE        \
-                       + current_function_outgoing_args_size);         \
-  fprintf (FILE, "\tORG\t$DSD%03d\n", function_label_index);           \
-  fprintf (FILE, "\tDS\tCL(120+8)\n");                                 \
-  fprintf (FILE, "\tORG\n");                                           \
-  fprintf (FILE, "\tDS\t0D\n");                                                \
-  fprintf (FILE, "$DSL%03d\tEQU\t*-$DSD%03d-8\n", function_label_index, \
-          function_label_index);                                       \
-  fprintf (FILE, "\tDS\t0H\n");                                                \
-  assemble_name (FILE, mvs_function_name);                             \
-  fprintf (FILE, "\tEQU\t*\n");                                                \
-  fprintf (FILE, "\tUSING\t*,15\n");                                   \
-  fprintf (FILE, "\tB\tFPL%03d\n", function_label_index);              \
-  fprintf (FILE, "\tDC\tAL1(FPL%03d+4-*)\n", function_label_index + 1);        \
-  fprintf (FILE, "\tDC\tX'CE',X'A0',AL1(16)\n");                       \
-  fprintf (FILE, "\tDC\tAL4(PPA2)\n");                                 \
-  fprintf (FILE, "\tDC\tAL4(0)\n");                                    \
-  fprintf (FILE, "\tDC\tAL4($DSL%03d)\n", function_label_index);       \
-  fprintf (FILE, "FPL%03d\tEQU\t*\n", function_label_index + 1);       \
-  fprintf (FILE, "\tDC\tAL2(%d),C'%s'\n", strlen (mvs_function_name),  \
-       mvs_function_name);                                             \
-  fprintf (FILE, "FPL%03d\tDS\t0H\n", function_label_index);           \
-  fprintf (FILE, "\tSTM\t14,12,12(13)\n");                             \
-  fprintf (FILE, "\tL\t2,76(,13)\n");                                  \
-  fprintf (FILE, "\tL\t0,16(,15)\n");                                  \
-  fprintf (FILE, "\tALR\t0,2\n");                                      \
-  fprintf (FILE, "\tCL\t0,12(,12)\n");                                 \
-  fprintf (FILE, "\tBNH\t*+10\n");                                     \
-  fprintf (FILE, "\tL\t15,116(,12)\n");                                        \
-  fprintf (FILE, "\tBALR\t14,15\n");                                   \
-  fprintf (FILE, "\tL\t15,72(,13)\n");                                 \
-  fprintf (FILE, "\tSTM\t15,0,72(2)\n");                               \
-  fprintf (FILE, "\tMVI\t0(2),X'10'\n");                               \
-  fprintf (FILE, "\tST\t2,8(,13)\n ");                                  \
-  fprintf (FILE, "\tST\t13,4(,2)\n ");                                 \
-  fprintf (FILE, "\tLR\t13,2\n");                                      \
-  fprintf (FILE, "\tDROP\t15\n");                                      \
-  fprintf (FILE, "\tBALR\t%d,0\n", BASE_REGISTER);                     \
-  fprintf (FILE, "PG%d\tEQU\t*\n", mvs_page_num );                     \
-  fprintf (FILE, "\tUSING\t*,%d\n", BASE_REGISTER);                    \
-  fprintf (FILE, "\tLR\t11,1\n");                                      \
-  fprintf (FILE, "\tL\t%d,=A(PGT%d)\n", PAGE_REGISTER, mvs_page_num);  \
-  mvs_page_code = 4;                                                   \
-  mvs_page_lit = 4;                                                    \
-  mvs_check_page (FILE, 0, 0);                                         \
-  function_base_page = mvs_page_num;                                   \
-  function_first = 1;                                                  \
-  function_label_index += 2;                                           \
-}
-#endif /* MACROPROLOGUE */
+#define FUNCTION_PROLOGUE(FILE, LSIZE) i370_function_prolog ((FILE), (LSIZE));
 
 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)                    \
 {                                                                      \
@@ -890,11 +788,11 @@ enum reg_class
 
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table to contain
-   offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 
index 6fb08a120d2d0056887e1332475b6dcc9b3da591..d2bc5e2d15661d9fa88e3cb6f601f68b25af3592 100644 (file)
@@ -1791,10 +1791,11 @@ while (0)
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE Pmode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.
    This should be changed to take advantage of fist --wfs ??
index 47eb7dcfd1d1092c01f48c1a28ca6a08798eb628..5f10b4611ad3fd3b56948423aa1dff156c2fcaa2 100644 (file)
@@ -842,10 +842,11 @@ struct cumulative_args { int ints, floats; };
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index af83917f073d4970970c0851257f2551290896bf..d9cddb99d57b9bbb502fdd65c39a490a17dfb237 100644 (file)
@@ -1076,10 +1076,11 @@ extern struct rtx_def *legitimize_address ();
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 09d1c6a967e78a926c5abc1692d552bd37baa720..d7517e9ded5a8477ba602edb271b1d66d6d33fc5 100644 (file)
@@ -1,4 +1,4 @@
-/* Definitions of target machine for GNU compiler, for the M32R/D cpu.
+/* Definitions of target machine for GNU compiler, Mitsubishi M32R cpu.
    Copyright (C) 1996, 1997 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA.  */
 - longlong.h?
 */
 
-/* FIXME: Create elf.h and have svr4.h include it.  */
+/* ??? Create elf.h and have svr4.h include it.  */
 #include "svr4.h"
 
 #undef SWITCH_TAKES_ARG
@@ -703,7 +703,7 @@ M32R_STACK_ALIGN (current_function_outgoing_args_size)
 
    Do not define this macro unless there is no other way to get the
    return address from the stack.  */
-/* FIXME: revisit */
+/* ??? revisit */
 /* #define RETURN_ADDRESS_POINTER_REGNUM */
 
 /* Register in which static-chain is passed to a function.  This must
@@ -886,7 +886,7 @@ M32R_STACK_ALIGN (current_function_outgoing_args_size)
  ? gen_rtx (REG, (MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)))    \
  : 0)
 
-/* FIXME: Quick hack to try to get varargs working the normal way.  */
+/* ??? Quick hack to try to get varargs working the normal way.  */
 #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \
 (((! current_function_varargs || (NAMED))                              \
   && PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED)))                   \
@@ -1061,7 +1061,7 @@ m32r_output_function_epilogue (FILE, SIZE)
        jmp r6
        nop
 
-   FIXME: Need addr32 support.
+   ??? Need addr32 support.
 */
 
 /* Length in bytes of the trampoline for entering a nested function.  */
@@ -1224,7 +1224,7 @@ m32r_select_cc_mode (OP, X, Y)
 
 /* Return non-zero if SELECT_CC_MODE will never return MODE for a
    floating point inequality comparison.  */
-#define REVERSIBLE_CC_MODE(MODE) 1 /*FIXME*/
+#define REVERSIBLE_CC_MODE(MODE) 1 /*???*/
 \f
 /* Costs.  */
 
@@ -1779,13 +1779,14 @@ do {                                                                    \
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE Pmode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
 /* It's not clear what PIC will look like or whether we want to use -fpic
    for the embedded form currently being talked about.  For now require -fpic
    to get pc relative switch tables.  */
-/*#define CASE_VECTOR_PC_RELATIVE*/
+/*#define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Define if operations between registers always perform the operation
    on the full register even if a narrower mode is specified.  */
index d7765426566eb8c30c3af3fcd610eb737075886b..eeb04c40b25c65e730e5544f318fc896348c4d58 100644 (file)
@@ -1551,10 +1551,11 @@ __transfer_from_trampoline ()                                   \
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE HImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 7fc8ed987933f04f3535106e70c760ee33832975..79228d422b3b59998c9a7e3ffe2f3c399117f3fd 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler for
    Motorola m88100 in an 88open OCS/BCS environment.
-   Copyright (C) 1988, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1988, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com).
    Currently maintained by (gcc@dg-rtp.dg.com)
 
@@ -198,13 +198,13 @@ extern char * reg_names[];
    Redefined in sysv4.h, and luna.h.  */
 #define VERSION_INFO1  "m88k, "
 #ifndef VERSION_INFO2
-#define VERSION_INFO2   "$Revision: 1.1 $"
+#define VERSION_INFO2   "$Revision: 1.3 $"
 #endif
 
 #ifndef VERSION_STRING
 #define VERSION_STRING  version_string
 #ifdef __STDC__
-#define TM_RCS_ID      "@(#)" __FILE__ " $Revision: 1.1 $ " __DATE__
+#define TM_RCS_ID      "@(#)" __FILE__ " $Revision: 1.3 $ " __DATE__
 #else
 #define TM_RCS_ID      "$What: <@(#) m88k.h,v  1.1.1.2.2.2> $"
 #endif  /* __STDC__ */
@@ -1510,8 +1510,11 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
    elements of a jump-table should have.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this macro if jump-tables should contain relative addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Define this if control falls through a `case' insn when the index
    value is out of range.  This means the specified default-label is
@@ -1547,6 +1550,7 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
 
 /* Tell when to handle #pragma weak.  This is only done for V.4.  */
 #define SUPPORTS_WEAK TARGET_SVR4
+#define SUPPORTS_ONE_ONLY TARGET_SVR4
 
 /* Max number of bytes we can move from memory to memory
    in one reasonably fast instruction.  */
index 645f79ec2d5546fd8919447e8c2c777515955c46..5ce0c17210a7df5a1d58579dc6b12a3c6c87f058 100644 (file)
@@ -2795,7 +2795,7 @@ while (0)
 /* Define this if the tablejump instruction expects the table
    to contain offsets from the address of the table.
    Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* #define CASE_VECTOR_PC_RELATIVE */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 70cd9f201ae28996698edf09869dc3c717993274..b98d72f5527ff94ab790f4be6acee77b6510fbf7 100644 (file)
@@ -1088,10 +1088,11 @@ while (0)
    all programs. */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 9f755c1227e0d3d4df5c486477b8f2feb27bfaca..9a37528f536a1505e5b31d32e60688c31ecc7952 100644 (file)
@@ -879,10 +879,11 @@ extern int current_function_pretend_args_size;
    `tablejump' insn.  */
 #define CASE_TAKES_INDEX_RAW
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index ea88ee4ba10bcc8c0491ddb9e617767dccc74f94..cf292903b4f85123ec853f210a65cf7b7effedbe 100644 (file)
@@ -989,10 +989,11 @@ extern int current_function_calls_alloca;
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/*#define CASE_VECTOR_PC_RELATIVE*/
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/*#define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index be12d367fbba0d949177e33992a5f253835e2a0c..158f2ef82689ca08c40c71424bb9a4d1ce625222 100644 (file)
@@ -1143,10 +1143,11 @@ struct rt_cargs {int gregs, fregs; };
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 087ac5ad8ce761ec5d7d891e2ba6b42e792a1f23..9a5b281bfcc5a79e17bcf525abf7e415fafabdc0 100644 (file)
@@ -2002,10 +2002,11 @@ typedef struct rs6000_args
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE (TARGET_32BIT ? SImode : DImode)
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index a3aa90253e643fe19891152cbbac6b8657ac13c9..4a7f094a1e04565c74a82aba29b393fed7b1f18b 100644 (file)
@@ -1188,10 +1188,11 @@ extern struct rtx_def *sh_builtin_saveregs ();
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode)
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR  FIX_ROUND_EXPR
index d839432e7665396e59d1c5bf771d244cf0bb672d..e87058cc33f4d4a43aea8a7e9c2a3d1e59f4f3df 100644 (file)
@@ -2461,10 +2461,11 @@ extern struct rtx_def *legitimize_pic_address ();
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE Pmode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 51e1add1b27a6058df8afb92941062d03d235541..b485d74ac7af20f2c380f69d79467f74b6c5bf20 100644 (file)
@@ -738,10 +738,11 @@ extern int current_function_pretend_args_size;
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index b4076ce53b3b0360e0c293aeb3741964e38bf669..e104b4e1610a3daa7a8e3b71c9d2d16ca4a236e8 100644 (file)
@@ -575,9 +575,11 @@ enum reg_class {NO_REGS,GENERAL_REGS,FPP_REG,ALL_REGS,LIM_REG_CLASSES};
 
 #define CASE_VECTOR_MODE HImode
 
-/* each of the table elements in a case are relative to the jump address */
-
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* tahoe case instructions just fall through to the next instruction */
 /* if not satisfied. It doesn't support a default action            */
index 9044f44a6d9e710f47586ac0cec1c198ed94a325..b09a475ac43589e2e7265f2510e263c199a5ba4a 100644 (file)
@@ -1317,10 +1317,11 @@ do { char dstr[30];                                     \
    jumps to the default label instead.  */
 /* #define CASE_DROPS_THROUGH */
 
-/* We must use a PC relative entry for small tables.  It would be more
-   efficient to use an absolute entry for big tables, but this is not
-   a runtime choice yet.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* The switch instruction requires that the jump table immediately follow
    it. */
index 1d4d67ddb38266c21d88c0a9cab9de3166a530fa..3a296a445c930c539596d979adf7f59c5cb1b291 100644 (file)
@@ -446,7 +446,7 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
 /* This macro generates the assembly code for function entry.
    FILE is a stdio stream to output the code to.
    SIZE is an int: how many units of temporary storage to allocate,
-   adjusted by STARTING_FRAME_OFFSET to accomodate vms.h.
+   adjusted by STARTING_FRAME_OFFSET to accommodate vms.h.
    Refer to the array `regs_ever_live' to determine which registers
    to save; `regs_ever_live[I]' is nonzero if register number I
    is ever used in the function.  This macro is responsible for
@@ -813,10 +813,11 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE HImode
 
-/* Define this if the case instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-#define CASE_VECTOR_PC_RELATIVE
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+#define CASE_VECTOR_PC_RELATIVE 1
 
 /* Define this if the case instruction drops through after the table
    when the index is out of range.  Don't define it if the case insn
index 460fc3d282014d9a9a9b94a622848a1d4e8c1ea9..e7d923856c2badc850062c676d7b387e327c0dce 100644 (file)
@@ -625,10 +625,11 @@ enum reg_class { NO_REGS, GENERAL_REGS,
    for the index in the tablejump instruction.  */
 #define CASE_VECTOR_MODE SImode
 
-/* Define this if the tablejump instruction expects the table
-   to contain offsets from the address of the table.
-   Do not define this if the table should contain absolute addresses.  */
-/* #define CASE_VECTOR_PC_RELATIVE */
+/* Define as C expression which evaluates to nonzero if the tablejump
+   instruction expects the table to contain offsets from the address of the
+   table.
+   Do not define this if the table should contain absolute addresses. */
+/* #define CASE_VECTOR_PC_RELATIVE 1 */
 
 /* Specify the tree operation to be used to convert reals to integers.  */
 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
index 339f3e2b420c37070f8c86607c1ff912b7488294..68fbbe9e89b91346db03adc1e9bb517a62213137 100644 (file)
@@ -73,6 +73,11 @@ Boston, MA 02111-1307, USA.  */
 /* Like STACK_BOUNDARY but in units of bytes, not bits.  */
 #define STACK_BYTES (STACK_BOUNDARY / BITS_PER_UNIT)
 
+/* Assume that case vectors are not pc-relative.  */
+#ifndef CASE_VECTOR_PC_RELATIVE
+#define CASE_VECTOR_PC_RELATIVE 0
+#endif
+
 /* If this is nonzero, we do not bother generating VOLATILE
    around volatile memory references, and we are willing to
    output indirect addresses.  If cse is to follow, we reject
@@ -11320,12 +11325,10 @@ do_tablejump (index, mode, range, table_label, default_label)
 
   emit_jump_insn (gen_tablejump (temp, table_label));
 
-#ifndef CASE_VECTOR_PC_RELATIVE
   /* If we are generating PIC code or if the table is PC-relative, the
      table and JUMP_INSN must be adjacent, so don't output a BARRIER.  */
-  if (! flag_pic)
+  if (! CASE_VECTOR_PC_RELATIVE && ! flag_pic)
     emit_barrier ();
-#endif
 }
 
 #endif /* HAVE_tablejump */
index 9779015963bc6929a7318ea72c55f4ed1ada861e..78e5b543494fdcf49fc7bf0cfa7049709b34a07c 100644 (file)
@@ -63,6 +63,11 @@ Boston, MA 02111-1307, USA.  */
 #define obstack_chunk_free free
 struct obstack stmt_obstack;
 
+/* Assume that case vectors are not pc-relative.  */
+#ifndef CASE_VECTOR_PC_RELATIVE
+#define CASE_VECTOR_PC_RELATIVE 0
+#endif
+
 /* Filename and line number of last line-number note,
    whether we actually emitted it or not.  */
 char *emit_filename;
@@ -5700,13 +5705,7 @@ expand_end_case (orig_index)
          /* Output the table */
          emit_label (table_label);
 
-         /* This would be a lot nicer if CASE_VECTOR_PC_RELATIVE
-            were an expression, instead of an #ifdef/#ifndef.  */
-         if (
-#ifdef CASE_VECTOR_PC_RELATIVE
-             1 ||
-#endif
-             flag_pic)
+         if (CASE_VECTOR_PC_RELATIVE || flag_pic)
            emit_jump_insn (gen_rtx (ADDR_DIFF_VEC, CASE_VECTOR_MODE,
                                     gen_rtx (LABEL_REF, Pmode, table_label),
                                     gen_rtvec_v (ncases, labelvec)));
index 027a8919b7b76c87102f09e065a112d74ca3d60c..e24a7e25f480cb7e689b8a1fdbcc87b0a20b9401 100644 (file)
@@ -6830,7 +6830,9 @@ elements of a jump-table should have.
 
 @findex CASE_VECTOR_PC_RELATIVE
 @item CASE_VECTOR_PC_RELATIVE
-Define this macro if jump-tables should contain relative addresses.
+Define this macro to be a C expression to indicate when jump-tables
+should contain relative addresses.  If jump-tables never contain
+relative addresses, then you need not define this macro.
 
 @findex CASE_DROPS_THROUGH
 @item CASE_DROPS_THROUGH