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