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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [config/] [ia64/] [sysv4.h] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
/* Override definitions in elfos.h/svr4.h to be correct for IA64.  */
2
 
3
#undef TARGET_INIT_LIBFUNCS
4
#define TARGET_INIT_LIBFUNCS ia64_sysv4_init_libfuncs
5
 
6
/* We want DWARF2 as specified by the IA64 ABI.  */
7
#undef PREFERRED_DEBUGGING_TYPE
8
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
9
 
10
/* Stabs does not work properly for 64-bit targets.  */
11
#undef DBX_DEBUGGING_INFO
12
 
13
/* Various pseudo-ops for which the Intel assembler uses non-standard
14
   definitions.  */
15
 
16
#undef STRING_ASM_OP
17
#define STRING_ASM_OP "\tstringz\t"
18
 
19
#undef SKIP_ASM_OP
20
#define SKIP_ASM_OP "\t.skip\t"
21
 
22
#undef COMMON_ASM_OP
23
#define COMMON_ASM_OP "\t.common\t"
24
 
25
#undef ASCII_DATA_ASM_OP
26
#define ASCII_DATA_ASM_OP "\tstring\t"
27
 
28
/* ia64-specific options for gas
29
   ??? ia64 gas doesn't accept standard svr4 assembler options?  */
30
#undef ASM_SPEC
31
#define ASM_SPEC "-x %{mconstant-gp} %{mauto-pic} %(asm_extra)"
32
 
33
/* ??? Unfortunately, .lcomm doesn't work, because it puts things in either
34
   .bss or .sbss, and we can't control the decision of which is used.  When
35
   I use .lcomm, I get a cryptic "Section group has no member" error from
36
   the Intel simulator.  So we must explicitly put variables in .bss
37
   instead.  This matters only if we care about the Intel assembler.  */
38
 
39
/* This is asm_output_aligned_bss from varasm.c without the
40
   (*targetm.asm_out.globalize_label) call at the beginning.  */
41
 
42
/* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME.  */
43
extern int size_directive_output;
44
 
45
#undef ASM_OUTPUT_ALIGNED_LOCAL
46
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
47
do {                                                                    \
48
  if ((DECL) && sdata_symbolic_operand (XEXP (DECL_RTL (DECL), 0), Pmode)) \
49
    sbss_section ();                                                    \
50
  else                                                                  \
51
    bss_section ();                                                     \
52
  ASM_OUTPUT_ALIGN (FILE, floor_log2 ((ALIGN) / BITS_PER_UNIT));        \
53
  ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL);                           \
54
  ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1);                              \
55
} while (0)
56
 
57
/* The # tells the Intel assembler that this is not a register name.
58
   However, we can't emit the # in a label definition, so we set a variable
59
   in ASM_OUTPUT_LABEL to control whether we want the postfix here or not.
60
   We append the # to the label name, but since NAME can be an expression
61
   we have to scan it for a non-label character and insert the # there.  */
62
 
63
#undef ASM_OUTPUT_LABELREF
64
#define ASM_OUTPUT_LABELREF(STREAM, NAME)       \
65
do {                                            \
66
  const char *name_ = NAME;                     \
67
  if (*name_ == '*')                            \
68
    name_++;                                    \
69
  else                                          \
70
    fputs (user_label_prefix, STREAM);          \
71
  fputs (name_, STREAM);                        \
72
  if (!ia64_asm_output_label)                   \
73
    fputc ('#', STREAM);                        \
74
} while (0)
75
 
76
/* Intel assembler requires both flags and type if declaring a non-predefined
77
   section.  */
78
#undef INIT_SECTION_ASM_OP
79
#define INIT_SECTION_ASM_OP     "\t.section\t.init,\"ax\",\"progbits\""
80
#undef FINI_SECTION_ASM_OP
81
#define FINI_SECTION_ASM_OP     "\t.section\t.fini,\"ax\",\"progbits\""
82
 
83
/* svr4.h undefines this, so we need to define it here.  */
84
#define DBX_REGISTER_NUMBER(REGNO) \
85
  ia64_dbx_register_number(REGNO)
86
 
87
/* Things that svr4.h defines to the wrong type, because it assumes 32 bit
88
   ints and 32 bit longs.  */
89
 
90
#undef SIZE_TYPE
91
#define SIZE_TYPE "long unsigned int"
92
 
93
#undef PTRDIFF_TYPE
94
#define PTRDIFF_TYPE "long int"
95
 
96
#undef WCHAR_TYPE
97
#define WCHAR_TYPE "int"
98
 
99
#undef WCHAR_TYPE_SIZE
100
#define WCHAR_TYPE_SIZE 32
101
 
102
/* We redefine this to use the ia64 .proc pseudo-op.  */
103
 
104
#undef ASM_DECLARE_FUNCTION_NAME
105
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
106
do {                                                                    \
107
  fputs ("\t.proc ", FILE);                                             \
108
  assemble_name (FILE, NAME);                                           \
109
  fputc ('\n', FILE);                                                   \
110
  ASM_OUTPUT_LABEL (FILE, NAME);                                        \
111
} while (0)
112
 
113
/* We redefine this to use the ia64 .endp pseudo-op.  */
114
 
115
#undef ASM_DECLARE_FUNCTION_SIZE
116
#define ASM_DECLARE_FUNCTION_SIZE(FILE, NAME, DECL) \
117
do {                                                                    \
118
  fputs ("\t.endp ", FILE);                                             \
119
  assemble_name (FILE, NAME);                                           \
120
  fputc ('\n', FILE);                                                   \
121
} while (0)
122
 
123
/* Override default elf definition.  */
124
/* ??? This is slight overkill.  We should check for static relocations
125
   and allow those in .rodata.  */
126
#undef  TARGET_ASM_SELECT_SECTION
127
#define TARGET_ASM_SELECT_SECTION  ia64_rwreloc_select_section
128
#undef  TARGET_ASM_UNIQUE_SECTION
129
#define TARGET_ASM_UNIQUE_SECTION  ia64_rwreloc_unique_section
130
#undef  TARGET_ASM_SELECT_RTX_SECTION
131
#define TARGET_ASM_SELECT_RTX_SECTION  ia64_rwreloc_select_rtx_section
132
#define TARGET_RWRELOC  true
133
 
134
#undef EXTRA_SECTIONS
135
#define EXTRA_SECTIONS in_sdata, in_sbss
136
 
137
#undef EXTRA_SECTION_FUNCTIONS
138
#define EXTRA_SECTION_FUNCTIONS                                         \
139
  SDATA_SECTION_FUNCTION                                                \
140
  SBSS_SECTION_FUNCTION
141
 
142
#define SDATA_SECTION_ASM_OP "\t.sdata"
143
 
144
#define SDATA_SECTION_FUNCTION                                          \
145
void                                                                    \
146
sdata_section (void)                                                    \
147
{                                                                       \
148
  if (in_section != in_sdata)                                           \
149
    {                                                                   \
150
      fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP);             \
151
      in_section = in_sdata;                                            \
152
    }                                                                   \
153
}
154
 
155
#define SBSS_SECTION_ASM_OP "\t.sbss"
156
 
157
#define SBSS_SECTION_FUNCTION                                           \
158
void                                                                    \
159
sbss_section (void)                                                     \
160
{                                                                       \
161
  if (in_section != in_sbss)                                            \
162
    {                                                                   \
163
      fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP);              \
164
      in_section = in_sbss;                                             \
165
    }                                                                   \
166
}

powered by: WebSVN 2.1.0

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