[gnu.gcc] GCC tm-ctix.h and xm-ctix.h for Convergent S/320

paul@dy4.uucp (Paul Burry) (06/30/89)

Here are the tm and xm files for compilation of GCC 1.35 for our
Convergent Technology 3/320 (Mitiframe) running CTIX 5.23.  This 
machine runs a flavour of System V.2.

A couple of questions and requests...

	I'd like to submit these configuration files to the FSF
for inclusion in future releases.  Is posting to this group sufficient
or is there a formal submission method ?

	The file "m68k.md" contains many preprocessor directives
(ie. HPUX_ASM and SGS_3B1) which control the format of the assembler
instructions generated.  Shouldn't machine independent defines be 
used instead ?  The define HPUX_ASM is used to determine the order
of the operands given for compare instructions.  To my knowledge,
all System V.[23] machines require the operands be reversed.  Presumably, 
the SGS_3B1 define is used to accomodate the peculiarities of the 3b1
assembler but is seems many System V.[23] exhibit the same problems.
	
Anyway, here are the configuration files...

------------------------- cut here -----------------------------
:
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  MAKE.ctix tm-ctix.h xm-ctix.h
# Wrapped by paul@seu13 on Thu Jun 29 18:31:36 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'MAKE.ctix' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MAKE.ctix'\"
else
echo shar: Extracting \"'MAKE.ctix'\" \(1717 characters\)
sed "s/^X//" >'MAKE.ctix' <<'END_OF_FILE'
X:
X######################################################################
X#
X# NOTES:
X#
X# 1) CTIX cpp can only handle a limited number of #defines
X#	Fortunately we have a number of other 'C' preprocessors
X# available. ie. GH CPP, emacs-dist/cpp. Simply copy the new CPP
X# to /lib and use CTIX C to compile everything.
X#
X# 2) CTIX compiler cannot handle casts applied to enums.
X#	The CTIX 'C' compiler cannot handle a cast applied to an enum.
X# When such a cast is encountered, the compiler issues the message:
X#	<line>, "filename": compiler error: bigsize 012
X# To continue compilation, edit the file in question and add an ifdef  
X# which conditionally compiles the offending line without the cast.
X#	ie. ifdef __GNUC__
X#
X######################################################################
X#
Xgccflags="-O -fomit-frame-pointer -msoft-float"
Xccflags="-O -DUSE_C_ALLOCA"
X
Xecho ============= Stage 1 : make gcc with CTIX C ======================   &&
Xmake OLDCC='cc -B/lib/newcpp/' CC=cc ALLOCA=alloca.c CLIB=alloca.o CFLAGS="$ccflags" $* &&
Xecho =============== Moving stage1 GCC to stage1/ ======================   &&
Xmake stage1 $*								   &&
Xecho ============= Stage 2 : remake gcc with stage1/gcc ================   &&
Xmake CC=stage1/gcc CLIB= CFLAGS="-Bstage1/ $gccflags" $*		   &&
Xecho =============== Moving stage2 GCC to stage2/ ======================   &&
Xmake stage2 $*								   &&
Xecho ============= Stage 3: remake gcc with stage2/gcc =================   &&
Xmake CC=stage2/gcc CLIB= CFLAGS="-Bstage2/ $gccflags" $*		   &&
Xecho =============== Moving stage3 GCC to stage3/ ======================   &&
Xmake stage3 $*								   &&
Xecho ========================== Done ====================================
X
END_OF_FILE
if test 1717 -ne `wc -c <'MAKE.ctix'`; then
    echo shar: \"'MAKE.ctix'\" unpacked with wrong size!
