OSDN Git Service

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