Mercurial > hg > CbC > CbC_gcc
annotate gcc/config/vax/elf.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | f6334be47118 |
rev | line source |
---|---|
0 | 1 /* Target definitions for GNU compiler for VAX using ELF |
2 Copyright (C) 2002, 2004, 2005, 2007, 2008 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 /* Offset from the frame pointer register value to the top of the stack. */ | |
49 #define FRAME_POINTER_CFA_OFFSET(FNDECL) 0 | |
50 | |
51 /* We use R2-R5 (call-clobbered) registers for exceptions. */ | |
52 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 2 : INVALID_REGNUM) | |
53 | |
54 /* Place the top of the stack for the DWARF2 EH stackadj value. */ | |
55 #define EH_RETURN_STACKADJ_RTX \ | |
56 gen_rtx_MEM (SImode, \ | |
57 plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),\ | |
58 -4)) | |
59 | |
60 /* Simple store the return handler into the call frame. */ | |
61 #define EH_RETURN_HANDLER_RTX \ | |
62 gen_rtx_MEM (Pmode, \ | |
63 plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),\ | |
64 16)) | |
65 | |
66 | |
67 /* Reserve the top of the stack for exception handler stackadj value. */ | |
68 #undef STARTING_FRAME_OFFSET | |
69 #define STARTING_FRAME_OFFSET -4 | |
70 | |
71 /* The VAX wants no space between the case instruction and the jump table. */ | |
72 #undef ASM_OUTPUT_BEFORE_CASE_LABEL | |
73 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) | |
74 | |
75 #undef OVERRIDE_OPTIONS | |
76 #define OVERRIDE_OPTIONS \ | |
77 do \ | |
78 { \ | |
79 /* Do generic VAX overrides. */ \ | |
80 override_options (); \ | |
81 \ | |
82 /* Turn off function CSE if we're doing PIC. */ \ | |
83 if (flag_pic) \ | |
84 flag_no_function_cse = 1; \ | |
85 } \ | |
86 while (0) | |
87 | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
88 /* Don't allow *foo which foo is non-local */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
89 #define NO_EXTERNAL_INDIRECT_ADDRESS |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
90 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
91 #undef VAX_CC1_AND_CC1PLUS_SPEC |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
92 #define VAX_CC1_AND_CC1PLUS_SPEC \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
93 "%{!fno-pic: \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
94 %{!fpic: \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
95 %{!fPIC:-fPIC}}}" |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
96 |
0 | 97 /* VAX ELF is always gas; override the generic VAX ASM_SPEC. */ |
98 | |
99 #undef ASM_SPEC | |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
100 #define ASM_SPEC "%{!fno-pic: %{!mno-asm-pic:-k}}" |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
101 |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
102 /* We want PCREL dwarf output. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
103 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
104 ((GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) |
0 | 105 |
55
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
106 /* Emit a PC-relative relocation. */ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
107 #define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL) \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
108 do { \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
109 fputs (integer_asm_op (SIZE, FALSE), FILE); \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
110 fprintf (FILE, "%%pcrel%d(", SIZE * 8); \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
111 assemble_name (FILE, LABEL); \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
112 fputc (')', FILE); \ |
77e2b8dfacca
update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
113 } while (0) |