aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/1750a/1750a.h7
-rw-r--r--gcc/config/a29k/a29k.h9
-rw-r--r--gcc/config/alpha/alpha.h9
-rw-r--r--gcc/config/arc/arc.h9
-rw-r--r--gcc/config/arm/arm.h94
-rw-r--r--gcc/config/clipper/clipper.h9
-rw-r--r--gcc/config/convex/convex.h9
-rw-r--r--gcc/config/dsp16xx/dsp16xx.h15
-rw-r--r--gcc/config/elxsi/elxsi.h9
-rw-r--r--gcc/config/fx80/fx80.h9
-rw-r--r--gcc/config/gmicro/gmicro.h9
-rw-r--r--gcc/config/h8300/h8300.h23
-rw-r--r--gcc/config/i370/i370.h116
-rw-r--r--gcc/config/i386/i386.h9
-rw-r--r--gcc/config/i860/i860.h9
-rw-r--r--gcc/config/i960/i960.h9
-rw-r--r--gcc/config/m32r/m32r.h21
-rw-r--r--gcc/config/m68k/m68k.h9
-rw-r--r--gcc/config/m88k/m88k.h14
-rw-r--r--gcc/config/mips/mips.h2
-rw-r--r--gcc/config/ns32k/ns32k.h9
-rw-r--r--gcc/config/pdp11/pdp11.h9
-rw-r--r--gcc/config/pyr/pyr.h9
-rw-r--r--gcc/config/romp/romp.h9
-rw-r--r--gcc/config/rs6000/rs6000.h9
-rw-r--r--gcc/config/sh/sh.h9
-rw-r--r--gcc/config/sparc/sparc.h9
-rw-r--r--gcc/config/spur/spur.h9
-rw-r--r--gcc/config/tahoe/tahoe.h8
-rw-r--r--gcc/config/v850/v850.h9
-rw-r--r--gcc/config/vax/vax.h11
-rw-r--r--gcc/config/we32k/we32k.h9
-rw-r--r--gcc/expr.c9
-rw-r--r--gcc/stmt.c13
-rw-r--r--gcc/tm.texi4
36 files changed, 250 insertions, 294 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b6add4a..505d84b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/1750a/1750a.h b/gcc/config/1750a/1750a.h
index fd2a7c6..1ed9072 100644
--- a/gcc/config/1750a/1750a.h
+++ b/gcc/config/1750a/1750a.h
@@ -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 1 */
/* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
diff --git a/gcc/config/a29k/a29k.h b/gcc/config/a29k/a29k.h
index db6e378..71c2700 100644
--- a/gcc/config/a29k/a29k.h
+++ b/gcc/config/a29k/a29k.h
@@ -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
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 2c45a73..f553f33 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -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
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index 4257efa..181d45e 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -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. */
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 0cdd1e6..59d3ac3 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -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 * */);
diff --git a/gcc/config/clipper/clipper.h b/gcc/config/clipper/clipper.h
index 9600df3..17982c9 100644
--- a/gcc/config/clipper/clipper.h
+++ b/gcc/config/clipper/clipper.h
@@ -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
diff --git a/gcc/config/convex/convex.h b/gcc/config/convex/convex.h
index 41f1bac..7538c1e 100644
--- a/gcc/config/convex/convex.h
+++ b/gcc/config/convex/convex.h
@@ -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
diff --git a/gcc/config/dsp16xx/dsp16xx.h b/gcc/config/dsp16xx/dsp16xx.h
index 83a97f8..e128b48 100644
--- a/gcc/config/dsp16xx/dsp16xx.h
+++ b/gcc/config/dsp16xx/dsp16xx.h
@@ -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
diff --git a/gcc/config/elxsi/elxsi.h b/gcc/config/elxsi/elxsi.h
index d0d4c73..dd0a5f9 100644
--- a/gcc/config/elxsi/elxsi.h
+++ b/gcc/config/elxsi/elxsi.h
@@ -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
diff --git a/gcc/config/fx80/fx80.h b/gcc/config/fx80/fx80.h
index b56834a..d1f3694 100644
--- a/gcc/config/fx80/fx80.h
+++ b/gcc/config/fx80/fx80.h
@@ -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
diff --git a/gcc/config/gmicro/gmicro.h b/gcc/config/gmicro/gmicro.h
index 29701f2..4a92023 100644
--- a/gcc/config/gmicro/gmicro.h
+++ b/gcc/config/gmicro/gmicro.h
@@ -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
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index a11541f..92e1d9a 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -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)
diff --git a/gcc/config/i370/i370.h b/gcc/config/i370/i370.h
index 576a449..28279b2 100644
--- a/gcc/config/i370/i370.h
+++ b/gcc/config/i370/i370.h
@@ -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 1 */
/* Specify the tree operation to be used to convert reals to integers. */
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 6fb08a1..d2bc5e2 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -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 ??
diff --git a/gcc/config/i860/i860.h b/gcc/config/i860/i860.h
index 47eb7dc..5f10b46 100644
--- a/gcc/config/i860/i860.h
+++ b/gcc/config/i860/i860.h
@@ -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
diff --git a/gcc/config/i960/i960.h b/gcc/config/i960/i960.h
index af83917..d9cddb9 100644
--- a/gcc/config/i960/i960.h
+++ b/gcc/config/i960/i960.h
@@ -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
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index 09d1c6a..d7517e9d 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -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 /*???*/
/* 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. */
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index d7765426..eeb04c4 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -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
diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h
index 7fc8ed9..79228d4 100644
--- a/gcc/config/m88k/m88k.h
+++ b/gcc/config/m88k/m88k.h
@@ -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. */
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 645f79e..5ce0c17 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -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 1 */
/* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
diff --git a/gcc/config/ns32k/ns32k.h b/gcc/config/ns32k/ns32k.h
index 70cd9f2..b98d72f 100644
--- a/gcc/config/ns32k/ns32k.h
+++ b/gcc/config/ns32k/ns32k.h
@@ -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
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 9f755c1..9a37528 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -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
diff --git a/gcc/config/pyr/pyr.h b/gcc/config/pyr/pyr.h
index ea88ee4..cf29290 100644
--- a/gcc/config/pyr/pyr.h
+++ b/gcc/config/pyr/pyr.h
@@ -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
diff --git a/gcc/config/romp/romp.h b/gcc/config/romp/romp.h
index be12d36..158f2ef 100644
--- a/gcc/config/romp/romp.h
+++ b/gcc/config/romp/romp.h
@@ -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
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 087ac5a..9a5b281 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -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
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index a3aa9025..4a7f094 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -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
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index d839432..e87058c 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -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
diff --git a/gcc/config/spur/spur.h b/gcc/config/spur/spur.h
index 51e1add..b485d74 100644
--- a/gcc/config/spur/spur.h
+++ b/gcc/config/spur/spur.h
@@ -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
diff --git a/gcc/config/tahoe/tahoe.h b/gcc/config/tahoe/tahoe.h
index b4076ce..e104b4e 100644
--- a/gcc/config/tahoe/tahoe.h
+++ b/gcc/config/tahoe/tahoe.h
@@ -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 */
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index 9044f44..b09a475 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -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. */
diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h
index 1d4d67d..3a296a4 100644
--- a/gcc/config/vax/vax.h
+++ b/gcc/config/vax/vax.h
@@ -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
diff --git a/gcc/config/we32k/we32k.h b/gcc/config/we32k/we32k.h
index 460fc3d..e7d9238 100644
--- a/gcc/config/we32k/we32k.h
+++ b/gcc/config/we32k/we32k.h
@@ -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
diff --git a/gcc/expr.c b/gcc/expr.c
index 339f3e2..68fbbe9 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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 */
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 9779015..78e5b54 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -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)));
diff --git a/gcc/tm.texi b/gcc/tm.texi
index 027a891..e24a7e2 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -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