diff options
| author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-12 19:50:19 +0000 | 
|---|---|---|
| committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-12 19:50:19 +0000 | 
| commit | 3779309859a569eba8b16ff7b4b5826b3cec8927 (patch) | |
| tree | e6a1c470ce2f2c6f93f25f0ef5eb58ef5102fc2a /gcc | |
| parent | f2fa409d93551a559c732a29ce4c678d717cc84b (diff) | |
| download | ppe42-gcc-3779309859a569eba8b16ff7b4b5826b3cec8927.tar.gz ppe42-gcc-3779309859a569eba8b16ff7b4b5826b3cec8927.zip  | |
        * m88k-protos.h: New file.
        * m88k.c: Include tm_p.h.  Add static prototypes.  Fix compile
        time warnings.
        * m88k.h: Move prototypes to m88k-protos.h.  Fix compile time warnings.
        * m88k.md: Likewise.
        * tekXD88.h: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31359 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 13 | ||||
| -rw-r--r-- | gcc/config/m88k/m88k-protos.h | 108 | ||||
| -rw-r--r-- | gcc/config/m88k/m88k.c | 157 | ||||
| -rw-r--r-- | gcc/config/m88k/m88k.h | 79 | ||||
| -rw-r--r-- | gcc/config/m88k/m88k.md | 12 | ||||
| -rw-r--r-- | gcc/config/m88k/tekXD88.h | 8 | 
6 files changed, 237 insertions, 140 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ce2fed003e2..38d3bddeb12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,18 @@  2000-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu> +	* m88k-protos.h: New file. + +	* m88k.c: Include tm_p.h.  Add static prototypes.  Fix compile +	time warnings. +	 +	* m88k.h: Move prototypes to m88k-protos.h.  Fix compile time warnings. +	 +	* m88k.md: Likewise. + +	* tekXD88.h: Likewise. + +2000-01-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu> +  	* m68k-protos.h: New file.  	* m68k.c: Include tm_p.h.  Add static prototypes.  Fix compile diff --git a/gcc/config/m88k/m88k-protos.h b/gcc/config/m88k/m88k-protos.h new file mode 100644 index 00000000000..2812b20060a --- /dev/null +++ b/gcc/config/m88k/m88k-protos.h @@ -0,0 +1,108 @@ +/* Definitions of target machine for GNU compiler for +   Motorola m88100 in an 88open OCS/BCS environment. +   Copyright (C) 2000 Free Software Foundation, Inc. +   Contributed by Michael Tiemann (tiemann@cygnus.com). +   Currently maintained by (gcc@dg-rtp.dg.com) + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +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 RTX_CODE +extern int m88k_debugger_offset PARAMS ((rtx, int)); +extern void emit_bcnd PARAMS ((enum rtx_code, rtx)); +extern void expand_block_move PARAMS ((rtx, rtx, rtx *)); +extern void print_operand PARAMS ((FILE *, rtx, int)); +extern void print_operand_address PARAMS ((FILE *, rtx)); +extern const char *output_load_const_int PARAMS ((enum machine_mode, rtx *)); +extern const char *output_load_const_float PARAMS ((rtx *)); +extern const char *output_load_const_double PARAMS ((rtx *)); +extern const char *output_load_const_dimode PARAMS ((rtx *)); +extern const char *output_and PARAMS ((rtx[])); +extern const char *output_ior PARAMS ((rtx[])); +extern const char *output_xor PARAMS ((rtx[])); +extern const char *output_call PARAMS ((rtx[], rtx)); + +extern struct rtx_def *emit_test PARAMS ((enum rtx_code, enum machine_mode)); +extern struct rtx_def *legitimize_address PARAMS ((int, rtx, rtx, rtx)); +extern struct rtx_def *legitimize_operand PARAMS ((rtx, enum machine_mode)); + +extern int pic_address_needs_scratch PARAMS ((rtx)); +extern int symbolic_address_p PARAMS ((rtx)); +extern int condition_value PARAMS ((rtx)); +extern int emit_move_sequence PARAMS ((rtx *, enum machine_mode, rtx)); +extern int mostly_false_jump PARAMS ((rtx, rtx)); +extern int real_power_of_2_operand PARAMS ((rtx, enum machine_mode)); +extern int move_operand PARAMS ((rtx, enum machine_mode)); +extern int call_address_operand PARAMS ((rtx, enum machine_mode)); +extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode)); +extern int arith_operand PARAMS ((rtx, enum machine_mode)); +extern int arith5_operand PARAMS ((rtx, enum machine_mode)); +extern int arith32_operand PARAMS ((rtx, enum machine_mode)); +extern int arith64_operand PARAMS ((rtx, enum machine_mode)); +extern int int5_operand PARAMS ((rtx, enum machine_mode)); +extern int int32_operand PARAMS ((rtx, enum machine_mode)); +extern int add_operand PARAMS ((rtx, enum machine_mode)); +extern int reg_or_bbx_mask_operand PARAMS ((rtx, enum machine_mode)); +extern int real_or_0_operand PARAMS ((rtx, enum machine_mode)); +extern int partial_ccmode_register_operand PARAMS ((rtx, enum machine_mode)); +extern int relop PARAMS ((rtx, enum machine_mode)); +extern int even_relop PARAMS ((rtx, enum machine_mode)); +extern int odd_relop PARAMS ((rtx, enum machine_mode)); +extern int relop_no_unsigned PARAMS ((rtx, enum machine_mode)); +extern int equality_op PARAMS ((rtx, enum machine_mode)); +extern int pc_or_label_ref PARAMS ((rtx, enum machine_mode)); +extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); +#ifdef TREE_CODE +extern void m88k_va_start PARAMS ((int, tree, rtx)); +#endif /* TREE_CODE */ +#endif /* RTX_CODE */ + +#ifdef ANSI_PROTOTYPES +struct m88k_lang_independent_options; +#endif +extern void output_file_start PARAMS ((FILE *, +				       struct m88k_lang_independent_options *, +				       int, +				       struct m88k_lang_independent_options *, +				       int)); + +extern int null_prologue PARAMS ((void)); +extern int integer_ok_for_set PARAMS ((unsigned)); +extern void m88k_layout_frame PARAMS ((void)); +extern void m88k_expand_prologue PARAMS ((void)); +extern void m88k_begin_prologue PARAMS ((FILE *, int)); +extern void m88k_end_prologue PARAMS ((FILE *)); +extern void m88k_expand_epilogue PARAMS ((void)); +extern void m88k_begin_epilogue PARAMS ((FILE *)); +extern void m88k_end_epilogue PARAMS ((FILE *, int)); +extern void output_function_profiler PARAMS ((FILE *, int, const char *, int)); +extern void output_function_block_profiler PARAMS ((FILE *, int)); +extern void output_block_profiler PARAMS ((FILE *, int)); +extern void output_ascii PARAMS ((FILE *, const char *, int, +				  const unsigned char *, int)); +extern void output_label PARAMS ((int)); +extern struct rtx_def *m88k_builtin_saveregs PARAMS ((void)); +extern enum m88k_instruction classify_integer PARAMS ((enum machine_mode, int)); +extern int mak_mask_p PARAMS ((int)); + +#ifdef TREE_CODE +extern struct rtx_def *m88k_function_arg PARAMS ((CUMULATIVE_ARGS, +						  enum machine_mode, tree, +						  int)); +extern struct rtx_def *m88k_va_arg PARAMS ((tree, tree)); +extern tree m88k_build_va_list PARAMS ((void)); +#endif /* TREE_CODE */ diff --git a/gcc/config/m88k/m88k.c b/gcc/config/m88k/m88k.c index d33c6bcc50d..4e3ce2c94c3 100644 --- a/gcc/config/m88k/m88k.c +++ b/gcc/config/m88k/m88k.c @@ -1,5 +1,5 @@  /* Subroutines for insn-output.c for Motorola 88000. -   Copyright (C) 1988, 92, 93, 94, 95, 96, 1997, 1998, 1999 Free Software +   Copyright (C) 1988, 92-99, 2000 Free Software     Foundation, Inc.      Contributed by Michael Tiemann (tiemann@mcc.com)     Currently maintained by (gcc@dg-rtp.dg.com) @@ -37,14 +37,17 @@ Boston, MA 02111-1307, USA.  */  #include "c-tree.h"  #include "expr.h"  #include "flags.h" +#include "recog.h" +#include "toplev.h" +#include "tm_p.h"  extern char *version_string;  extern int flag_traditional;  extern FILE *asm_out_file; -char *m88k_pound_sign = "";	/* Either # for SVR4 or empty for SVR3 */ -char *m88k_short_data; -char *m88k_version; +const char *m88k_pound_sign = ""; /* Either # for SVR4 or empty for SVR3 */ +const char *m88k_short_data; +const char *m88k_version;  char m88k_volatile_code;  unsigned m88k_gp_threshold = 0; @@ -68,8 +71,6 @@ classify_integer (mode, value)       enum machine_mode mode;       register int value;  { -  register int mask; -    if (value == 0)      return m88k_zero;    else if (SMALL_INTVAL (value)) @@ -120,12 +121,12 @@ integer_ok_for_set (value)    return (value && POWER_OF_2_or_0 (mask + 1));  } -char * +const char *  output_load_const_int (mode, operands)       enum machine_mode mode;       rtx *operands;  { -  static char *patterns[] = +  static const char *const patterns[] =      { "or %0,%#r0,0",        "or %0,%#r0,%1",        "subu %0,%#r0,%n1", @@ -145,7 +146,7 @@ output_load_const_int (mode, operands)  /* These next two routines assume that floating point numbers are represented     in a manner which is consistent between host and target machines.  */ -char * +const char *  output_load_const_float (operands)       rtx *operands;  { @@ -156,7 +157,7 @@ output_load_const_float (operands)    return output_load_const_int (SImode, operands);  } -char * +const char *  output_load_const_double (operands)       rtx *operands;  { @@ -178,7 +179,7 @@ output_load_const_double (operands)    return output_load_const_int (SImode, operands);  } -char * +const char *  output_load_const_dimode (operands)       rtx *operands;  { @@ -340,7 +341,7 @@ legitimize_address (pic, orig, reg, scratch)  	}        else if (GET_CODE (addr) == CONST)  	{ -	  rtx base, offset; +	  rtx base;  	  if (GET_CODE (XEXP (addr, 0)) == PLUS  	      && XEXP (XEXP (addr, 0), 0) == pic_offset_table_rtx) @@ -466,17 +467,21 @@ static int max_from_align[] = {0, MOVSTR_QI, MOVSTR_HI, 0, MOVSTR_SI,  static int all_from_align[] = {0, MOVSTR_QI, MOVSTR_ODD_HI, 0, MOVSTR_ODD_SI,  			       0, 0, 0, MOVSTR_ODD_DI}; -static int best_from_align[3][9] = -  {0, MOVSTR_QI_LIMIT_88100, MOVSTR_HI_LIMIT_88100, 0, MOVSTR_SI_LIMIT_88100,  -   0, 0, 0, MOVSTR_DI_LIMIT_88100, -   0, MOVSTR_QI_LIMIT_88110, MOVSTR_HI_LIMIT_88110, 0, MOVSTR_SI_LIMIT_88110,  -   0, 0, 0, MOVSTR_DI_LIMIT_88110,   -   0, MOVSTR_QI_LIMIT_88000, MOVSTR_HI_LIMIT_88000, 0, MOVSTR_SI_LIMIT_88000, -   0, 0, 0, MOVSTR_DI_LIMIT_88000}; +static int best_from_align[3][9] = { +  {0, MOVSTR_QI_LIMIT_88100, MOVSTR_HI_LIMIT_88100, 0, MOVSTR_SI_LIMIT_88100, +   0, 0, 0, MOVSTR_DI_LIMIT_88100}, +  {0, MOVSTR_QI_LIMIT_88110, MOVSTR_HI_LIMIT_88110, 0, MOVSTR_SI_LIMIT_88110, +   0, 0, 0, MOVSTR_DI_LIMIT_88110}, +  {0, MOVSTR_QI_LIMIT_88000, MOVSTR_HI_LIMIT_88000, 0, MOVSTR_SI_LIMIT_88000, +   0, 0, 0, MOVSTR_DI_LIMIT_88000} +}; -static void block_move_loop (); -static void block_move_no_loop (); -static void block_move_sequence (); +static void block_move_loop PARAMS ((rtx, rtx, rtx, rtx, int, int)); +static void block_move_no_loop PARAMS ((rtx, rtx, rtx, rtx, int, int)); +static void block_move_sequence PARAMS ((rtx, rtx, rtx, rtx, int, int, int)); +static void output_short_branch_defs PARAMS ((FILE *)); +static int output_option PARAMS ((FILE *, const char *, const char *, +				  const char *, const char *, int, int));  /* Emit code to perform a block move.  Choose the best method. @@ -751,7 +756,7 @@ block_move_sequence (dest, dest_mem, src, src_mem, size, align, offset)  /* Emit the code to do an AND operation.  */ -char * +const char *  output_and (operands)       rtx operands[];  { @@ -777,7 +782,7 @@ output_and (operands)  /* Emit the code to do an inclusive OR operation.  */ -char * +const char *  output_ior (operands)       rtx operands[];  { @@ -799,7 +804,7 @@ output_ior (operands)  /* Emit the instructions for doing an XOR.  */ -char * +const char *  output_xor (operands)       rtx operands[];  { @@ -831,7 +836,7 @@ static rtx sb_name = 0;  static rtx sb_high = 0;  static rtx sb_low = 0; -char * +const char *  output_call (operands, addr)       rtx operands[];       rtx addr; @@ -852,7 +857,7 @@ output_call (operands, addr)        if (GET_CODE (jump) == JUMP_INSN)  	{  	  rtx low, high; -	  char *last; +	  const char *last;  	  rtx dest = XEXP (SET_SRC (PATTERN (jump)), 0);  	  int delta = 4 * (insn_addresses[INSN_UID (dest)]  			   - insn_addresses[INSN_UID (seq_insn)] @@ -1071,6 +1076,8 @@ mostly_false_jump (jump_insn, condition)        if (XEXP (condition, 1) == const0_rtx)  	return 0;        break; +    default: +      break;      }    return 0; @@ -1082,7 +1089,7 @@ mostly_false_jump (jump_insn, condition)  int  real_power_of_2_operand (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    union {      REAL_VALUE_TYPE d; @@ -1196,7 +1203,7 @@ move_operand (op, mode)  int  call_address_operand (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    return (REG_P (op) || symbolic_address_p (op));  } @@ -1278,7 +1285,7 @@ arith64_operand (op, mode)  int  int5_operand (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    return (GET_CODE (op) == CONST_INT && (unsigned) INTVAL (op) < 32);  } @@ -1286,7 +1293,7 @@ int5_operand (op, mode)  int  int32_operand (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    return (GET_CODE (op) == CONST_INT);  } @@ -1353,7 +1360,7 @@ real_or_0_operand (op, mode)  int  partial_ccmode_register_operand (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    return register_operand (op, CCmode) || register_operand (op, CCEVENmode);  } @@ -1363,7 +1370,7 @@ partial_ccmode_register_operand (op, mode)  int  relop (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    switch (GET_CODE (op))      { @@ -1386,7 +1393,7 @@ relop (op, mode)  int  even_relop (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    switch (GET_CODE (op))      { @@ -1404,7 +1411,7 @@ even_relop (op, mode)  int  odd_relop (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    switch (GET_CODE (op))      { @@ -1425,7 +1432,7 @@ odd_relop (op, mode)  int  relop_no_unsigned (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    switch (GET_CODE (op))      { @@ -1454,7 +1461,7 @@ relop_no_unsigned (op, mode)  int  equality_op (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    return (GET_CODE (op) == EQ || GET_CODE (op) == NE);  } @@ -1464,32 +1471,40 @@ equality_op (op, mode)  int  pc_or_label_ref (op, mode)       rtx op; -     enum machine_mode mode; +     enum machine_mode mode ATTRIBUTE_UNUSED;  {    return (GET_CODE (op) == PC || GET_CODE (op) == LABEL_REF);  }  /* Output to FILE the start of the assembler file.  */ -struct options +/* This definition must match lang_independent_options from toplev.c.  */ +struct m88k_lang_independent_options  { -  char *string; +  const char *string;    int *variable;    int on_value; -  char *description; +  const char *description;  }; +static void output_options PARAMS ((FILE *, +				    struct m88k_lang_independent_options *, +				    int, +				    struct m88k_lang_independent_options *, +				    int, int, int, const char *, const char *, +				    const char *)); +  static int  output_option (file, sep, type, name, indent, pos, max)       FILE *file; -     char *sep; -     char *type; -     char *name; -     char *indent; +     const char *sep; +     const char *type; +     const char *name; +     const char *indent;       int pos;       int max;  { -  if (strlen (sep) + strlen (type) + strlen (name) + pos > max) +  if ((long)(strlen (sep) + strlen (type) + strlen (name) + pos) > max)      {        fprintf (file, indent);        return fprintf (file, "%s%s", type, name); @@ -1497,19 +1512,20 @@ output_option (file, sep, type, name, indent, pos, max)    return pos + fprintf (file, "%s%s%s", sep, type, name);  } -static struct { char *name; int value; } m_options[] = TARGET_SWITCHES; +static struct { const char *name; int value; } m_options[] = TARGET_SWITCHES;  static void  output_options (file, f_options, f_len, W_options, W_len,  		pos, max, sep, indent, term)       FILE *file; -     struct options *f_options; -     struct options *W_options; +     struct m88k_lang_independent_options *f_options; +     struct m88k_lang_independent_options *W_options;       int f_len, W_len;       int pos;       int max; -     char *indent; -     char *term; +     const char *sep; +     const char *indent; +     const char *term;  {    register int j; @@ -1534,7 +1550,7 @@ output_options (file, f_options, f_len, W_options, W_len,        pos = output_option (file, sep, "-W", W_options[j].string,  			   indent, pos, max); -  for (j = 0; j < sizeof m_options / sizeof m_options[0]; j++) +  for (j = 0; j < (long) (sizeof m_options / sizeof m_options[0]); j++)      if (m_options[j].name[0] != '\0'  	&& m_options[j].value > 0  	&& ((m_options[j].value & target_flags) @@ -1552,8 +1568,8 @@ output_options (file, f_options, f_len, W_options, W_len,  void  output_file_start (file, f_options, f_len, W_options, W_len)       FILE *file; -     struct options *f_options; -     struct options *W_options; +     struct m88k_lang_independent_options *f_options; +     struct m88k_lang_independent_options *W_options;       int f_len, W_len;  {    register int pos; @@ -1595,9 +1611,9 @@ output_file_start (file, f_options, f_len, W_options, W_len)  void  output_ascii (file, opcode, max, p, size)       FILE *file; -     char *opcode; +     const char *opcode;       int max; -     unsigned char *p; +     const unsigned char *p;       int size;  {    int i; @@ -1741,10 +1757,11 @@ output_label (label_number)    variable space.    */ -static void emit_add (); -static void preserve_registers (); -static void emit_ldst (); -static void output_tdesc (); +static void emit_add PARAMS ((rtx, rtx, int)); +static void preserve_registers PARAMS ((int, int)); +static void emit_ldst PARAMS ((int, int, enum machine_mode, int)); +static void output_tdesc PARAMS ((FILE *, int)); +static int uses_arg_area_p PARAMS ((void));  static int  nregs;  static int  nxregs; @@ -1922,8 +1939,8 @@ uses_arg_area_p ()  void  m88k_begin_prologue (stream, size) -     FILE *stream; -     int size; +     FILE *stream ATTRIBUTE_UNUSED; +     int size ATTRIBUTE_UNUSED;  {    if (TARGET_OMIT_LEAF_FRAME_POINTER && ! quiet_flag && leaf_function_p ())      fprintf (stderr, "$"); @@ -2022,7 +2039,7 @@ m88k_begin_epilogue (stream)  void  m88k_end_epilogue (stream, size)       FILE *stream; -     int size; +     int size ATTRIBUTE_UNUSED;  {    rtx insn = get_last_insn (); @@ -2341,9 +2358,9 @@ output_tdesc (file, offset)    ASM_GENERATE_INTERNAL_LABEL (buf, OCS_END_PREFIX, m88k_function_number);    fprintf (file, ",%s%s", buf+1, flag_pic ? "#rel" : ""); -  fprintf (file, ",0x%x,0x%x,0x%x,0x%x", +  fprintf (file, ",0x%x,0x%x,0x%lx,0x%lx",  	   /* 8:1,17:0x%.3x,1:0,1:%d,5:%d */ -	   (((xmask ? 3 : 1) << (17+1+1+5)) +	   (int)(((xmask ? 3 : 1) << (17+1+1+5))  	    | (mask << (1+1+5))  	    | ((!!save_regs[1]) << 5)  	    | (frame_pointer_needed @@ -2353,7 +2370,7 @@ output_tdesc (file, offset)  	   return_address_info,  	   register_save_offset);    if (xmask) -    fprintf (file, ",0x%x%04x", xmask, (0xffff & xregister_save_offset)); +    fprintf (file, ",0x%lx%04lx", xmask, (0xffff & xregister_save_offset));    fputc ('\n', file);    text_section (); @@ -2368,7 +2385,7 @@ void  output_function_profiler (file, labelno, name, savep)       FILE *file;       int labelno; -     char *name; +     const char *name;       int savep;  {    char label[256]; @@ -2526,7 +2543,7 @@ m88k_function_arg (args_so_far, mode, type, named)       CUMULATIVE_ARGS args_so_far;       enum machine_mode mode;       tree type; -     int named; +     int named ATTRIBUTE_UNUSED;  {    int bytes, words; @@ -2655,7 +2672,7 @@ m88k_build_va_list ()  void  m88k_va_start (stdarg_p, valist, nextarg) -     int stdarg_p; +     int stdarg_p ATTRIBUTE_UNUSED;       tree valist;       rtx nextarg ATTRIBUTE_UNUSED;  { @@ -2840,7 +2857,7 @@ void  print_operand (file, x, code)      FILE *file;      rtx x; -    char code; +    int code;  {    enum rtx_code xc = (x ? GET_CODE (x) : UNKNOWN);    register int value = (xc == CONST_INT ? INTVAL (x) : 0); diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h index 83c402e9ce8..d043f23a2df 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-97, 1998 Free Software Foundation, Inc. +   Copyright (C) 1988, 92-99, 2000 Free Software Foundation, Inc.     Contributed by Michael Tiemann (tiemann@cygnus.com).     Currently maintained by (gcc@dg-rtp.dg.com) @@ -93,9 +93,9 @@ enum processor_type {  /* External variables/functions defined in m88k.c.  */ -extern char *m88k_pound_sign; -extern char *m88k_short_data; -extern char *m88k_version; +extern const char *m88k_pound_sign; +extern const char *m88k_short_data; +extern const char *m88k_version;  extern char m88k_volatile_code;  extern unsigned m88k_gp_threshold; @@ -111,46 +111,6 @@ extern struct rtx_def *m88k_compare_op1;  extern enum processor_type m88k_cpu; -extern int null_prologue (); -extern int integer_ok_for_set (); -extern int m88k_debugger_offset (); - - -extern void emit_bcnd (); -extern void expand_block_move (); -extern void m88k_layout_frame (); -extern void m88k_expand_prologue (); -extern void m88k_begin_prologue (); -extern void m88k_end_prologue (); -extern void m88k_expand_epilogue (); -extern void m88k_begin_epilogue (); -extern void m88k_end_epilogue (); -extern void output_function_profiler (); -extern void output_function_block_profiler (); -extern void output_block_profiler (); -extern void output_file_start (); -extern void output_ascii (); -extern void output_label (); -extern void print_operand (); -extern void print_operand_address (); - -extern char *output_load_const_int (); -extern char *output_load_const_float (); -extern char *output_load_const_double (); -extern char *output_load_const_dimode (); -extern char *output_and (); -extern char *output_ior (); -extern char *output_xor (); -extern char *output_call (); - -extern struct rtx_def *emit_test (); -extern struct rtx_def *legitimize_address (); -extern struct rtx_def *legitimize_operand (); -extern struct rtx_def *m88k_function_arg (); -extern struct rtx_def *m88k_builtin_saveregs (); - -extern enum m88k_instruction classify_integer (); -  /* external variables defined elsewhere in the compiler */  extern int target_flags;			/* -m compiler switches */ @@ -329,7 +289,7 @@ extern int flag_pic;				/* -fpic */  									     \      if (m88k_short_data)						     \        {									     \ -	char *p = m88k_short_data;					     \ +	const char *p = m88k_short_data;				     \  	while (*p)							     \  	  if (*p >= '0' && *p <= '9')					     \  	    p++;							     \ @@ -1076,17 +1036,14 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,  /* Define the `__builtin_va_list' type for the ABI.  */  #define BUILD_VA_LIST_TYPE(VALIST) \    (VALIST) = m88k_build_va_list () -extern union tree_node *m88k_build_va_list ();  /* Implement `va_start' for varargs and stdarg.  */  #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \    m88k_va_start (stdarg, valist, nextarg) -extern void m88k_va_start ();  /* Implement `va_arg'.  */  #define EXPAND_BUILTIN_VA_ARG(valist, type) \    m88k_va_arg (valist, type) -extern struct rtx_def *m88k_va_arg ();  /* Generate the assembly code for function entry. */  #define FUNCTION_PROLOGUE(FILE, SIZE) m88k_begin_prologue(FILE, SIZE) @@ -1858,8 +1815,11 @@ extern struct rtx_def *m88k_va_arg ();  /* Override svr[34].h.  */  #undef	ASM_FILE_START  #define ASM_FILE_START(FILE) \ -  output_file_start (FILE, f_options, sizeof f_options / sizeof f_options[0], \ -		     W_options, sizeof W_options / sizeof W_options[0]) +  output_file_start (FILE, \ +	(struct m88k_lang_independent_options *) f_options, \ +	sizeof f_options / sizeof f_options[0], \ +	(struct m88k_lang_independent_options *) W_options, \ +	sizeof W_options / sizeof W_options[0])  #undef	ASM_FILE_END @@ -1898,7 +1858,7 @@ extern struct rtx_def *m88k_va_arg ();  #define ASM_OUTPUT_OPCODE(STREAM, PTR)					\    {									\      int ch;								\ -    char *orig_ptr;							\ +    const char *orig_ptr;						\  									\      for (orig_ptr = (PTR);						\  	 (ch = *(PTR)) && ch != ' ' && ch != '\t' && ch != '\n' && ch != '%'; \ @@ -1929,7 +1889,7 @@ extern struct rtx_def *m88k_va_arg ();     is our `condition code' register), so that condition codes can easily     be clobbered by an asm.  The carry bit in the PSR is now used.  */ -#define ADDITIONAL_REGISTER_NAMES	{"psr", 0, "cc", 0} +#define ADDITIONAL_REGISTER_NAMES	{{"psr", 0}, {"cc", 0}}  /* How to renumber registers for dbx and gdb.  */  #define DBX_REGISTER_NUMBER(REGNO) (REGNO) @@ -1985,7 +1945,7 @@ extern struct rtx_def *m88k_va_arg ();  #undef ASM_FINISH_DECLARE_OBJECT  #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)	 \  do {									 \ -     char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);			 \ +     const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);		 \       if (!flag_inhibit_size_directive && DECL_SIZE (DECL)		 \  	 && DECLARE_ASM_NAME						 \           && ! AT_END && TOP_LEVEL					 \ @@ -2117,8 +2077,8 @@ do {									 \    do {									\      union { REAL_VALUE_TYPE d; long l[2]; } x;				\      x.d = (VALUE);							\ -    fprintf (FILE, "\t%s\t 0x%.8x, 0x%.8x\n", INT_ASM_OP,			\ -	     x.l[0], x.l[1]);						\ +    fprintf (FILE, "\t%s\t 0x%.8lx, 0x%.8lx\n", INT_ASM_OP,		\ +	     (long) x.l[0], (long) x.l[1]);				\    } while (0)  /* This is how to output an assembler line defining a `float' constant.  */ @@ -2317,7 +2277,7 @@ do {									 \  #define PUT_SDB_SCL(a)						\    do {								\      register int s = (a);					\ -    register char *scl;						\ +    register const char *scl;					\      switch (s)							\        {								\        case C_EFCN:	scl = "end of function";	break;	\ @@ -2357,9 +2317,10 @@ do {									 \    do {								\      register int t = (a);					\      static char buffer[100];					\ -    register char *p = buffer, *q;				\ +    register char *p = buffer;					\ +    register const char *q;					\      register int typ = t;					\ -    register int i,d;						\ +    register int i;						\  								\      for (i = 0; i <= 5; i++)					\        {								\ @@ -2611,6 +2572,7 @@ sdata_section ()							\  #define ENCODE_SECTION_INFO(DECL)					\    do {									\      if (m88k_gp_threshold > 0)						\ +    {									\        if (TREE_CODE (DECL) == VAR_DECL)					\  	{								\  	  if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL))	\ @@ -2625,6 +2587,7 @@ sdata_section ()							\  	       && flag_writable_strings					\  	       && TREE_STRING_LENGTH (DECL) <= m88k_gp_threshold)	\  	SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (DECL), 0)) = 1;		\ +    }									\    } while (0)  /* Print operand X (an rtx) in assembler syntax to file FILE. diff --git a/gcc/config/m88k/m88k.md b/gcc/config/m88k/m88k.md index 85d944e2c36..9cc810b1d88 100644 --- a/gcc/config/m88k/m88k.md +++ b/gcc/config/m88k/m88k.md @@ -1,5 +1,5 @@  ;;- Machine description for the Motorola 88000 for GNU C compiler -;;;  Copyright (C) 1988, 92-96, 1998, 1999 Free Software Foundation, Inc. +;;  Copyright (C) 1988, 92-96, 98, 99, 2000 Free Software Foundation, Inc.  ;;  Contributed by Michael Tiemann (tiemann@mcc.com)  ;;  Currently maintained by (gcc@dg-rtp.dg.com) @@ -23,14 +23,6 @@  ;;- See file "rtl.def" for documentation on define_insn, match_*, et. al. -;; RCS rev field.  This is a NOP, just to get the RCS id into the -;; program image. -(define_expand "m88k_rcs_id" -  [(match_operand:SI 0 "" "")] -  "" -  "{ static char rcs_id[] = \"$What: <@(#) m88k.md,v	1.1.1.2.2.2> $\"; -     FAIL; }") -  ;; Attribute describing the processor.  This attribute must match exactly  ;; with the processor_type enumeration in m88k.h. @@ -3058,7 +3050,7 @@    "  {    operands[1] = legitimize_operand (operands[1], DFmode); -  if (real_power_of_2_operand (operands[2])) +  if (real_power_of_2_operand (operands[2], DFmode))      {        union real_extract u;        bcopy (&CONST_DOUBLE_LOW (operands[2]), &u, sizeof u); diff --git a/gcc/config/m88k/tekXD88.h b/gcc/config/m88k/tekXD88.h index 5b37dead612..8a52f14a0fb 100644 --- a/gcc/config/m88k/tekXD88.h +++ b/gcc/config/m88k/tekXD88.h @@ -1,6 +1,6 @@  /* Tektronix XD88 UTekV 3.2e   (svr3 derived from UniSoft System V/88) -   Copyright (C) 1993 Free Software Foundation, Inc. +   Copyright (C) 1993, 2000 Free Software Foundation, Inc.     Contributed by Kaveh R. Ghazi (ghazi@caip.rutgers.edu)  2/22/93.     This file is part of GNU CC. @@ -36,8 +36,12 @@  /* I don't know if this SDB thing is needed or not --KRG */ -/* Use T_ARG as T_VOID.  T_VOID is not defined in <syms.h> as it should be.  */ +/* Use T_ARG as T_VOID.  T_VOID is not defined in <syms.h> as it +   should be.  If we're cross compiling, then don't do this because +   "gsyms.h" has T_VOID.  */ +#ifndef CROSS_COMPILE  #define T_VOID T_ARG +#endif  /* The bundled ld program needs link editor directives which normally  | 