fi
chmod +x 'MAKE.ctix'
# end of 'MAKE.ctix'
fi
if test -f 'tm-ctix.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'tm-ctix.h'\"
else
echo shar: Extracting \"'tm-ctix.h'\" \(22542 characters\)
sed "s/^X//" >'tm-ctix.h' <<'END_OF_FILE'
X/* Definitions of target machine for GNU compiler.  
X   Convergent Technologies CTIX 5.22 version (mitiframe)
X
X   Written by Paul Burry
X
X   Copyright (C) 1987 Free Software Foundation, Inc.
X
XThis file is part of GNU CC.
X
XGNU CC is free software; you can redistribute it and/or modify
Xit under the terms of the GNU General Public License as published by
Xthe Free Software Foundation; either version 1, or (at your option)
Xany later version.
X
XGNU CC is distributed in the hope that it will be useful,
Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
XGNU General Public License for more details.
X
XYou should have received a copy of the GNU General Public License
Xalong with GNU CC; see the file COPYING.  If not, write to
Xthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
X
X#define SGS_3B1
X#define CTIX_ASM
X#define MOTOROLA
X#define SGS
X#define HPUX_ASM
X
X#include "tm-m68k.h"
X
X/* See tm-m68k.h.  7 means 68020 with 68881.  */
X
X#ifndef TARGET_DEFAULT
X#define	TARGET_DEFAULT 7
X#endif
X
X/* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified.
X   This will control the use of inline 68881 insns in certain macros.  */
X
X/* __CTIX_ASM__ is needed because some programs, particularly GDB, need to
X   know which assembler is being used so that the correct `asm'
X   instructions can be used. */
X
X#if TARGET_DEFAULT & 02
X
X/* -m68881 is the default */
X#define CPP_SPEC \
X"%{!msoft-float:-D__HAVE_68881__ }\
X%{!ansi:%{m68000:-Dmc68000}%{mc68000:-Dmc68000}%{!mc68000:%{!m68000:-Dmc68020}}}"
X
X#else
X
X/* -msoft-float is the default */
X#define CPP_SPEC \
X"%{m68881:-D__HAVE_68881__ }\
X%{!ansi:%{m68000:-Dmc68000}%{mc68000:-Dmc68000}%{!mc68000:%{!m68000:-Dmc68020}}}"
X
X#endif
X
X/* -m68020 does not require special flags to the assembler.  */
X#undef ASM_SPEC
X
X/* special directory for gnu libs on CTIX system */
X#ifndef STANDARD_STARTFILE_PREFIX
X#define STANDARD_STARTFILE_PREFIX "/usr/local/lib/gnu/"
X#endif
X
X/* Names to predefine in the preprocessor for this target machine
X   (for non-strict-ANSI programs only).  */
X
X#undef CPP_PREDEFINES
X#define CPP_PREDEFINES "-Dmc68k -Dunix"
X
X/* Every structure or union's size must be a multiple of 2 bytes.  */
X
X#define STRUCTURE_SIZE_BOUNDARY 16
X
X/* Generate calls to memcpy, memcmp and memset.  */
X#define TARGET_MEM_FUNCTIONS
X
X#undef TARGET_VERSION
X#define TARGET_VERSION fprintf (stderr, " (68k, SGS/AT&T CTIX syntax)");
X
X#undef REGISTER_NAMES
X#define REGISTER_NAMES \
X{"%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",	\
X "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp",	\
X "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7"}
X
X#undef FUNCTION_PROLOGUE
X#define FUNCTION_PROLOGUE(FILE, SIZE)     \
X{ register int regno;						\
X  register int mask = 0;					\
X  extern char call_used_regs[];					\
X  int fsize = ((SIZE) + 3) & -4;				\
X  if (frame_pointer_needed)					\
X    { if (fsize < 0x8000)					\
X        fprintf (FILE, "\tlink.w %%a6,&%d\n", -fsize);		\
X      else if (TARGET_68020)					\
X        fprintf (FILE, "\tlink.l %%a6,&%d\n", -fsize);		\
X      else							\
X	fprintf (FILE, "\tlink.w %%a6,&0\n\tsub.l &%d,%%sp\n", fsize); }  \
X  for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++)	\
X    if (regs_ever_live[regno] && ! call_used_regs[regno])	\
X       mask |= 1 << (regno - 16);				\
X  if (mask != 0)						\
X    fprintf (FILE, "\tfmovm &0x%x,-(%%sp)\n", mask & 0xff);       \
X  mask = 0;							\
X  for (regno = 0; regno < 16; regno++)				\
X    if (regs_ever_live[regno] && ! call_used_regs[regno])	\
X       mask |= 1 << (15 - regno);				\
X  if (frame_pointer_needed)					\
X    mask &= ~ (1 << (15-FRAME_POINTER_REGNUM));			\
X  if (exact_log2 (mask) >= 0)					\
X    fprintf (FILE, "\tmov.l %s,-(%%sp)\n", reg_names[15 - exact_log2 (mask)]);  \
X  else if (mask) fprintf (FILE, "\tmovm.l &0x%x,-(%%sp)\n", mask); }
X
X#undef FUNCTION_EPILOGUE
X#define FUNCTION_EPILOGUE(FILE, SIZE) \
X{ register int regno;						\
X  register int mask, fmask;					\
X  register int nregs;						\
X  int offset, foffset;						\
X  extern char call_used_regs[];					\
X  extern int current_function_pops_args;			\
X  extern int current_function_args_size;			\
X  int fsize = ((SIZE) + 3) & -4;				\
X  int big = 0;							\
X  nregs = 0;  fmask = 0;					\
X  for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++)	\
X    if (regs_ever_live[regno] && ! call_used_regs[regno])	\
X      { nregs++; fmask |= 1 << (23 - regno); }			\
X  foffset = nregs * 12;						\
X  nregs = 0;  mask = 0;						\
X  if (frame_pointer_needed) regs_ever_live[FRAME_POINTER_REGNUM] = 0; \
X  for (regno = 0; regno < 16; regno++)				\
X    if (regs_ever_live[regno] && ! call_used_regs[regno])	\
X      { nregs++; mask |= 1 << regno; }				\
X  offset = foffset + nregs * 4;					\
X  if (offset + fsize >= 0x8000 && frame_pointer_needed)		\
X    { fprintf (FILE, "\tmov.l &%d,%%a0\n", -fsize);		\
X      fsize = 0, big = 1; }					\
X  if (exact_log2 (mask) >= 0) {					\
X    if (big)							\
X      fprintf (FILE, "\tmov.l -%d(%%a6,%%a0.l),%s\n",		\
X	       offset + fsize, reg_names[exact_log2 (mask)]);	\
X    else if (! frame_pointer_needed)				\
X      fprintf (FILE, "\tmov.l (%%sp)+,%s\n",			\
X	       reg_names[exact_log2 (mask)]);			\
X    else							\
X      fprintf (FILE, "\tmov.l -%d(%%a6),%s\n",			\
X	       offset + fsize, reg_names[exact_log2 (mask)]); }	\
X  else if (mask) {						\
X    if (big)							\
X      fprintf (FILE, "\tmovm.l -%d(%%a6,%%a0.l),&0x%x\n",	\
X	       offset + fsize, mask);				\
X    else if (! frame_pointer_needed)				\
X      fprintf (FILE, "\tmovm.l (%%sp)+,&0x%x\n", mask);		\
X    else							\
X      fprintf (FILE, "\tmovm.l -%d(%%a6),&0x%x\n",		\
X	       offset + fsize, mask); }				\
X  if (fmask) {							\
X    if (big)							\
X      fprintf (FILE, "\tfmovm -%d(%%a6,%%a0.l),&0x%x\n",	\
X	       foffset + fsize, fmask);				\
X    else if (! frame_pointer_needed)				\
X      fprintf (FILE, "\tfmovm (%%sp)+,&0x%x\n", fmask);		\
X    else							\
X      fprintf (FILE, "\tfmovm -%d(%%a6),&0x%x\n",		\
X	       foffset + fsize, fmask); }			\
X  if (frame_pointer_needed)					\
X    fprintf (FILE, "\tunlk %%a6\n");				\
X  if (current_function_pops_args && current_function_args_size)	\
X    fprintf (FILE, "\trtd &%d\n", current_function_args_size);	\
X  else fprintf (FILE, "\trts\n"); }
X
X#undef ASM_OUTPUT_REG_PUSH
X/* This is how to output an insn to push a register on the stack.
X   It need not be very fast code.  */
X
X#define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \
X  fprintf (FILE, "\tmov.l %s,-(%%sp)\n", reg_names[REGNO])
X
X#undef ASM_OUTPUT_REG_POP
X/* This is how to output an insn to pop a register from the stack.
X   It need not be very fast code.  */
X
X#define ASM_OUTPUT_REG_POP(FILE,REGNO)  \
X  fprintf (FILE, "\tmov.l (%%sp)+,%s\n", reg_names[REGNO])
X
X#undef ASM_FILE_START
X#define ASM_FILE_START(FILE)
X
X#undef ASM_APP_ON
X#define ASM_APP_ON ""
X
X#undef ASM_APP_OFF
X#define ASM_APP_OFF ""
X
X#undef TEXT_SECTION_ASM_OP
X#define TEXT_SECTION_ASM_OP "\ttext"
X
X#undef DATA_SECTION_ASM_OP
X#define DATA_SECTION_ASM_OP "\tdata"
X
X#undef ASCII_DATA_ASM_OP
X#define	ASCII_DATA_ASM_OP "\tbyte"
X
X#undef ASM_OUTPUT_DOUBLE
X#define ASM_OUTPUT_DOUBLE(FILE, VALUE)					\
X  fprintf (FILE, "\tdouble 0f%.20g\n", (VALUE))
X
X#undef ASM_OUTPUT_FLOAT
X#define ASM_OUTPUT_FLOAT(FILE, VALUE)					\
X  fprintf (FILE, "\tfloat 0f%.9g\n", (VALUE))
X
X#undef ASM_OUTPUT_INT
X#define ASM_OUTPUT_INT(FILE,VALUE)  \
X( fprintf (FILE, "\tlong "),			\
X  output_addr_const (FILE, (VALUE)),		\
X  fprintf (FILE, "\n"))
X
X#undef ASM_OUTPUT_SHORT
X#define ASM_OUTPUT_SHORT(FILE,VALUE)  \
X( fprintf (FILE, "\tshort "),			\
X  output_addr_const (FILE, (VALUE)),		\
X  fprintf (FILE, "\n"))
X
X#undef ASM_OUTPUT_CHAR
X#define ASM_OUTPUT_CHAR(FILE,VALUE)  \
X( fprintf (FILE, "\tbyte "),			\
X  output_addr_const (FILE, (VALUE)),		\
X  fprintf (FILE, "\n"))
X
X#undef ASM_OUTPUT_BYTE
X#define ASM_OUTPUT_BYTE(FILE,VALUE)  \
X  fprintf (FILE, "\tbyte 0x%x\n", (VALUE))
X
X#undef ASM_OUTPUT_ADDR_VEC_ELT
X#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)	\
X    fprintf (FILE, "\tlong L%%L%d\n", (VALUE))
X
X#undef ASM_OUTPUT_ADDR_DIFF_ELT
X#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL)	\
X    fprintf (FILE, "\tshort L%%L%d-L%%L%d\n", (VALUE), (REL))
X
X#undef ASM_OUTPUT_CASE_LABEL
X#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLE)	\
X    fprintf (FILE, "\tswbeg &%d\nL%%%s%d:\n",		\
X	     XVECLEN (PATTERN (TABLE), 1), (PREFIX), (NUM))
X
X#undef ASM_OUTPUT_ALIGN
X#define ASM_OUTPUT_ALIGN(FILE,LOG)	\
X  if ((LOG) == 1)			\
X    fprintf (FILE, "\teven\n");	\
X  else if ((LOG) != 0)			\
X    abort ();
X
X#undef ASM_OUTPUT_SKIP
X#define ASM_OUTPUT_SKIP(FILE,SIZE)  \
X  fprintf (FILE, "\tspace %d\n", (SIZE))
X
X#undef ASM_OUTPUT_COMMON
X#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
X( fputs ("\tcomm ", (FILE)),			\
X  assemble_name ((FILE), (NAME)),		\
X  fprintf ((FILE), ",%d\n", (ROUNDED)))
X
X#undef ASM_OUTPUT_LOCAL
X#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
X( fputs ("\tlcomm ", (FILE)),			\
X  assemble_name ((FILE), (NAME)),		\
X  fprintf ((FILE), ",%d\n", (ROUNDED)))
X
X#undef ASM_GENERATE_INTERNAL_LABEL
X#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM)	\
X  sprintf ((LABEL), "L%%%s%d", (PREFIX), (NUM))
X
X#undef ASM_FORMAT_PRIVATE_NAME
X#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)	\
X( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 12),	\
X  sprintf ((OUTPUT), "L%%%s%d", (NAME), (LABELNO)))
X
X#undef PRINT_OPERAND
X#define PRINT_OPERAND(FILE, X, CODE)  \
X{ if (CODE == '.') fprintf (FILE, ".");					\
X  else if (CODE == '#') fprintf (FILE, "&");				\
X  else if (CODE == '-') fprintf (FILE, "-(%%sp)");			\
X  else if (CODE == '+') fprintf (FILE, "(%%sp)+");			\
X  else if (CODE == '@') fprintf (FILE, "(%%sp)");			\
X  else if (CODE == '!') fprintf (FILE, "%%cc");				\
X  else if (GET_CODE (X) == REG)						\
X    fprintf (FILE, "%s", reg_names[REGNO (X)]);				\
X  else if (GET_CODE (X) == MEM)						\
X    output_address (XEXP (X, 0));					\
X  else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode)	\
X    { union { double d; int i[2]; } u;					\
X      union { float f; int i; } u1;					\
X      u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X);	\
X      u1.f = u.d;							\
X      if (CODE == 'f')							\
X        fprintf (FILE, "&0f%.9g", u1.f);				\
X      else								\
X        fprintf (FILE, "&0x%x", u1.i); }				\
X  else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode)	\
X    { union { double d; int i[2]; } u;					\
X      u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X);	\
X      fprintf (FILE, "&0f%.20g", u.d); }				\
X  else { putc ('&', FILE); output_addr_const (FILE, X); }}
X
X#undef PRINT_OPERAND_ADDRESS
X#define PRINT_OPERAND_ADDRESS(FILE, ADDR)  \
X{ register rtx reg1, reg2, breg, ireg;					\
X  register rtx addr = ADDR;						\
X  rtx offset;								\
X  switch (GET_CODE (addr))						\
X    {									\
X    case REG:								\
X      fprintf (FILE, "(%s)", reg_names[REGNO (addr)]);			\
X      break;								\
X    case PRE_DEC:							\
X      fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]);	\
X      break;								\
X    case POST_INC:							\
X      fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]);	\
X      break;								\
X    case PLUS:								\
X      reg1 = 0;	reg2 = 0;						\
X      ireg = 0;	breg = 0;						\
X      offset = 0;							\
X      if (CONSTANT_ADDRESS_P (XEXP (addr, 0)))				\
X	{								\
X	  offset = XEXP (addr, 0);					\
X	  addr = XEXP (addr, 1);					\
X	}								\
X      else if (CONSTANT_ADDRESS_P (XEXP (addr, 1)))			\
X	{								\
X	  offset = XEXP (addr, 1);					\
X	  addr = XEXP (addr, 0);					\
X	}								\
X      if (GET_CODE (addr) != PLUS) ;					\
X      else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND)		\
X	{								\
X	  reg1 = XEXP (addr, 0);					\
X	  addr = XEXP (addr, 1);					\
X	}								\
X      else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND)		\
X	{								\
X	  reg1 = XEXP (addr, 1);					\
X	  addr = XEXP (addr, 0);					\
X	}								\
X      else if (GET_CODE (XEXP (addr, 0)) == MULT)			\
X	{								\
X	  reg1 = XEXP (addr, 0);					\
X	  addr = XEXP (addr, 1);					\
X	}								\
X      else if (GET_CODE (XEXP (addr, 1)) == MULT)			\
X	{								\
X	  reg1 = XEXP (addr, 1);					\
X	  addr = XEXP (addr, 0);					\
X	}								\
X      else if (GET_CODE (XEXP (addr, 0)) == REG)			\
X	{								\
X	  reg1 = XEXP (addr, 0);					\
X	  addr = XEXP (addr, 1);					\
X	}								\
X      else if (GET_CODE (XEXP (addr, 1)) == REG)			\
X	{								\
X	  reg1 = XEXP (addr, 1);					\
X	  addr = XEXP (addr, 0);					\
X	}								\
X      if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT		\
X	  || GET_CODE (addr) == SIGN_EXTEND)				\
X	{ if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; }	\
X/*  for OLD_INDEXING							\
X      else if (GET_CODE (addr) == PLUS)					\
X	{								\
X	  if (GET_CODE (XEXP (addr, 0)) == REG)				\
X	    {								\
X	      reg2 = XEXP (addr, 0);					\
X	      addr = XEXP (addr, 1);					\
X	    }								\
X	  else if (GET_CODE (XEXP (addr, 1)) == REG)			\
X	    {								\
X	      reg2 = XEXP (addr, 1);					\
X	      addr = XEXP (addr, 0);					\
X	    }								\
X	}								\
X  */									\
X      if (offset != 0) { if (addr != 0) abort (); addr = offset; }	\
X      if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND			\
X		    || GET_CODE (reg1) == MULT))			\
X	  || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2))))		\
X	{ breg = reg2; ireg = reg1; }					\
X      else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1)))		\
X	{ breg = reg1; ireg = reg2; }					\
X      if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF)	\
X        { int scale = 1;						\
X	  if (GET_CODE (ireg) == MULT)					\
X	    { scale = INTVAL (XEXP (ireg, 1));				\
X	      ireg = XEXP (ireg, 0); }					\
X	  if (GET_CODE (ireg) == SIGN_EXTEND)				\
X	    fprintf (FILE, "10(%%pc,%s.w",				\
X		     reg_names[REGNO (XEXP (ireg, 0))]); 		\
X	  else								\
X	    fprintf (FILE, "10(%%pc,%s.l",				\
X		     reg_names[REGNO (ireg)]);				\
X	  if (scale != 1) fprintf (FILE, "*%d", scale);			\
X	  fprintf (FILE, ")");						\
X	  break; }							\
X      if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF)	\
X        { fprintf (FILE, "10(%%pc,%s.l",				\
X		   reg_names[REGNO (breg)]);				\
X	  putc (')', FILE);						\
X	  break; }							\
X      if (ireg != 0 || breg != 0)					\
X	{ int scale = 1;						\
X	  if (breg == 0)						\
X	    abort ();							\
X	  if (addr != 0)						\
X	    output_addr_const (FILE, addr);				\
X	  fprintf (FILE, "(%s", reg_names[REGNO (breg)]);		\
X	  if (ireg != 0)					        \
X	    putc (',', FILE);						\
X	  if (ireg != 0 && GET_CODE (ireg) == MULT)			\
X	    { scale = INTVAL (XEXP (ireg, 1));				\
X	      ireg = XEXP (ireg, 0); }					\
X	  if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND)		\
X	    fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]);	\
X	  else if (ireg != 0)						\
X	    fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]);		\
X	  if (scale != 1) fprintf (FILE, "*%d", scale);			\
X	  putc (')', FILE);						\
X	  break;							\
X	}								\
X      else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF)		\
X	{ fprintf (FILE, "10(%%pc,%s.w)",				\
X		   reg_names[REGNO (reg1)]);				\
X	  break; }							\
X    default:								\
X      if (GET_CODE (addr) == CONST_INT					\
X	  && INTVAL (addr) < 0x8000					\
X	  && INTVAL (addr) >= -0x8000)					\
X	fprintf (FILE, "%d", INTVAL (addr));				\
X      else								\
X        output_addr_const (FILE, addr);					\
X    }}
X
X#undef FUNCTION_PROFILER
X#define FUNCTION_PROFILER(FILE, LABEL_NO)	\
X    fprintf (FILE, "\tmov.l &L%%LP%d,%%a0\n\tjsr mcount\n", (LABEL_NO))
X
X#undef ASM_GLOBALIZE_LABEL
X#define ASM_GLOBALIZE_LABEL(FILE,NAME)	\
X    do { fputs ("\tglobal ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
X
X#undef ASM_OUTPUT_INTERNAL_LABEL
X#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)	\
X    fprintf (FILE, "L%%%s%d:\n", PREFIX, NUM)
X
X#undef ASM_OUTPUT_LABELREF
X#define ASM_OUTPUT_LABELREF(FILE,NAME)	\
X  fprintf (FILE, "%s", NAME)
X
X#undef ASM_OUTPUT_SOURCE_FILENAME
X#define ASM_OUTPUT_SOURCE_FILENAME(FILE, FILENAME) \
X  fprintf (FILE, "\tfile\t\"%s\"\n", FILENAME)
X
X#undef ASM_OUTPUT_SOURCE_LINE
X#define ASM_OUTPUT_SOURCE_LINE(FILE, LINENO)	\
X  fprintf (FILE, "\tln\t%d\n",			\
X	   (sdb_begin_function_line		\
X	    ? last_linenum - sdb_begin_function_line : 1))
X
X#undef ASM_OUTPUT_ASCII
X#define ASM_OUTPUT_ASCII(FILE,PTR,LEN) \
X  { register int sp = 0, lp = 0; \
X    fprintf (FILE, "\tbyte\t"); \
X  loop: \
X    if (PTR[sp] > ' ' && ! (PTR[sp] & 0x80) && PTR[sp] != '\\') \
X      { lp += 3; \
X	fprintf (FILE, "'%c", PTR[sp]); } \
X    else \
X      { lp += 5; \
X	fprintf (FILE, "0x%x", PTR[sp]); } \
X    if (++sp < LEN) \
X      {	if (lp > 60) \
X	  { lp = 0; \
X	    fprintf (FILE, "\n%s ", ASCII_DATA_ASM_OP); }	\
X	else \
X	  putc (',', FILE); \
X	goto loop; } \
X    putc ('\n', FILE); }
X
X#undef ASM_OUTPUT_OPCODE
X#define ASM_OUTPUT_OPCODE(FILE, PTR)			\
X{ if ((PTR)[0] == 'j' && (PTR)[1] == 'b')		\
X    { ++(PTR);						\
X      while (*(PTR) != ' ')				\
X	{ putc (*(PTR), (FILE)); ++(PTR); }		\
X      /*fprintf ((FILE), ".w");*/ }			\
X  else if ((PTR)[0] == 'f')				\
X    {							\
X      if (!strncmp ((PTR), "fbne", 4))			\
X	{ fprintf ((FILE), "fbneq"); (PTR) += 4; }	\
X      else if (!strncmp ((PTR), "fsne", 4))		\
X	{ fprintf ((FILE), "fsneq"); (PTR) += 4; }	\
X      else if (!strncmp ((PTR), "fmove", 5))		\
X	{ fprintf ((FILE), "fmov"); (PTR) += 5; }	\
X    }							\
X/* MOVE, MOVEA, MOVEQ, MOVEC ==> MOV	*/		\
X  else if ((PTR)[0] == 'm' && (PTR)[1] == 'o'		\
X	   && (PTR)[2] == 'v' && (PTR)[3] == 'e')	\
X    { fprintf ((FILE), "mov"); (PTR) += 4;		\
X       if ((PTR)[0] == 'q' || (PTR)[0] == 'a' ||	\
X	   (PTR)[0] == 'c') (PTR)++; }			\
X/* SUB, SUBQ, SUBA, SUBI ==> SUB */			\
X  else if ((PTR)[0] == 's' && (PTR)[1] == 'u' 		\
X	   && (PTR)[2] == 'b')				\
X    { fprintf ((FILE), "sub"); (PTR) += 3;		\
X       if ((PTR)[0] == 'q' || (PTR)[0] == 'i' || 	\
X	   (PTR)[0] == 'a') (PTR)++; }			\
X/* CMP, CMPA, CMPI, CMPM ==> CMP	*/		\
X  else if ((PTR)[0] == 'c' && (PTR)[1] == 'm'		\
X	   && (PTR)[2] == 'p')				\
X    { fprintf ((FILE), "cmp"); (PTR) += 3;		\
X       if ((PTR)[0] == 'a' || (PTR)[0] == 'i' || 	\
X	   (PTR)[0] == 'm') (PTR)++; }			\
X}
X
X#undef LIB_SPEC
X#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-L/lib/libp}%{pg:-L/lib/libp} -lc"
X
X#undef STARTFILE_SPEC
X#define STARTFILE_SPEC  \
X  "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
X
X/* cpp has to support a #sccs directive for the /usr/include files */
X#define SCCS_DIRECTIVE
X
X/* Allow #ident but output nothing for it.  */
X#define ASM_OUTPUT_IDENT(FILE, NAME)
X
X/* Make output for SDB.  */
X#define SDB_DEBUGGING_INFO
X
X/* The .file command should always begin the output.  */
X#undef ASM_FILE_START
X#define ASM_FILE_START(FILE) sdbout_filename ((FILE), main_input_filename)
X
X/* Don't try to define `gcc_compiled.' since the assembler might not
X   accept symbols with periods and GDB doesn't run on this machine anyway.  */
X#define ASM_IDENTIFY_GCC(FILE)
X
X/* Specify how to pad function arguments.
X   Value should be `upward', `downward' or `none'.
X   Same as the default, except no padding for large or variable-size args.  */
X
X#define FUNCTION_ARG_PADDING(mode, size)				\
X  (((mode) == BLKmode							\
X    ? (GET_CODE (size) == CONST_INT					\
X       && INTVAL (size) < PARM_BOUNDARY / BITS_PER_UNIT)		\
X    : GET_MODE_BITSIZE (mode) < PARM_BOUNDARY)				\
X   ? downward : none)
X
X/* Override part of the obstack macros.  */
X#define __PTR_TO_INT(P) ((int)(P))
X#define __INT_TO_PTR(P) ((char *)(P))
X
X/* Override usual definitions of SDB output macros.
X   These definitions differ only in the absence of the period
X   at the beginning of the name of the directive
X   and in the use of `~' as the symbol for the current location.  */
X
X#define PUT_SDB_SCL(a) fprintf(asm_out_file, "\tscl\t%d;", (a))
X#define PUT_SDB_INT_VAL(a) fprintf (asm_out_file, "\tval\t%d;", (a))
X#define PUT_SDB_VAL(a)				\
X( fputs ("\tval\t", asm_out_file),		\
X  output_addr_const (asm_out_file, (a)),	\
X  fputc (';', asm_out_file))
X
X#define PUT_SDB_DEF(a)				\
Xdo { fprintf (asm_out_file, "\tdef\t");	\
X     ASM_OUTPUT_LABELREF (asm_out_file, a); 	\
X     fprintf (asm_out_file, ";"); } while (0)
X
X#define PUT_SDB_PLAIN_DEF(a) fprintf(asm_out_file,"\tdef\t~%s;",a)
X#define PUT_SDB_ENDEF fputs("\tendef\n", asm_out_file)
X#define PUT_SDB_TYPE(a) fprintf(asm_out_file, "\ttype\t0%o;", a)
X#define PUT_SDB_SIZE(a) fprintf(asm_out_file, "\tsize\t%d;", a)
X#define PUT_SDB_DIM(a) fprintf(asm_out_file, "\tdim\t%d;", a)
X
X#define PUT_SDB_TAG(a)				\
Xdo { fprintf (asm_out_file, "\ttag\t");	\
X     ASM_OUTPUT_LABELREF (asm_out_file, a);	\
X     fprintf (asm_out_file, ";"); } while (0)
X
X#define PUT_SDB_BLOCK_START(LINE)		\
X  fprintf (asm_out_file,			\
X	   "\tdef\t~bb;\tval\t~;\tscl\t100;\tline\t%d;\tendef\n",	\
X	   (LINE))
X
X#define PUT_SDB_BLOCK_END(LINE)			\
X  fprintf (asm_out_file,			\
X	   "\tdef\t~eb;\tval\t~;\tscl\t100;\tline\t%d;\tendef\n",	\
X	   (LINE))
X
X#define PUT_SDB_FUNCTION_START(LINE)		\
X  fprintf (asm_out_file,			\
X	   "\tdef\t~bf;\tval\t~;\tscl\t101;\tline\t%d;\tendef\n",	\
X	   (LINE))
X
X#define PUT_SDB_FUNCTION_END(LINE)		\
X  fprintf (asm_out_file,			\
X	   "\tdef\t~ef;\tval\t~;\tscl\t101;\tline\t%d;\tendef\n",	\
X	   (LINE))
X
X#define PUT_SDB_EPILOGUE_END(NAME)		\
X  fprintf (asm_out_file,			\
X	   "\tdef\t%s;\tval\t~;\tscl\t-1;\tendef\n",	\
X	   (NAME))
X
X#define SDB_GENERATE_FAKE(BUFFER, NUMBER) \
X  sprintf ((BUFFER), "~%dfake", (NUMBER));
X
X/* If TARGET_68881, return SF and DF values in f0 instead of d0.  */
X#undef FUNCTION_VALUE
X#define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE))
X
X#undef LIBCALL_VALUE
X#define LIBCALL_VALUE(MODE) \
X gen_rtx (REG, (MODE), ((TARGET_68881 && ((MODE) == SFmode || (MODE) == DFmode)) ? 16 : 0))
X
X/* 1 if N is a possible register number for a function value.
X   D0 may be used, and F0 as well if -m68881 is specified.  */
X
X#undef FUNCTION_VALUE_REGNO_P
X#define FUNCTION_VALUE_REGNO_P(N) \
X ((N) == 0 || (TARGET_68881 && (N) == 16))
X
X
X/*
X**********************************************************************
X* Redefine all macros pertaining to the SUN's FPA so as much FPA code
X* as possible will be compiled out.
X*
X* CTIX doesn't have an FPA so whats the point of including code for it?
X**********************************************************************
X*/
X#if 0
X/* TODO:
X   changing FIRST_PSEUDO_REGISTER to less that 32 requires all the class macros
X   to be modified as well.
X*/
X#undef FIRST_PSEUDO_REGISTER
X#define FIRST_PSEUDO_REGISTER	24
X#endif
X
X#undef TARGET_FPA
X#define TARGET_FPA			0
X
X#undef REGNO_OK_FOR_FPA_P
X#define REGNO_OK_FOR_FPA_P(REGNO)	0
X
X#undef FPA_REG_P
X#define FPA_REG_P(X)			0
X
END_OF_FILE
if test 22542 -ne `wc -c <'tm-ctix.h'`; then
    echo shar: \"'tm-ctix.h'\" unpacked with wrong size!
fi
# end of 'tm-ctix.h'
fi
if test -f 'xm-ctix.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xm-ctix.h'\"
else
echo shar: Extracting \"'xm-ctix.h'\" \(141 characters\)
sed "s/^X//" >'xm-ctix.h' <<'END_OF_FILE'
X#define USG
X
X#include "xm-m68k.h"
X
X#define bcopy(a,b,c) memcpy (b,a,c)
X#define bzero(a,b) memset (a,0,b)
X#define bcmp(a,b,c) memcmp (a,b,c)
X
END_OF_FILE
if test 141 -ne `wc -c <'xm-ctix.h'`; then
    echo shar: \"'xm-ctix.h'\" unpacked with wrong size!
fi
# end of 'xm-ctix.h'
fi
echo shar: End of shell archive.
exit 0
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Paul Burry			
UUCP: ...!cognos!dy4!paul	POST:	Dy4 Systems Inc., 21 Fitzgerald Road,
PHONE:	(613)-596-9911			Nepean, Ontario, Canada K2H 9J4