xref: /openbsd/gnu/usr.bin/gcc/gcc/config/alpha/alpha32.h (revision 3cab2bb3)
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.
4 
5    Derived from code
6       Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
7 
8    Donn Terry, Softway Systems, Inc.
9 
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.)
15 
16 This file is part of GNU CC.
17 
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.
22 
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.
27 
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.  */
32 
33 #undef TARGET_ABI_WINDOWS_NT
34 #define TARGET_ABI_WINDOWS_NT 1
35 
36 /* WinNT (and thus Interix) use unsigned int */
37 #define SIZE_TYPE "unsigned int"
38 
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
43 
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 */
47 
48 /* "long" is 32 bits.  */
49 #undef LONG_TYPE_SIZE
50 #define LONG_TYPE_SIZE 32
51 
52 
53 /* Output assembler code for a block containing the constant parts
54    of a trampoline, leaving space for the variable parts.
55 
56    The trampoline should set the static chain pointer to value placed
57    into the trampoline and should branch to the specified routine.  */
58 
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");			\
67 }
68 
69 /* Length in units of the trampoline for entering a nested function.  */
70 
71 #undef TRAMPOLINE_SIZE
72 #define TRAMPOLINE_SIZE    24
73 
74 /* The alignment of a trampoline, in bits.  */
75 
76 #undef TRAMPOLINE_ALIGNMENT
77 #define TRAMPOLINE_ALIGNMENT  32
78 
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.  */
82 
83 #undef INITIALIZE_TRAMPOLINE
84 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
85   alpha_initialize_trampoline (TRAMP, FNADDR, CXT, 20, 16, 12)
86