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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [config/] [pa/] [pa-linux.h] - Blame information for rev 816

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

Line No. Rev Author Line
1 282 jeremybenn
/* Definitions for PA_RISC with ELF format
2
   Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
3
   Free Software Foundation, Inc.
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
 
22
#undef TARGET_OS_CPP_BUILTINS
23
#define TARGET_OS_CPP_BUILTINS()                \
24
  do                                            \
25
    {                                           \
26
        LINUX_TARGET_OS_CPP_BUILTINS();         \
27
        builtin_assert ("machine=bigendian");   \
28
    }                                           \
29
  while (0)
30
 
31
#undef CPP_SPEC
32
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
33
 
34
#undef ASM_SPEC
35
#define ASM_SPEC \
36
  "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
37
 
38
/* Define this for shared library support because it isn't in the main
39
   linux.h file.  */
40
 
41
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
42
 
43
#undef LINK_SPEC
44
#define LINK_SPEC "\
45
  %{shared:-shared} \
46
  %{!shared: \
47
    %{!static: \
48
      %{rdynamic:-export-dynamic} \
49
      %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
50
      %{static:-static}}"
51
 
52
/* glibc's profiling functions don't need gcc to allocate counters.  */
53
#define NO_DEFERRED_PROFILE_COUNTERS 1
54
 
55
/* Define the strings used for the special svr4 .type and .size directives.
56
   These strings generally do not vary from one system running svr4 to
57
   another, but if a given system (e.g. m88k running svr) needs to use
58
   different pseudo-op names for these, they may be overridden in the
59
   file which includes this one.  */
60
 
61
#undef STRING_ASM_OP
62
#define STRING_ASM_OP   "\t.stringz\t"
63
 
64
#define TEXT_SECTION_ASM_OP "\t.text"
65
#define DATA_SECTION_ASM_OP "\t.data"
66
#define BSS_SECTION_ASM_OP "\t.section\t.bss"
67
 
68
#define TARGET_ASM_FILE_START pa_linux_file_start
69
 
70
/* We want local labels to start with period if made with asm_fprintf.  */
71
#undef LOCAL_LABEL_PREFIX
72
#define LOCAL_LABEL_PREFIX "."
73
 
74
/* Define these to generate the Linux/ELF/SysV style of internal
75
   labels all the time - i.e. to be compatible with
76
   ASM_GENERATE_INTERNAL_LABEL in <elfos.h>.  Compare these with the
77
   ones in pa.h and note the lack of dollar signs in these.  FIXME:
78
   shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */
79
 
80
#undef ASM_OUTPUT_ADDR_VEC_ELT
81
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
82
  if (TARGET_BIG_SWITCH)                                        \
83
    fprintf (FILE, "\t.word .L%d\n", VALUE);                    \
84
  else                                                          \
85
    fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
86
 
87
#undef ASM_OUTPUT_ADDR_DIFF_ELT
88
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
89
  if (TARGET_BIG_SWITCH)                                        \
90
    fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL);          \
91
  else                                                          \
92
    fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
93
 
94
/* Use the default.  */
95
#undef ASM_OUTPUT_LABEL
96
 
97
/* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and
98
   does what we want (i.e. uses colons).  It must be compatible with
99
   ASM_GENERATE_INTERNAL_LABEL(), so do not define it here.  */
100
 
101
/* Use the default.  */
102
#undef ASM_OUTPUT_INTERNAL_LABEL
103
 
104
/* Use the default.  */
105
#undef TARGET_ASM_GLOBALIZE_LABEL
106
/* Globalizing directive for a label.  */
107
#define GLOBAL_ASM_OP ".globl "
108
 
109
/* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
110
   labels in a function declaration (since pa.c seems determined to do
111
   it differently)  */
112
 
113
#undef ASM_DECLARE_FUNCTION_NAME
114
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)             \
115
  do                                                            \
116
    {                                                           \
117
      ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function");       \
118
      ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));            \
119
    }                                                           \
120
  while (0)
121
 
122
/* As well as globalizing the label, we need to encode the label
123
   to ensure a plabel is generated in an indirect call.  */
124
 
125
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
126
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)                  \
127
  do                                                            \
128
    {                                                           \
129
      if (!FUNCTION_NAME_P (XSTR (FUN, 0)))                     \
130
        hppa_encode_label (FUN);                                \
131
      (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
132
    }                                                           \
133
  while (0)
134
 
135
/* Linux always uses gas.  */
136
#undef TARGET_GAS
137
#define TARGET_GAS 1

powered by: WebSVN 2.1.0

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