| 1 |
/* Definitions of target machine for GNU compiler, for HPs using the |
| 2 |
64bit runtime model. |
| 3 |
Copyright (C) 1999-2025 Free Software Foundation, Inc. |
| 4 |
|
| 5 |
This file is part of GCC. |
| 6 |
|
| 7 |
GCC is free software; you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License as published by |
| 9 |
the Free Software Foundation; either version 3, or (at your option) |
| 10 |
any later version. |
| 11 |
|
| 12 |
GCC is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with GCC; see the file COPYING3. If not see |
| 19 |
<http://www.gnu.org/licenses/>. */ |
| 20 |
|
| 21 |
/* The default sizes for basic datatypes provided by GCC are not |
| 22 |
correct for the PA64 runtime architecture. |
| 23 |
|
| 24 |
In PA64, basic types have the following sizes |
| 25 |
|
| 26 |
char 1 byte |
| 27 |
short 2 bytes |
| 28 |
int 4 bytes |
| 29 |
long 8 bytes |
| 30 |
long long 8 bytes |
| 31 |
pointer 8 bytes |
| 32 |
float 4 bytes |
| 33 |
double 8 bytes |
| 34 |
long double 16 bytes |
| 35 |
size_t 8 bytes |
| 36 |
ptrdiff_t 8 bytes |
| 37 |
wchar 4 bytes |
| 38 |
|
| 39 |
Make GCC agree with types.h. */ |
| 40 |
#undef SIZE_TYPE |
| 41 |
#define SIZE_TYPE "long unsigned int" |
| 42 |
|
| 43 |
#undef PTRDIFF_TYPE |
| 44 |
#define PTRDIFF_TYPE "long int" |
| 45 |
|
| 46 |
#undef WCHAR_TYPE |
| 47 |
#define WCHAR_TYPE "unsigned int" |
| 48 |
|
| 49 |
#undef WCHAR_TYPE_SIZE |
| 50 |
#define WCHAR_TYPE_SIZE 32 |
| 51 |
|
| 52 |
/* If it is not listed here, then the default selected by GCC is OK. */ |
| 53 |
#undef SHORT_TYPE_SIZE |
| 54 |
#define SHORT_TYPE_SIZE 16 |
| 55 |
#undef INT_TYPE_SIZE |
| 56 |
#define INT_TYPE_SIZE 32 |
| 57 |
#undef LONG_TYPE_SIZE |
| 58 |
#define LONG_TYPE_SIZE 64 |
| 59 |
#undef LONG_LONG_TYPE_SIZE |
| 60 |
#define LONG_LONG_TYPE_SIZE 64 |
| 61 |
#undef PA_FLOAT_TYPE_SIZE |
| 62 |
#define PA_FLOAT_TYPE_SIZE 32 |
| 63 |
#undef PA_DOUBLE_TYPE_SIZE |
| 64 |
#define PA_DOUBLE_TYPE_SIZE 64 |
| 65 |
#undef PA_LONG_DOUBLE_TYPE_SIZE |
| 66 |
#define PA_LONG_DOUBLE_TYPE_SIZE 128 |
| 67 |
|
| 68 |
/* ?!? This needs to be made compile-time selectable. |
| 69 |
|
| 70 |
The PA64 runtime model has arguments that grow to higher addresses |
| 71 |
(like most other targets). The older runtime model has arguments |
| 72 |
that grow to lower addresses. What fun. */ |
| 73 |
#undef ARGS_GROW_DOWNWARD |
| 74 |
|
| 75 |
/* If defined, a C expression which determines whether the default |
| 76 |
implementation of va_arg will attempt to pad down before reading the |
| 77 |
next argument, if that argument is smaller than its aligned space as |
| 78 |
controlled by PARM_BOUNDARY. If this macro is not defined, all such |
| 79 |
arguments are padded down when BYTES_BIG_ENDIAN is true. We don't |
| 80 |
want aggregates padded down. */ |
| 81 |
|
| 82 |
#define PAD_VARARGS_DOWN \ |
| 83 |
(!AGGREGATE_TYPE_P (type) \ |
| 84 |
&& TREE_CODE (type) != COMPLEX_TYPE \ |
| 85 |
&& TREE_CODE (type) != VECTOR_TYPE) |
| 86 |
|
| 87 |
/* In the PA architecture, it is not possible to directly move data |
| 88 |
between GENERAL_REGS and FP_REGS. On the 32-bit port, we use the |
| 89 |
location at SP-16 because PA 1.X only supports 5-bit immediates for |
| 90 |
floating-point loads and stores. We don't expose this location in |
| 91 |
the RTL to avoid scheduling related problems. For example, the |
| 92 |
store and load could be separated by a call to a pure or const |
| 93 |
function which has no frame and this function might also use SP-16. |
| 94 |
|
| 95 |
On the 64-bit port, I couldn't get SECONDARY_MEMORY_NEEDED to work |
| 96 |
with LRA, so I modified the move patterns to use SP-40. The HP |
| 97 |
compiler also uses this slot in the frame marker for moving data |
| 98 |
between the general and floating-point registers. */ |
| 99 |
#define PA_SECONDARY_MEMORY_NEEDED(MODE, CLASS1, CLASS2) false |