OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [vax/] [elf.h] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
/* Target definitions for GNU compiler for VAX using ELF
2
   Copyright (C) 2002, 2004, 2005, 2007, 2008, 2009, 2010
3
   Free Software Foundation, Inc.
4
   Contributed by Matt Thomas <matt@3am-software.com>
5
 
6
This file is part of GCC.
7
 
8
GCC is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3, or (at your option)
11
any later version.
12
 
13
GCC is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with GCC; see the file COPYING3.  If not see
20
<http://www.gnu.org/licenses/>.  */
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
/* Offset from the frame pointer register value to the top of the stack.  */
50
#define FRAME_POINTER_CFA_OFFSET(FNDECL) 0
51
 
52
/* We use R2-R5 (call-clobbered) registers for exceptions.  */
53
#define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 2 : INVALID_REGNUM)
54
 
55
/* Place the top of the stack for the DWARF2 EH stackadj value.  */
56
#define EH_RETURN_STACKADJ_RTX                                          \
57
  gen_rtx_MEM (SImode,                                                  \
58
               plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),\
59
                              -4))
60
 
61
/* Simple store the return handler into the call frame.  */
62
#define EH_RETURN_HANDLER_RTX                                           \
63
  gen_rtx_MEM (Pmode,                                                   \
64
               plus_constant (gen_rtx_REG (Pmode, FRAME_POINTER_REGNUM),\
65
                              16))
66
 
67
 
68
/* Reserve the top of the stack for exception handler stackadj value.  */
69
#undef STARTING_FRAME_OFFSET
70
#define STARTING_FRAME_OFFSET -4
71
 
72
/* The VAX wants no space between the case instruction and the jump table.  */
73
#undef  ASM_OUTPUT_BEFORE_CASE_LABEL
74
#define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE)
75
 
76
#undef SUBTARGET_OVERRIDE_OPTIONS
77
#define SUBTARGET_OVERRIDE_OPTIONS                      \
78
  do                                                    \
79
    {                                                   \
80
      /* Turn off function CSE if we're doing PIC.  */  \
81
      if (flag_pic)                                     \
82
        flag_no_function_cse = 1;                       \
83
    }                                                   \
84
  while (0)
85
 
86
/* Don't allow *foo which foo is non-local */
87
#define NO_EXTERNAL_INDIRECT_ADDRESS
88
 
89
#undef VAX_CC1_AND_CC1PLUS_SPEC
90
#define VAX_CC1_AND_CC1PLUS_SPEC \
91
  "%{!fno-pic: \
92
     %{!fpic: \
93
       %{!fPIC:-fPIC}}}"
94
 
95
/* VAX ELF is always gas; override the generic VAX ASM_SPEC.  */
96
 
97
#undef ASM_SPEC
98
#define ASM_SPEC "%{!fno-pic: %{!mno-asm-pic:-k}}"
99
 
100
/*  We want PCREL dwarf output.  */
101
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)       \
102
  ((GLOBAL ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4)
103
 
104
/* Emit a PC-relative relocation.  */
105
#define ASM_OUTPUT_DWARF_PCREL(FILE, SIZE, LABEL)       \
106
  do {                                                  \
107
    fputs (integer_asm_op (SIZE, FALSE), FILE);         \
108
    fprintf (FILE, "%%pcrel%d(", SIZE * 8);             \
109
    assemble_name (FILE, LABEL);                        \
110
    fputc (')', FILE);                                  \
111
  } while (0)

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.