FSF GCC merge 02/23/03
[official-gcc.git] / gcc / config / alpha / alpha32.h
blob8d9df0b8ebf9e4eff59a0babf326e18007051d06
1 /* Definitions of target machine for GNU compiler, for DEC Alpha
2 running Windows/NT.
3 Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
5 Derived from code
6 Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
8 Donn Terry, Softway Systems, Inc.
10 This file contains the code-generation stuff common to the 32-bit
11 versions of the DEC/Compaq Alpha architecture. It is shared by
12 Interix and NT/Win32 ports. It should not contain compile-time
13 or run-time dependent environment values (such as compiler options
14 or anything containing a file or pathname.)
16 This file is part of GNU CC.
18 GNU CC is free software; you can redistribute it and/or modify
19 it under the terms of the GNU General Public License as published by
20 the Free Software Foundation; either version 2, or (at your option)
21 any later version.
23 GNU CC is distributed in the hope that it will be useful,
24 but WITHOUT ANY WARRANTY; without even the implied warranty of
25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 GNU General Public License for more details.
28 You should have received a copy of the GNU General Public License
29 along with GNU CC; see the file COPYING. If not, write to
30 the Free Software Foundation, 59 Temple Place - Suite 330,
31 Boston, MA 02111-1307, USA. */
33 #undef TARGET_ABI_WINDOWS_NT
34 #define TARGET_ABI_WINDOWS_NT 1
36 /* WinNT (and thus Interix) use unsigned int */
37 #define SIZE_TYPE "unsigned int"
39 /* Pointer is 32 bits but the hardware has 64-bit addresses, sign extended. */
40 #undef POINTER_SIZE
41 #define POINTER_SIZE 32
42 #define POINTERS_EXTEND_UNSIGNED 0
44 /* We don't change Pmode to the "obvious" SI mode... the above appears
45 to affect the in-memory size; we want the registers to stay DImode
46 to match the md file */
48 /* "long" is 32 bits. */
49 #undef LONG_TYPE_SIZE
50 #define LONG_TYPE_SIZE 32
53 /* Output assembler code for a block containing the constant parts
54 of a trampoline, leaving space for the variable parts.
56 The trampoline should set the static chain pointer to value placed
57 into the trampoline and should branch to the specified routine. */
59 #undef TRAMPOLINE_TEMPLATE
60 #define TRAMPOLINE_TEMPLATE(FILE) \
61 { \
62 fprintf (FILE, "\tbr $27,$LTRAMPP\n"); \
63 fprintf (FILE, "$LTRAMPP:\n\tldl $1,12($27)\n"); \
64 fprintf (FILE, "\tldl $27,16($27)\n"); \
65 fprintf (FILE, "\tjmp $31,($27),0\n"); \
66 fprintf (FILE, "\t.long 0,0\n"); \
69 /* Length in units of the trampoline for entering a nested function. */
71 #undef TRAMPOLINE_SIZE
72 #define TRAMPOLINE_SIZE 24
74 /* The alignment of a trampoline, in bits. */
76 #undef TRAMPOLINE_ALIGNMENT
77 #define TRAMPOLINE_ALIGNMENT 32
79 /* Emit RTL insns to initialize the variable parts of a trampoline.
80 FNADDR is an RTX for the address of the function's pure code.
81 CXT is an RTX for the static chain value for the function. */
83 #undef INITIALIZE_TRAMPOLINE
84 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
85 alpha_initialize_trampoline (TRAMP, FNADDR, CXT, 20, 16, 12)