ptx4-i.h revision 132718
1132718Skan/* Target definitions for GCC for Intel 80386 running Dynix/ptx v4 2117395Skan Copyright (C) 1996, 2002 Free Software Foundation, Inc. 350397Sobrien 450397Sobrien Modified from sysv4.h 550397Sobrien Originally written by Ron Guilmette (rfg@netcom.com). 650397Sobrien Modified by Tim Wright (timw@sequent.com). 750397Sobrien 8132718SkanThis file is part of GCC. 950397Sobrien 10132718SkanGCC is free software; you can redistribute it and/or modify 1150397Sobrienit under the terms of the GNU General Public License as published by 1250397Sobrienthe Free Software Foundation; either version 2, or (at your option) 1350397Sobrienany later version. 1450397Sobrien 15132718SkanGCC is distributed in the hope that it will be useful, 1650397Sobrienbut WITHOUT ANY WARRANTY; without even the implied warranty of 1750397SobrienMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1850397SobrienGNU General Public License for more details. 1950397Sobrien 2050397SobrienYou should have received a copy of the GNU General Public License 21132718Skanalong with GCC; see the file COPYING. If not, write to 2250397Sobrienthe Free Software Foundation, 59 Temple Place - Suite 330, 2350397SobrienBoston, MA 02111-1307, USA. */ 2450397Sobrien 2550397Sobrien 2650397Sobrien#define TARGET_VERSION fprintf (stderr, " (i386 Sequent Dynix/ptx Version 4)"); 2750397Sobrien 2850397Sobrien/* The svr4 ABI for the i386 says that records and unions are returned 2950397Sobrien in memory. */ 3050397Sobrien 3150397Sobrien#undef RETURN_IN_MEMORY 3250397Sobrien#define RETURN_IN_MEMORY(TYPE) \ 3390075Sobrien (TYPE_MODE (TYPE) == BLKmode \ 3490075Sobrien || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)) 3550397Sobrien 36117395Skan#define TARGET_OS_CPP_BUILTINS() \ 37117395Skan do \ 38117395Skan { \ 39117395Skan builtin_define_std ("unix"); \ 40117395Skan builtin_define ("_SEQUENT_"); \ 41117395Skan builtin_assert ("system=unix"); \ 42117395Skan builtin_assert ("system=ptx4"); \ 43117395Skan } \ 44117395Skan while (0) 4550397Sobrien 4650397Sobrien#undef DBX_REGISTER_NUMBER 4790075Sobrien#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] 4850397Sobrien 4950397Sobrien/* The routine used to output sequences of byte values. We use a special 5050397Sobrien version of this for most svr4 targets because doing so makes the 5150397Sobrien generated assembly code more compact (and thus faster to assemble) 5250397Sobrien as well as more readable. Note that if we find subparts of the 5350397Sobrien character sequence which end with NUL (and which are shorter than 5450397Sobrien STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING. */ 5550397Sobrien 5650397Sobrien#undef ASM_OUTPUT_ASCII 5750397Sobrien#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \ 5850397Sobrien do \ 5950397Sobrien { \ 60132718Skan const unsigned char *_ascii_bytes = \ 6190075Sobrien (const unsigned char *) (STR); \ 62132718Skan const unsigned char *limit = _ascii_bytes + (LENGTH); \ 63132718Skan unsigned bytes_in_chunk = 0; \ 6450397Sobrien for (; _ascii_bytes < limit; _ascii_bytes++) \ 6550397Sobrien { \ 66132718Skan const unsigned char *p; \ 6750397Sobrien if (bytes_in_chunk >= 64) \ 6850397Sobrien { \ 6950397Sobrien fputc ('\n', (FILE)); \ 7050397Sobrien bytes_in_chunk = 0; \ 7150397Sobrien } \ 7250397Sobrien for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \ 7350397Sobrien continue; \ 7490075Sobrien if (p < limit && (p - _ascii_bytes) <= (long) STRING_LIMIT) \ 7550397Sobrien { \ 7650397Sobrien if (bytes_in_chunk > 0) \ 7750397Sobrien { \ 7850397Sobrien fputc ('\n', (FILE)); \ 7950397Sobrien bytes_in_chunk = 0; \ 8050397Sobrien } \ 8150397Sobrien ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \ 8250397Sobrien _ascii_bytes = p; \ 8350397Sobrien } \ 8450397Sobrien else \ 8550397Sobrien { \ 8650397Sobrien if (bytes_in_chunk == 0) \ 8750397Sobrien fprintf ((FILE), "\t.byte\t"); \ 8850397Sobrien else \ 8950397Sobrien fputc (',', (FILE)); \ 9050397Sobrien fprintf ((FILE), "0x%02x", *_ascii_bytes); \ 9150397Sobrien bytes_in_chunk += 5; \ 9250397Sobrien } \ 9350397Sobrien } \ 9450397Sobrien if (bytes_in_chunk > 0) \ 9550397Sobrien fprintf ((FILE), "\n"); \ 9650397Sobrien } \ 9750397Sobrien while (0) 98