ptx4-i.h revision 117395
1/* Target definitions for GNU compiler for Intel 80386 running Dynix/ptx v4 2 Copyright (C) 1996, 2002 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#define TARGET_VERSION fprintf (stderr, " (i386 Sequent Dynix/ptx Version 4)"); 27 28/* The svr4 ABI for the i386 says that records and unions are returned 29 in memory. */ 30 31#undef RETURN_IN_MEMORY 32#define RETURN_IN_MEMORY(TYPE) \ 33 (TYPE_MODE (TYPE) == BLKmode \ 34 || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)) 35 36#define TARGET_OS_CPP_BUILTINS() \ 37 do \ 38 { \ 39 builtin_define_std ("unix"); \ 40 builtin_define ("_SEQUENT_"); \ 41 builtin_assert ("system=unix"); \ 42 builtin_assert ("system=ptx4"); \ 43 } \ 44 while (0) 45 46#undef DBX_REGISTER_NUMBER 47#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] 48 49/* The routine used to output sequences of byte values. We use a special 50 version of this for most svr4 targets because doing so makes the 51 generated assembly code more compact (and thus faster to assemble) 52 as well as more readable. Note that if we find subparts of the 53 character sequence which end with NUL (and which are shorter than 54 STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING. */ 55 56#undef ASM_OUTPUT_ASCII 57#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \ 58 do \ 59 { \ 60 register const unsigned char *_ascii_bytes = \ 61 (const unsigned char *) (STR); \ 62 register const unsigned char *limit = _ascii_bytes + (LENGTH); \ 63 register unsigned bytes_in_chunk = 0; \ 64 for (; _ascii_bytes < limit; _ascii_bytes++) \ 65 { \ 66 register const unsigned char *p; \ 67 if (bytes_in_chunk >= 64) \ 68 { \ 69 fputc ('\n', (FILE)); \ 70 bytes_in_chunk = 0; \ 71 } \ 72 for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \ 73 continue; \ 74 if (p < limit && (p - _ascii_bytes) <= (long) STRING_LIMIT) \ 75 { \ 76 if (bytes_in_chunk > 0) \ 77 { \ 78 fputc ('\n', (FILE)); \ 79 bytes_in_chunk = 0; \ 80 } \ 81 ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \ 82 _ascii_bytes = p; \ 83 } \ 84 else \ 85 { \ 86 if (bytes_in_chunk == 0) \ 87 fprintf ((FILE), "\t.byte\t"); \ 88 else \ 89 fputc (',', (FILE)); \ 90 fprintf ((FILE), "0x%02x", *_ascii_bytes); \ 91 bytes_in_chunk += 5; \ 92 } \ 93 } \ 94 if (bytes_in_chunk > 0) \ 95 fprintf ((FILE), "\n"); \ 96 } \ 97 while (0) 98