]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/ia64/sysv4.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / ia64 / sysv4.h
CommitLineData
57809813 1/* Override definitions in elfos.h to be correct for IA64.
ad41bd84 2
8d9254fc 3Copyright (C) 2000-2020 Free Software Foundation, Inc.
ad41bd84
JM
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17Under Section 7 of GPL version 3, you are granted additional
18permissions described in the GCC Runtime Library Exception, version
193.1, as published by the Free Software Foundation.
20
21You should have received a copy of the GNU General Public License and
22a copy of the GCC Runtime Library Exception along with this program;
23see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24<http://www.gnu.org/licenses/>. */
c65ebc55 25
6bc709c1
L
26#undef TARGET_INIT_LIBFUNCS
27#define TARGET_INIT_LIBFUNCS ia64_sysv4_init_libfuncs
28
c65ebc55
JW
29/* We want DWARF2 as specified by the IA64 ABI. */
30#undef PREFERRED_DEBUGGING_TYPE
31#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
32
89e6abff
RH
33/* Stabs does not work properly for 64-bit targets. */
34#undef DBX_DEBUGGING_INFO
35
c65ebc55
JW
36/* Various pseudo-ops for which the Intel assembler uses non-standard
37 definitions. */
38
c65ebc55 39#undef STRING_ASM_OP
de323aa1 40#define STRING_ASM_OP "\tstringz\t"
c65ebc55
JW
41
42#undef SKIP_ASM_OP
de323aa1 43#define SKIP_ASM_OP "\t.skip\t"
c65ebc55
JW
44
45#undef COMMON_ASM_OP
de323aa1 46#define COMMON_ASM_OP "\t.common\t"
c65ebc55
JW
47
48#undef ASCII_DATA_ASM_OP
de323aa1 49#define ASCII_DATA_ASM_OP "\tstring\t"
c65ebc55 50
93215a1b
AS
51/* ia64-specific options for gas
52 ??? ia64 gas doesn't accept standard svr4 assembler options? */
53#undef ASM_SPEC
54#define ASM_SPEC "-x %{mconstant-gp} %{mauto-pic} %(asm_extra)"
55
c65ebc55
JW
56/* ??? Unfortunately, .lcomm doesn't work, because it puts things in either
57 .bss or .sbss, and we can't control the decision of which is used. When
58 I use .lcomm, I get a cryptic "Section group has no member" error from
59 the Intel simulator. So we must explicitly put variables in .bss
60 instead. This matters only if we care about the Intel assembler. */
61
5eb99654
KG
62/* This is asm_output_aligned_bss from varasm.c without the
63 (*targetm.asm_out.globalize_label) call at the beginning. */
c65ebc55
JW
64
65/* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME. */
66extern int size_directive_output;
67
68#undef ASM_OUTPUT_ALIGNED_LOCAL
69#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
70do { \
7b6e506e 71 if ((DECL) && sdata_symbolic_operand (XEXP (DECL_RTL (DECL), 0), Pmode)) \
d6b5193b 72 switch_to_section (sbss_section); \
c65ebc55 73 else \
d6b5193b 74 switch_to_section (bss_section); \
c65ebc55
JW
75 ASM_OUTPUT_ALIGN (FILE, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
76 ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL); \
77 ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1); \
78} while (0)
79
c65ebc55
JW
80/* The # tells the Intel assembler that this is not a register name.
81 However, we can't emit the # in a label definition, so we set a variable
13daf3c1
NC
82 in ASM_OUTPUT_LABEL to control whether we want the postfix here or not.
83 We append the # to the label name, but since NAME can be an expression
84 we have to scan it for a non-label character and insert the # there. */
c65ebc55
JW
85
86#undef ASM_OUTPUT_LABELREF
c45632b7
RH
87#define ASM_OUTPUT_LABELREF(STREAM, NAME) \
88do { \
89 const char *name_ = NAME; \
c45632b7
RH
90 if (*name_ == '*') \
91 name_++; \
92 else \
93 fputs (user_label_prefix, STREAM); \
94 fputs (name_, STREAM); \
45d29407
RH
95 if (!ia64_asm_output_label) \
96 fputc ('#', STREAM); \
c45632b7 97} while (0)
c65ebc55
JW
98
99/* Intel assembler requires both flags and type if declaring a non-predefined
100 section. */
101#undef INIT_SECTION_ASM_OP
de323aa1 102#define INIT_SECTION_ASM_OP "\t.section\t.init,\"ax\",\"progbits\""
c65ebc55 103#undef FINI_SECTION_ASM_OP
de323aa1 104#define FINI_SECTION_ASM_OP "\t.section\t.fini,\"ax\",\"progbits\""
c65ebc55 105
97e242b0
RH
106#define DBX_REGISTER_NUMBER(REGNO) \
107 ia64_dbx_register_number(REGNO)
c65ebc55 108
c65ebc55
JW
109#undef SIZE_TYPE
110#define SIZE_TYPE "long unsigned int"
111
112#undef PTRDIFF_TYPE
113#define PTRDIFF_TYPE "long int"
114
115#undef WCHAR_TYPE
116#define WCHAR_TYPE "int"
117
118#undef WCHAR_TYPE_SIZE
119#define WCHAR_TYPE_SIZE 32
120
c65ebc55
JW
121/* We redefine this to use the ia64 .proc pseudo-op. */
122
123#undef ASM_DECLARE_FUNCTION_NAME
124#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
8e7745dc 125 ia64_start_function(FILE,NAME,DECL)
c65ebc55
JW
126
127/* We redefine this to use the ia64 .endp pseudo-op. */
128
129#undef ASM_DECLARE_FUNCTION_SIZE
130#define ASM_DECLARE_FUNCTION_SIZE(FILE, NAME, DECL) \
131do { \
132 fputs ("\t.endp ", FILE); \
133 assemble_name (FILE, NAME); \
134 fputc ('\n', FILE); \
135} while (0)
136
b64a1b53 137/* Override default elf definition. */
9b580a0b
RH
138#undef TARGET_ASM_RELOC_RW_MASK
139#define TARGET_ASM_RELOC_RW_MASK ia64_reloc_rw_mask
b64a1b53
RH
140#undef TARGET_ASM_SELECT_RTX_SECTION
141#define TARGET_ASM_SELECT_RTX_SECTION ia64_select_rtx_section
ac9cd70f 142
de323aa1 143#define SDATA_SECTION_ASM_OP "\t.sdata"
de323aa1 144#define SBSS_SECTION_ASM_OP "\t.sbss"