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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [config/] [mcore/] [mcore-pe.h] - Blame information for rev 20

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

Line No. Rev Author Line
1 12 jlechner
/* Definitions of target machine for GNU compiler, for MCore using COFF/PE.
2
   Copyright (C) 1994, 1999, 2000, 2002, 2003, 2004
3
   Free Software Foundation, Inc.
4
   Contributed by Michael Tiemann (tiemann@cygnus.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 2, 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 COPYING.  If not, write to
20
the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21
Boston, MA 02110-1301, USA.  */
22
 
23
/* Run-time Target Specification.  */
24
#define TARGET_VERSION fputs (" (MCORE/pe)", stderr)
25
 
26
#define TARGET_OS_CPP_BUILTINS()                                \
27
  do                                                            \
28
    {                                                           \
29
      builtin_define ("__pe__");                                \
30
    }                                                           \
31
  while (0)
32
 
33
/* The MCore ABI says that bitfields are unsigned by default.  */
34
/* The EPOC C++ environment does not support exceptions.  */
35
#undef CC1_SPEC
36
#define CC1_SPEC "-funsigned-bitfields %{!DIN_GCC:-fno-rtti} %{!DIN_GCC:-fno-exceptions}"
37
 
38
#undef  SDB_DEBUGGING_INFO
39
#define DBX_DEBUGGING_INFO 1
40
 
41
/* Computed in toplev.c.  */
42
#undef  PREFERRED_DEBUGGING_TYPE
43
 
44
/* Lay out additional 'sections' where we place things like code
45
   and readonly data. This gets them out of default places.  */
46
 
47
#define SUBTARGET_SWITCH_SECTIONS               \
48
  case in_drectve: drectve_section (); break;
49
 
50
#define DRECTVE_SECTION_ASM_OP  "\t.section .drectve"
51
#define READONLY_DATA_SECTION_ASM_OP    "\t.section .rdata"
52
 
53
#define SUBTARGET_EXTRA_SECTIONS in_drectve
54
 
55
#define SUBTARGET_EXTRA_SECTION_FUNCTIONS \
56
  DRECTVE_SECTION_FUNCTION
57
 
58
#define DRECTVE_SECTION_FUNCTION                                \
59
void                                                            \
60
drectve_section ()                                              \
61
{                                                               \
62
  if (in_section != in_drectve)                                 \
63
    {                                                           \
64
      fprintf (asm_out_file, "%s\n", DRECTVE_SECTION_ASM_OP);   \
65
      in_section = in_drectve;                                  \
66
    }                                                           \
67
}
68
 
69
#define MCORE_EXPORT_NAME(STREAM, NAME)                 \
70
  do                                                    \
71
    {                                                   \
72
      drectve_section ();                               \
73
      fprintf (STREAM, "\t.ascii \" -export:%s\"\n",    \
74
               (* targetm.strip_name_encoding) (NAME)); \
75
    }                                                   \
76
  while (0);
77
 
78
/* Output the label for an initialized variable.  */
79
#undef  ASM_DECLARE_OBJECT_NAME
80
#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL)             \
81
  do                                                            \
82
    {                                                           \
83
      if (mcore_dllexport_name_p (NAME))                        \
84
        {                                                       \
85
          enum in_section save_section = in_section;            \
86
          MCORE_EXPORT_NAME (STREAM, NAME);                     \
87
          switch_to_section (save_section, (DECL));             \
88
        }                                                       \
89
      ASM_OUTPUT_LABEL ((STREAM), (NAME));                      \
90
    }                                                           \
91
  while (0)
92
 
93
/* Output a function label definition.  */
94
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL)           \
95
  do                                                            \
96
    {                                                           \
97
      if (mcore_dllexport_name_p (NAME))                        \
98
        {                                                       \
99
          MCORE_EXPORT_NAME (STREAM, NAME);                     \
100
          function_section (DECL);                              \
101
        }                                                       \
102
      ASM_OUTPUT_LABEL ((STREAM), (NAME));                      \
103
    }                                                           \
104
  while (0);
105
 
106
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
107
 
108
#define DBX_LINES_FUNCTION_RELATIVE 1
109
 
110
#define STARTFILE_SPEC "crt0.o%s"
111
#define ENDFILE_SPEC  "%{!mno-lsim:-lsim}"
112
 
113
/* __CTOR_LIST__ and __DTOR_LIST__ must be defined by the linker script.  */
114
#define CTOR_LISTS_DEFINED_EXTERNALLY
115
 
116
#undef DO_GLOBAL_CTORS_BODY
117
#undef DO_GLOBAL_DTORS_BODY
118
#undef INIT_SECTION_ASM_OP
119
#undef DTORS_SECTION_ASM_OP
120
 
121
#define SUPPORTS_ONE_ONLY 1
122
 
123
/* Switch into a generic section.  */
124
#undef TARGET_ASM_NAMED_SECTION
125
#define TARGET_ASM_NAMED_SECTION  default_pe_asm_named_section

powered by: WebSVN 2.1.0

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