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