]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/vax/elf.h
host-hpux.c: Change copyright header to refer to version 3 of the GNU General Public...
[thirdparty/gcc.git] / gcc / config / vax / elf.h
CommitLineData
ec20cffb 1/* Target definitions for GNU compiler for VAX using ELF
2f83c7d6 2 Copyright (C) 2002, 2004, 2005, 2007 Free Software Foundation, Inc.
0b55eafa 3 Contributed by Matt Thomas <matt@3am-software.com>
ec20cffb 4
e7d9d16b 5This file is part of GCC.
ec20cffb 6
e7d9d16b 7GCC is free software; you can redistribute it and/or modify
ec20cffb 8it under the terms of the GNU General Public License as published by
2f83c7d6 9the Free Software Foundation; either version 3, or (at your option)
ec20cffb
JT
10any later version.
11
e7d9d16b 12GCC is distributed in the hope that it will be useful,
ec20cffb
JT
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
2f83c7d6
NC
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
ec20cffb 20
c15c90bb
ZW
21#undef TARGET_ELF
22#define TARGET_ELF 1
23
ec20cffb
JT
24#undef REGISTER_PREFIX
25#undef REGISTER_NAMES
26#define REGISTER_PREFIX "%"
27#define REGISTER_NAMES \
0b55eafa
JBG
28 { "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", \
29 "%r8", "%r9", "%r10", "%r11", "%ap", "%fp", "%sp", "%pc", }
30
ec20cffb
JT
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. */
191fe2bb
JT
38#undef VAX_FUNCTION_PROFILER_NAME
39#define VAX_FUNCTION_PROFILER_NAME "__mcount"
40
ec20cffb
JT
41/* Let's be re-entrant. */
42#undef PCC_STATIC_STRUCT_RETURN
43
ec20cffb
JT
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, \
0b55eafa 54 plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),\
ec20cffb
JT
55 -4))
56
57/* Simple store the return handler into the call frame. */
58#define EH_RETURN_HANDLER_RTX \
59 gen_rtx_MEM (Pmode, \
0b55eafa 60 plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),\
ec20cffb
JT
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
ec20cffb 72#undef OVERRIDE_OPTIONS
0b55eafa
JBG
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 } \
ec20cffb
JT
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 ""
0b55eafa 89