ptx4-i.h revision 90075
1/* Target definitions for GNU compiler for Intel 80386 running Dynix/ptx v4
2   Copyright (C) 1996 Free Software Foundation, Inc.
3
4   Modified from sysv4.h
5   Originally written by Ron Guilmette (rfg@netcom.com).
6   Modified by Tim Wright (timw@sequent.com).
7
8This file is part of GNU CC.
9
10GNU CC is free software; you can redistribute it and/or modify
11it under the terms of the GNU General Public License as published by
12the Free Software Foundation; either version 2, or (at your option)
13any later version.
14
15GNU CC is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with GNU CC; see the file COPYING.  If not, write to
22the Free Software Foundation, 59 Temple Place - Suite 330,
23Boston, MA 02111-1307, USA.  */
24
25
26#undef TARGET_VERSION
27#define TARGET_VERSION fprintf (stderr, " (i386 Sequent Dynix/ptx Version 4)");
28
29/* The svr4 ABI for the i386 says that records and unions are returned
30   in memory.  */
31
32#undef RETURN_IN_MEMORY
33#define RETURN_IN_MEMORY(TYPE) \
34  (TYPE_MODE (TYPE) == BLKmode \
35   || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8))
36
37/* Define which macros to predefine.  _SEQUENT_ is our extension.  */
38/* This used to define X86, but james@bigtex.cactus.org says that
39   is supposed to be defined optionally by user programs--not by default.  */
40#define CPP_PREDEFINES \
41  "-Dunix -D_SEQUENT_ -Asystem=unix -Asystem=ptx4"
42
43#undef DBX_REGISTER_NUMBER
44#define DBX_REGISTER_NUMBER(n)  svr4_dbx_register_map[n]
45
46/* The routine used to output sequences of byte values.  We use a special
47   version of this for most svr4 targets because doing so makes the
48   generated assembly code more compact (and thus faster to assemble)
49   as well as more readable.  Note that if we find subparts of the
50   character sequence which end with NUL (and which are shorter than
51   STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING.  */
52
53#undef ASM_OUTPUT_ASCII
54#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH)				\
55  do									\
56    {									\
57      register const unsigned char *_ascii_bytes =			\
58        (const unsigned char *) (STR);					\
59      register const unsigned char *limit = _ascii_bytes + (LENGTH);	\
60      register unsigned bytes_in_chunk = 0;				\
61      for (; _ascii_bytes < limit; _ascii_bytes++)			\
62        {								\
63	  register const unsigned char *p;				\
64	  if (bytes_in_chunk >= 64)					\
65	    {								\
66	      fputc ('\n', (FILE));					\
67	      bytes_in_chunk = 0;					\
68	    }								\
69	  for (p = _ascii_bytes; p < limit && *p != '\0'; p++)		\
70	    continue;							\
71	  if (p < limit && (p - _ascii_bytes) <= (long) STRING_LIMIT)	\
72	    {								\
73	      if (bytes_in_chunk > 0)					\
74		{							\
75		  fputc ('\n', (FILE));					\
76		  bytes_in_chunk = 0;					\
77		}							\
78	      ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes);		\
79	      _ascii_bytes = p;						\
80	    }								\
81	  else								\
82	    {								\
83	      if (bytes_in_chunk == 0)					\
84		fprintf ((FILE), "\t.byte\t");				\
85	      else							\
86		fputc (',', (FILE));					\
87	      fprintf ((FILE), "0x%02x", *_ascii_bytes);		\
88	      bytes_in_chunk += 5;					\
89	    }								\
90	}								\
91      if (bytes_in_chunk > 0)						\
92        fprintf ((FILE), "\n");						\
93    }									\
94  while (0)
95