Commit 18543a22 by Ian Lance Taylor Committed by Jeff Law

expr.c (do_tablejump): Let CASE_VECTOR_PC_RELATIVE be an expression.

        * 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
parent f1f5f142
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> 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 * objc/Make-lang.in: Create runtime-info.h and libobjc_entry.o in
......
...@@ -835,10 +835,11 @@ enum reg_class { NO_REGS, R2, R0_1, INDEX_REGS, BASE_REGS, ALL_REGS, LIM_REG_CLA ...@@ -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. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE QImode #define CASE_VECTOR_MODE QImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
table.
Do not define this if the table should contain absolute addresses. */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -1207,10 +1207,11 @@ extern char *a29k_function_name; ...@@ -1207,10 +1207,11 @@ extern char *a29k_function_name;
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -1502,13 +1502,14 @@ extern void alpha_init_expanders (); ...@@ -1502,13 +1502,14 @@ extern void alpha_init_expanders ();
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. 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 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, 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. */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -1539,13 +1539,14 @@ do { if ((LOG) != 0) fprintf (FILE, "\t.align %d\n", 1 << (LOG)); } while (0) ...@@ -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. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE Pmode #define CASE_VECTOR_MODE Pmode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ 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 /* 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 for the embedded form currently being talked about. For now require -fpic
to get pc relative switch tables. */ 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 /* Define if operations between registers always perform the operation
on the full register even if a narrower mode is specified. */ on the full register even if a narrower mode is specified. */
......
...@@ -86,7 +86,7 @@ extern int frame_pointer_needed; ...@@ -86,7 +86,7 @@ extern int frame_pointer_needed;
#if TARGET_CPU_DEFAULT == TARGET_CPU_arm2 #if TARGET_CPU_DEFAULT == TARGET_CPU_arm2
#define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_2__" #define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_2__"
#else #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__" #define CPP_ARCH_DEFAULT_SPEC "-D__ARM_ARCH_3__"
#else #else
#if TARGET_CPU_DEFAULT == TARGET_CPU_arm7m #if TARGET_CPU_DEFAULT == TARGET_CPU_arm7m
...@@ -346,7 +346,7 @@ extern char *target_fp_name; ...@@ -346,7 +346,7 @@ extern char *target_fp_name;
{"apcs-float", ARM_FLAG_APCS_FLOAT}, \ {"apcs-float", ARM_FLAG_APCS_FLOAT}, \
{"no-apcs-float", -ARM_FLAG_APCS_FLOAT}, \ {"no-apcs-float", -ARM_FLAG_APCS_FLOAT}, \
{"apcs-reentrant", ARM_FLAG_APCS_REENT}, \ {"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}, \ {"short-load-bytes", ARM_FLAG_SHORT_BYTE}, \
{"no-short-load-bytes", -ARM_FLAG_SHORT_BYTE}, \ {"no-short-load-bytes", -ARM_FLAG_SHORT_BYTE}, \
{"short-load-words", -ARM_FLAG_SHORT_BYTE}, \ {"short-load-words", -ARM_FLAG_SHORT_BYTE}, \
...@@ -437,7 +437,7 @@ extern enum floating_point_type arm_fpu; ...@@ -437,7 +437,7 @@ extern enum floating_point_type arm_fpu;
/* What type of floating point instructions are available */ /* What type of floating point instructions are available */
extern enum floating_point_type arm_fpu_arch; 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. */ necessary. */
#define FP_DEFAULT FP_SOFT2 #define FP_DEFAULT FP_SOFT2
...@@ -483,6 +483,11 @@ extern int arm_arch4; ...@@ -483,6 +483,11 @@ extern int arm_arch4;
(MODE) = SImode; \ (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. /* Define for XFmode extended real floating point support.
This will automatically cause REAL_ARITHMETIC to be defined. */ This will automatically cause REAL_ARITHMETIC to be defined. */
/* For the ARM: /* For the ARM:
...@@ -905,7 +910,13 @@ enum reg_class ...@@ -905,7 +910,13 @@ enum reg_class
/* If we generate an insn to push BYTES bytes, /* If we generate an insn to push BYTES bytes,
this says how many the stack pointer really advances by. */ 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. */ /* Offset of first parameter from the argument pointer register value. */
#define FIRST_PARM_OFFSET(FNDECL) 4 #define FIRST_PARM_OFFSET(FNDECL) 4
...@@ -1102,8 +1113,10 @@ enum reg_class ...@@ -1102,8 +1113,10 @@ enum reg_class
int volatile_func = arm_volatile_func (); \ int volatile_func = arm_volatile_func (); \
if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\ if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\
(OFFSET) = 0; \ (OFFSET) = 0; \
else if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM)\ else if ((FROM) == FRAME_POINTER_REGNUM \
(OFFSET) = (get_frame_size () + 3 & ~3); \ && (TO) == STACK_POINTER_REGNUM) \
(OFFSET) = (current_function_outgoing_args_size \
+ (get_frame_size () + 3 & ~3)); \
else \ else \
{ \ { \
int regno; \ int regno; \
...@@ -1125,8 +1138,10 @@ enum reg_class ...@@ -1125,8 +1138,10 @@ enum reg_class
{ \ { \
if (! frame_pointer_needed) \ if (! frame_pointer_needed) \
offset -= 16; \ 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 += 4; \
offset += current_function_outgoing_args_size; \
(OFFSET) = (get_frame_size () + 3 & ~3) + offset; \ (OFFSET) = (get_frame_size () + 3 & ~3) + offset; \
} \ } \
} \ } \
...@@ -1390,14 +1405,15 @@ do \ ...@@ -1390,14 +1405,15 @@ do \
else if (BASE_REGISTER_RTX_P (xop1)) \ else if (BASE_REGISTER_RTX_P (xop1)) \
GO_IF_LEGITIMATE_INDEX (MODE, REGNO (xop1), xop0, LABEL); \ 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 xop0 = XEXP (X,0); \
rtx xop1 = XEXP (X,1); \ rtx xop1 = XEXP (X,1); \
\ \
if (BASE_REGISTER_RTX_P (xop0)) \ if (BASE_REGISTER_RTX_P (xop0)) \
GO_IF_LEGITIMATE_INDEX (MODE, -1, xop1, LABEL); \ GO_IF_LEGITIMATE_INDEX (MODE, -1, xop1, LABEL); \
} \ } */ \
else if (GET_MODE_CLASS (MODE) != MODE_FLOAT \ else if (GET_MODE_CLASS (MODE) != MODE_FLOAT \
&& GET_CODE (X) == SYMBOL_REF \ && GET_CODE (X) == SYMBOL_REF \
&& CONSTANT_POOL_ADDRESS_P (X)) \ && CONSTANT_POOL_ADDRESS_P (X)) \
...@@ -1500,10 +1516,11 @@ extern struct rtx_def *legitimize_pic_address (); ...@@ -1500,10 +1516,11 @@ extern struct rtx_def *legitimize_pic_address ();
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
...@@ -1742,27 +1759,23 @@ extern int arm_compare_fp; ...@@ -1742,27 +1759,23 @@ extern int arm_compare_fp;
goto JUMPTO goto JUMPTO
/* Output an internal label definition. */ /* Output an internal label definition. */
#define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) \ #define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) \
do \ do \
{ \ { \
char *s = (char *) alloca (40 + strlen (PREFIX)); \ char *s = (char *) alloca (40 + strlen (PREFIX)); \
extern int arm_target_label, arm_ccfsm_state; \ extern int arm_target_label, arm_ccfsm_state; \
extern rtx arm_target_insn; \ extern rtx arm_target_insn; \
\ \
if (arm_ccfsm_state == 3 && arm_target_label == (NUM) \ if (arm_ccfsm_state == 3 && arm_target_label == (NUM) \
&& !strcmp (PREFIX, "L")) \ && !strcmp (PREFIX, "L")) \
{ \ { \
arm_ccfsm_state = 0; \ arm_ccfsm_state = 0; \
arm_target_insn = NULL; \ arm_target_insn = NULL; \
} \ } \
ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \ ASM_GENERATE_INTERNAL_LABEL (s, (PREFIX), (NUM)); \
arm_asm_output_label (STREAM, s); \ ASM_OUTPUT_LABEL (STREAM, s); \
} while (0) } 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). */ /* Output a push or a pop instruction (only used when profiling). */
#define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \ #define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \
fprintf(STREAM,"\tstmfd\t%ssp!,{%s%s}\n", \ fprintf(STREAM,"\tstmfd\t%ssp!,{%s%s}\n", \
...@@ -1916,9 +1929,10 @@ do { \ ...@@ -1916,9 +1929,10 @@ do { \
shift += 8; \ shift += 8; \
} \ } \
} \ } \
fprintf (FILE, "\tldr\t%spc, [%spc, #-4]\n", REGISTER_PREFIX, \ fputs ("\tb\t", FILE); \
REGISTER_PREFIX); \ assemble_name (FILE, \
ASM_OUTPUT_INT (FILE, XEXP (DECL_RTL (FUNCTION), 0)); \ IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (FUNCTION))); \
fputc ('\n', FILE); \
} while (0) } while (0)
/* A C expression whose value is RTL representing the value of the return /* A C expression whose value is RTL representing the value of the return
...@@ -1927,7 +1941,7 @@ do { \ ...@@ -1927,7 +1941,7 @@ do { \
#define RETURN_ADDR_RTX(COUNT, FRAME) \ #define RETURN_ADDR_RTX(COUNT, FRAME) \
((COUNT == 0) \ ((COUNT == 0) \
? gen_rtx (MEM, Pmode, plus_constant (FRAME, -4)) \ ? gen_rtx (MEM, Pmode, plus_constant (FRAME, -4)) \
: (rtx) 0) : NULL_RTX)
/* Used to mask out junk bits from the return address, such as /* Used to mask out junk bits from the return address, such as
processor state, interrupt status, condition codes and the like. */ 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 *, ...@@ -2003,9 +2017,9 @@ int arm_valid_machine_decl_attribute (/* union tree_node *, union tree_node *,
union tree_node *, union tree_node *,
union tree_node * */); union tree_node * */);
struct rtx_def *arm_gen_load_multiple (/* int, int, struct rtx_def *, 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 *, 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 ** */); int arm_gen_movstrqi (/* struct rtx_def ** */);
struct rtx_def *gen_rotated_half_load (/* 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 *, 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 ** */); ...@@ -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_long_double_arm_from_arm (/* struct rtx_def ** */);
char *output_mov_double_fpu_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_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_mov_immediate (/* struct rtx_def ** */);
char *output_add_immediate (/* struct rtx_def ** */); char *output_add_immediate (/* struct rtx_def ** */);
char *arithmetic_instr (/* struct rtx_def *, int */); char *arithmetic_instr (/* struct rtx_def *, int */);
...@@ -2035,8 +2049,6 @@ void output_func_prologue (/* FILE *, int */); ...@@ -2035,8 +2049,6 @@ void output_func_prologue (/* FILE *, int */);
void output_func_epilogue (/* FILE *, int */); void output_func_epilogue (/* FILE *, int */);
void arm_expand_prologue (/* void */); void arm_expand_prologue (/* void */);
void arm_print_operand (/* FILE *, struct rtx_def *, int */); 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 */); void final_prescan_insn (/* struct rtx_def *, struct rtx_def **, int */);
#ifdef AOF_ASSEMBLER #ifdef AOF_ASSEMBLER
struct rtx_def *aof_pic_entry (/* struct rtx_def * */); struct rtx_def *aof_pic_entry (/* struct rtx_def * */);
......
...@@ -777,10 +777,11 @@ do \ ...@@ -777,10 +777,11 @@ do \
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the case instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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 /* 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 when the index is out of range. Don't define it if the case insn
......
...@@ -1029,10 +1029,11 @@ enum reg_class { ...@@ -1029,10 +1029,11 @@ enum reg_class {
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the case instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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 /* 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 when the index is out of range. Don't define it if the case insn
......
/* Definitions of target machine for GNU compiler. AT&T DSP1600. /* 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). Contributed by Michael Collison (collison@world.std.com).
This file is part of GNU CC. This file is part of GNU CC.
...@@ -440,7 +440,7 @@ extern int target_flags; ...@@ -440,7 +440,7 @@ extern int target_flags;
/* 1 for registers that have pervasive standard uses /* 1 for registers that have pervasive standard uses
and are not available for the register allocator. 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 {a0,a0l,a1,a1l,x,y,yl,p,pl} - Data Arithmetic Unit
{r0,r1,r2,r3,j,k,ybase} - Y Space Address Arithmetic Unit {r0,r1,r2,r3,j,k,ybase} - Y Space Address Arithmetic Unit
...@@ -1652,7 +1652,7 @@ const_section () \ ...@@ -1652,7 +1652,7 @@ const_section () \
/* This is how to output an assembler line defining a `float' constant. */ /* This is how to output an assembler line defining a `float' constant. */
#define ASM_OUTPUT_FLOAT(FILE,VALUE) asm_output_float (FILE, VALUE) #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. */ size HFmode. */
#define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE) asm_output_float (FILE, VALUE) #define ASM_OUTPUT_SHORT_FLOAT(FILE,VALUE) asm_output_float (FILE, VALUE)
...@@ -1921,10 +1921,11 @@ const_section () \ ...@@ -1921,10 +1921,11 @@ const_section () \
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE QImode #define CASE_VECTOR_MODE QImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -618,10 +618,11 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES }; ...@@ -618,10 +618,11 @@ enum reg_class { NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES };
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the case instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -819,10 +819,11 @@ extern enum reg_class regno_reg_class[]; ...@@ -819,10 +819,11 @@ extern enum reg_class regno_reg_class[];
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE HImode #define CASE_VECTOR_MODE HImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
#define CASE_VECTOR_PC_RELATIVE 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -1121,10 +1121,11 @@ extern enum reg_class regno_reg_class[]; ...@@ -1121,10 +1121,11 @@ extern enum reg_class regno_reg_class[];
/* #define CASE_VECTOR_MODE HImode */ /* #define CASE_VECTOR_MODE HImode */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
#define CASE_VECTOR_PC_RELATIVE 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -351,7 +351,7 @@ enum reg_class { ...@@ -351,7 +351,7 @@ enum reg_class {
#define REG_CLASS_CONTENTS \ #define REG_CLASS_CONTENTS \
{ 0, /* No regs */ \ { 0, /* No regs */ \
0x0ff, /* GENERAL_REGS */ \ 0x2ff, /* GENERAL_REGS */ \
0x100, /* MAC_REGS */ \ 0x100, /* MAC_REGS */ \
0x3ff, /* ALL_REGS */ \ 0x3ff, /* ALL_REGS */ \
} }
...@@ -780,7 +780,9 @@ struct rtx_def *function_arg(); ...@@ -780,7 +780,9 @@ struct rtx_def *function_arg();
#define REG_OK_FOR_INDEX_P(X) 0 #define REG_OK_FOR_INDEX_P(X) 0
/* Nonzero if X is a hard reg that can be used as a base reg /* Nonzero if X is a hard reg that can be used as a base reg
or if it is a pseudo 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_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 REG_OK_FOR_BASE_P_STRICT(X) REGNO_OK_FOR_BASE_P (REGNO (X))
#define STRICT 0 #define STRICT 0
...@@ -862,9 +864,7 @@ struct rtx_def *function_arg(); ...@@ -862,9 +864,7 @@ struct rtx_def *function_arg();
has an effect that depends on the machine mode it is used for. has an effect that depends on the machine mode it is used for.
On the H8/300, the predecrement and postincrement address depend thus On the H8/300, the predecrement and postincrement address depend thus
(the amount of decrement or increment being the length of the operand) (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). */
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) goto LABEL; if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) goto LABEL;
...@@ -873,10 +873,11 @@ struct rtx_def *function_arg(); ...@@ -873,10 +873,11 @@ struct rtx_def *function_arg();
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE Pmode #define CASE_VECTOR_MODE Pmode
/* Define this if the case instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/*#define CASE_VECTOR_PC_RELATIVE*/ 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 /* 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 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) ...@@ -986,7 +987,7 @@ h8300_valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
/* Tell final.c how to eliminate redundant test instructions. */ /* Tell final.c how to eliminate redundant test instructions. */
/* Here we define machine-dependent flags and fields in cc_status /* 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 /* Store in cc_status the expressions
that the condition codes will describe that the condition codes will describe
...@@ -1347,7 +1348,7 @@ do { char dstr[30]; \ ...@@ -1347,7 +1348,7 @@ do { char dstr[30]; \
#define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE,X,CODE) #define PRINT_OPERAND(FILE, X, CODE) print_operand(FILE,X,CODE)
/* Print a memory operand whose address is X, on file FILE. /* 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) #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
......
/* Definitions of target machine for GNU compiler. System/370 version. /* 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). Contributed by Jan Stein (jan@cd.chalmers.se).
Modified for C/370 MVS by Dave Pitts (dpitts@nyx.cs.du.edu) 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 ...@@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#ifdef sun
#include <sys/types.h>
#include <ctype.h>
#endif
#include <time.h>
#define TARGET_VERSION printf (" (370/MVS)"); #define TARGET_VERSION printf (" (370/MVS)");
/* Options for the preprocessor for this target machine. */ /* Options for the preprocessor for this target machine. */
...@@ -489,103 +483,7 @@ enum reg_class ...@@ -489,103 +483,7 @@ enum reg_class
/* This macro generates the assembly code for function entry. /* This macro generates the assembly code for function entry.
All of the C/370 environment is preserved. */ All of the C/370 environment is preserved. */
#define FUNCTION_PROLOGUE(FILE, LSIZE) i370_function_prolog ((FILE), (LSIZE));
#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 ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
{ \ { \
...@@ -890,11 +788,11 @@ enum reg_class ...@@ -890,11 +788,11 @@ enum reg_class
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table to contain /* Define as C expression which evaluates to nonzero if the tablejump
offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
......
...@@ -1791,10 +1791,11 @@ while (0) ...@@ -1791,10 +1791,11 @@ while (0)
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE Pmode #define CASE_VECTOR_MODE Pmode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. /* Specify the tree operation to be used to convert reals to integers.
This should be changed to take advantage of fist --wfs ?? This should be changed to take advantage of fist --wfs ??
......
...@@ -842,10 +842,11 @@ struct cumulative_args { int ints, floats; }; ...@@ -842,10 +842,11 @@ struct cumulative_args { int ints, floats; };
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -1076,10 +1076,11 @@ extern struct rtx_def *legitimize_address (); ...@@ -1076,10 +1076,11 @@ extern struct rtx_def *legitimize_address ();
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
/* 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. Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA. */
- longlong.h? - longlong.h?
*/ */
/* FIXME: Create elf.h and have svr4.h include it. */ /* ??? Create elf.h and have svr4.h include it. */
#include "svr4.h" #include "svr4.h"
#undef SWITCH_TAKES_ARG #undef SWITCH_TAKES_ARG
...@@ -703,7 +703,7 @@ M32R_STACK_ALIGN (current_function_outgoing_args_size) ...@@ -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 Do not define this macro unless there is no other way to get the
return address from the stack. */ return address from the stack. */
/* FIXME: revisit */ /* ??? revisit */
/* #define RETURN_ADDRESS_POINTER_REGNUM */ /* #define RETURN_ADDRESS_POINTER_REGNUM */
/* Register in which static-chain is passed to a function. This must /* Register in which static-chain is passed to a function. This must
...@@ -886,7 +886,7 @@ M32R_STACK_ALIGN (current_function_outgoing_args_size) ...@@ -886,7 +886,7 @@ M32R_STACK_ALIGN (current_function_outgoing_args_size)
? gen_rtx (REG, (MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \ ? gen_rtx (REG, (MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))) \
: 0) : 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) \ #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \
(((! current_function_varargs || (NAMED)) \ (((! current_function_varargs || (NAMED)) \
&& PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED))) \ && PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED))) \
...@@ -1061,7 +1061,7 @@ m32r_output_function_epilogue (FILE, SIZE) ...@@ -1061,7 +1061,7 @@ m32r_output_function_epilogue (FILE, SIZE)
jmp r6 jmp r6
nop nop
FIXME: Need addr32 support. ??? Need addr32 support.
*/ */
/* Length in bytes of the trampoline for entering a nested function. */ /* Length in bytes of the trampoline for entering a nested function. */
...@@ -1224,7 +1224,7 @@ m32r_select_cc_mode (OP, X, Y) ...@@ -1224,7 +1224,7 @@ m32r_select_cc_mode (OP, X, Y)
/* Return non-zero if SELECT_CC_MODE will never return MODE for a /* Return non-zero if SELECT_CC_MODE will never return MODE for a
floating point inequality comparison. */ floating point inequality comparison. */
#define REVERSIBLE_CC_MODE(MODE) 1 /*FIXME*/ #define REVERSIBLE_CC_MODE(MODE) 1 /*???*/
/* Costs. */ /* Costs. */
...@@ -1779,13 +1779,14 @@ do { \ ...@@ -1779,13 +1779,14 @@ do { \
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE Pmode #define CASE_VECTOR_MODE Pmode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ 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 /* 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 for the embedded form currently being talked about. For now require -fpic
to get pc relative switch tables. */ 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 /* Define if operations between registers always perform the operation
on the full register even if a narrower mode is specified. */ on the full register even if a narrower mode is specified. */
......
...@@ -1551,10 +1551,11 @@ __transfer_from_trampoline () \ ...@@ -1551,10 +1551,11 @@ __transfer_from_trampoline () \
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE HImode #define CASE_VECTOR_MODE HImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
#define CASE_VECTOR_PC_RELATIVE 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
/* Definitions of target machine for GNU compiler for /* Definitions of target machine for GNU compiler for
Motorola m88100 in an 88open OCS/BCS environment. 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). Contributed by Michael Tiemann (tiemann@cygnus.com).
Currently maintained by (gcc@dg-rtp.dg.com) Currently maintained by (gcc@dg-rtp.dg.com)
...@@ -198,13 +198,13 @@ extern char * reg_names[]; ...@@ -198,13 +198,13 @@ extern char * reg_names[];
Redefined in sysv4.h, and luna.h. */ Redefined in sysv4.h, and luna.h. */
#define VERSION_INFO1 "m88k, " #define VERSION_INFO1 "m88k, "
#ifndef VERSION_INFO2 #ifndef VERSION_INFO2
#define VERSION_INFO2 "$Revision: 1.1 $" #define VERSION_INFO2 "$Revision: 1.3 $"
#endif #endif
#ifndef VERSION_STRING #ifndef VERSION_STRING
#define VERSION_STRING version_string #define VERSION_STRING version_string
#ifdef __STDC__ #ifdef __STDC__
#define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.1 $ " __DATE__ #define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.3 $ " __DATE__
#else #else
#define TM_RCS_ID "$What: <@(#) m88k.h,v 1.1.1.2.2.2> $" #define TM_RCS_ID "$What: <@(#) m88k.h,v 1.1.1.2.2.2> $"
#endif /* __STDC__ */ #endif /* __STDC__ */
...@@ -1510,8 +1510,11 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS, ...@@ -1510,8 +1510,11 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
elements of a jump-table should have. */ elements of a jump-table should have. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this macro if jump-tables should contain relative addresses. */ /* Define as C expression which evaluates to nonzero if the tablejump
#define CASE_VECTOR_PC_RELATIVE 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 /* Define this if control falls through a `case' insn when the index
value is out of range. This means the specified default-label is 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, ...@@ -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. */ /* Tell when to handle #pragma weak. This is only done for V.4. */
#define SUPPORTS_WEAK TARGET_SVR4 #define SUPPORTS_WEAK TARGET_SVR4
#define SUPPORTS_ONE_ONLY TARGET_SVR4
/* Max number of bytes we can move from memory to memory /* Max number of bytes we can move from memory to memory
in one reasonably fast instruction. */ in one reasonably fast instruction. */
......
...@@ -2795,7 +2795,7 @@ while (0) ...@@ -2795,7 +2795,7 @@ while (0)
/* Define this if the tablejump instruction expects the table /* Define this if the tablejump instruction expects the table
to contain offsets from the address of the table. to contain offsets from the address of the table.
Do not define this if the table should contain absolute addresses. */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -1088,10 +1088,11 @@ while (0) ...@@ -1088,10 +1088,11 @@ while (0)
all programs. */ all programs. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
#define CASE_VECTOR_PC_RELATIVE 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -879,10 +879,11 @@ extern int current_function_pretend_args_size; ...@@ -879,10 +879,11 @@ extern int current_function_pretend_args_size;
`tablejump' insn. */ `tablejump' insn. */
#define CASE_TAKES_INDEX_RAW #define CASE_TAKES_INDEX_RAW
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -989,10 +989,11 @@ extern int current_function_calls_alloca; ...@@ -989,10 +989,11 @@ extern int current_function_calls_alloca;
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/*#define CASE_VECTOR_PC_RELATIVE*/ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -1143,10 +1143,11 @@ struct rt_cargs {int gregs, fregs; }; ...@@ -1143,10 +1143,11 @@ struct rt_cargs {int gregs, fregs; };
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -2002,10 +2002,11 @@ typedef struct rs6000_args ...@@ -2002,10 +2002,11 @@ typedef struct rs6000_args
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE (TARGET_32BIT ? SImode : DImode) #define CASE_VECTOR_MODE (TARGET_32BIT ? SImode : DImode)
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
#define CASE_VECTOR_PC_RELATIVE 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -1188,10 +1188,11 @@ extern struct rtx_def *sh_builtin_saveregs (); ...@@ -1188,10 +1188,11 @@ extern struct rtx_def *sh_builtin_saveregs ();
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode) #define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode)
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
#define CASE_VECTOR_PC_RELATIVE 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -2461,10 +2461,11 @@ extern struct rtx_def *legitimize_pic_address (); ...@@ -2461,10 +2461,11 @@ extern struct rtx_def *legitimize_pic_address ();
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE Pmode #define CASE_VECTOR_MODE Pmode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -738,10 +738,11 @@ extern int current_function_pretend_args_size; ...@@ -738,10 +738,11 @@ extern int current_function_pretend_args_size;
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -575,9 +575,11 @@ enum reg_class {NO_REGS,GENERAL_REGS,FPP_REG,ALL_REGS,LIM_REG_CLASSES}; ...@@ -575,9 +575,11 @@ enum reg_class {NO_REGS,GENERAL_REGS,FPP_REG,ALL_REGS,LIM_REG_CLASSES};
#define CASE_VECTOR_MODE HImode #define CASE_VECTOR_MODE HImode
/* each of the table elements in a case are relative to the jump address */ /* Define as C expression which evaluates to nonzero if the tablejump
instruction expects the table to contain offsets from the address of the
#define CASE_VECTOR_PC_RELATIVE 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 */ /* tahoe case instructions just fall through to the next instruction */
/* if not satisfied. It doesn't support a default action */ /* if not satisfied. It doesn't support a default action */
......
...@@ -1317,10 +1317,11 @@ do { char dstr[30]; \ ...@@ -1317,10 +1317,11 @@ do { char dstr[30]; \
jumps to the default label instead. */ jumps to the default label instead. */
/* #define CASE_DROPS_THROUGH */ /* #define CASE_DROPS_THROUGH */
/* We must use a PC relative entry for small tables. It would be more /* Define as C expression which evaluates to nonzero if the tablejump
efficient to use an absolute entry for big tables, but this is not instruction expects the table to contain offsets from the address of the
a runtime choice yet. */ table.
#define CASE_VECTOR_PC_RELATIVE 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 /* The switch instruction requires that the jump table immediately follow
it. */ it. */
......
...@@ -446,7 +446,7 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12)) ...@@ -446,7 +446,7 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
/* This macro generates the assembly code for function entry. /* This macro generates the assembly code for function entry.
FILE is a stdio stream to output the code to. FILE is a stdio stream to output the code to.
SIZE is an int: how many units of temporary storage to allocate, 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 Refer to the array `regs_ever_live' to determine which registers
to save; `regs_ever_live[I]' is nonzero if register number I to save; `regs_ever_live[I]' is nonzero if register number I
is ever used in the function. This macro is responsible for 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)) ...@@ -813,10 +813,11 @@ gen_rtx (PLUS, Pmode, frame, gen_rtx (CONST_INT, VOIDmode, 12))
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE HImode #define CASE_VECTOR_MODE HImode
/* Define this if the case instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
#define CASE_VECTOR_PC_RELATIVE 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 /* 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 when the index is out of range. Don't define it if the case insn
......
...@@ -625,10 +625,11 @@ enum reg_class { NO_REGS, GENERAL_REGS, ...@@ -625,10 +625,11 @@ enum reg_class { NO_REGS, GENERAL_REGS,
for the index in the tablejump instruction. */ for the index in the tablejump instruction. */
#define CASE_VECTOR_MODE SImode #define CASE_VECTOR_MODE SImode
/* Define this if the tablejump instruction expects the table /* Define as C expression which evaluates to nonzero if the tablejump
to contain offsets from the address of the table. instruction expects the table to contain offsets from the address of the
Do not define this if the table should contain absolute addresses. */ table.
/* #define CASE_VECTOR_PC_RELATIVE */ 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. */ /* Specify the tree operation to be used to convert reals to integers. */
#define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
......
...@@ -73,6 +73,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -73,6 +73,11 @@ Boston, MA 02111-1307, USA. */
/* Like STACK_BOUNDARY but in units of bytes, not bits. */ /* Like STACK_BOUNDARY but in units of bytes, not bits. */
#define STACK_BYTES (STACK_BOUNDARY / BITS_PER_UNIT) #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 /* If this is nonzero, we do not bother generating VOLATILE
around volatile memory references, and we are willing to around volatile memory references, and we are willing to
output indirect addresses. If cse is to follow, we reject output indirect addresses. If cse is to follow, we reject
...@@ -11320,12 +11325,10 @@ do_tablejump (index, mode, range, table_label, default_label) ...@@ -11320,12 +11325,10 @@ do_tablejump (index, mode, range, table_label, default_label)
emit_jump_insn (gen_tablejump (temp, table_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 /* 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. */ 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 (); emit_barrier ();
#endif
} }
#endif /* HAVE_tablejump */ #endif /* HAVE_tablejump */
......
...@@ -63,6 +63,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -63,6 +63,11 @@ Boston, MA 02111-1307, USA. */
#define obstack_chunk_free free #define obstack_chunk_free free
struct obstack stmt_obstack; 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, /* Filename and line number of last line-number note,
whether we actually emitted it or not. */ whether we actually emitted it or not. */
char *emit_filename; char *emit_filename;
...@@ -5700,13 +5705,7 @@ expand_end_case (orig_index) ...@@ -5700,13 +5705,7 @@ expand_end_case (orig_index)
/* Output the table */ /* Output the table */
emit_label (table_label); emit_label (table_label);
/* This would be a lot nicer if CASE_VECTOR_PC_RELATIVE if (CASE_VECTOR_PC_RELATIVE || flag_pic)
were an expression, instead of an #ifdef/#ifndef. */
if (
#ifdef CASE_VECTOR_PC_RELATIVE
1 ||
#endif
flag_pic)
emit_jump_insn (gen_rtx (ADDR_DIFF_VEC, CASE_VECTOR_MODE, emit_jump_insn (gen_rtx (ADDR_DIFF_VEC, CASE_VECTOR_MODE,
gen_rtx (LABEL_REF, Pmode, table_label), gen_rtx (LABEL_REF, Pmode, table_label),
gen_rtvec_v (ncases, labelvec))); gen_rtvec_v (ncases, labelvec)));
......
...@@ -6830,7 +6830,9 @@ elements of a jump-table should have. ...@@ -6830,7 +6830,9 @@ elements of a jump-table should have.
@findex CASE_VECTOR_PC_RELATIVE @findex CASE_VECTOR_PC_RELATIVE
@item 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 @findex CASE_DROPS_THROUGH
@item CASE_DROPS_THROUGH @item CASE_DROPS_THROUGH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment