OSDN Git Service

* config/host-hpux.c: Change copyright header to refer to version 3 of the GNU
[pf3gnuchains/gcc-fork.git] / gcc / config / vax / elf.h
1 /* Target definitions for GNU compiler for VAX using ELF
2    Copyright (C) 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
3    Contributed by Matt Thomas <matt@3am-software.com>
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 #undef TARGET_ELF
22 #define TARGET_ELF 1
23
24 #undef REGISTER_PREFIX
25 #undef REGISTER_NAMES
26 #define REGISTER_PREFIX "%"
27 #define REGISTER_NAMES \
28   { "%r0", "%r1",  "%r2",  "%r3", "%r4", "%r5", "%r6", "%r7", \
29     "%r8", "%r9", "%r10", "%r11", "%ap", "%fp", "%sp", "%pc", }
30
31 #undef SIZE_TYPE
32 #define SIZE_TYPE "long unsigned int"
33
34 #undef PTRDIFF_TYPE
35 #define PTRDIFF_TYPE "long int"
36
37 /* Profiling routine.  */
38 #undef VAX_FUNCTION_PROFILER_NAME
39 #define VAX_FUNCTION_PROFILER_NAME "__mcount"
40
41 /*  Let's be re-entrant.  */
42 #undef PCC_STATIC_STRUCT_RETURN
43
44 /* Before the prologue, the top of the frame is below the argument
45    count pushed by the CALLS and before the start of the saved registers.  */
46 #define INCOMING_FRAME_SP_OFFSET 0
47
48 /* We use R2-R5 (call-clobbered) registers for exceptions.  */
49 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 2 : INVALID_REGNUM)
50
51 /* Place the top of the stack for the DWARF2 EH stackadj value.  */
52 #define EH_RETURN_STACKADJ_RTX                                          \
53   gen_rtx_MEM (SImode,                                                  \
54                plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),\
55                               -4))
56
57 /* Simple store the return handler into the call frame.  */
58 #define EH_RETURN_HANDLER_RTX                                           \
59   gen_rtx_MEM (Pmode,                                                   \
60                plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),\
61                               16))
62
63
64 /* Reserve the top of the stack for exception handler stackadj value.  */
65 #undef STARTING_FRAME_OFFSET
66 #define STARTING_FRAME_OFFSET -4
67
68 /* The VAX wants no space between the case instruction and the jump table.  */
69 #undef  ASM_OUTPUT_BEFORE_CASE_LABEL
70 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE)
71
72 #undef OVERRIDE_OPTIONS
73 #define OVERRIDE_OPTIONS                                \
74   do                                                    \
75     {                                                   \
76       /* Do generic VAX overrides.  */                  \
77       override_options ();                              \
78                                                         \
79       /* Turn off function CSE if we're doing PIC.  */  \
80       if (flag_pic)                                     \
81         flag_no_function_cse = 1;                       \
82     }                                                   \
83   while (0)
84
85 /* VAX ELF is always gas; override the generic VAX ASM_SPEC.  */
86
87 #undef ASM_SPEC
88 #define ASM_SPEC ""
89