]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/pa/pa-linux.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / pa / pa-linux.h
CommitLineData
0e22c1d8 1/* Definitions for PA_RISC with ELF format
83ffe9cd 2 Copyright (C) 1999-2023 Free Software Foundation, Inc.
0e22c1d8 3
b7849684 4This file is part of GCC.
0e22c1d8 5
b7849684 6GCC is free software; you can redistribute it and/or modify
0e22c1d8 7it under the terms of the GNU General Public License as published by
2f83c7d6 8the Free Software Foundation; either version 3, or (at your option)
0e22c1d8
JL
9any later version.
10
b7849684 11GCC is distributed in the hope that it will be useful,
0e22c1d8
JL
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
2f83c7d6
NC
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
0e22c1d8 19
0e22c1d8 20
c219e1da
JDA
21#undef TARGET_OS_CPP_BUILTINS
22#define TARGET_OS_CPP_BUILTINS() \
23 do \
24 { \
107fd1c1 25 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
c219e1da 26 builtin_assert ("machine=bigendian"); \
c219e1da
JDA
27 } \
28 while (0)
29
30#undef CPP_SPEC
de0e921c 31#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
0e22c1d8 32
e25724d8
AM
33#undef ASM_SPEC
34#define ASM_SPEC \
d3153553 35 ""
e25724d8
AM
36
37/* Define this for shared library support because it isn't in the main
38 linux.h file. */
39
7bd85ce0
JM
40#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
41
e25724d8
AM
42#undef LINK_SPEC
43#define LINK_SPEC "\
44 %{shared:-shared} \
45 %{!shared: \
46 %{!static: \
47 %{rdynamic:-export-dynamic} \
107fd1c1 48 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
e25724d8
AM
49 %{static:-static}}"
50
e25724d8 51/* glibc's profiling functions don't need gcc to allocate counters. */
3674b34d 52#define NO_DEFERRED_PROFILE_COUNTERS 1
e25724d8 53
e25724d8
AM
54/* Define the strings used for the special svr4 .type and .size directives.
55 These strings generally do not vary from one system running svr4 to
56 another, but if a given system (e.g. m88k running svr) needs to use
57 different pseudo-op names for these, they may be overridden in the
58 file which includes this one. */
59
60#undef STRING_ASM_OP
9be3bc1f 61#define STRING_ASM_OP "\t.stringz\t"
e25724d8
AM
62
63#define TEXT_SECTION_ASM_OP "\t.text"
64#define DATA_SECTION_ASM_OP "\t.data"
65#define BSS_SECTION_ASM_OP "\t.section\t.bss"
66
1bc7c5b6 67#define TARGET_ASM_FILE_START pa_linux_file_start
e25724d8 68
279dccc5
JDA
69/* We want local labels to start with period if made with asm_fprintf. */
70#undef LOCAL_LABEL_PREFIX
71#define LOCAL_LABEL_PREFIX "."
72
e25724d8
AM
73/* Define these to generate the Linux/ELF/SysV style of internal
74 labels all the time - i.e. to be compatible with
75 ASM_GENERATE_INTERNAL_LABEL in <elfos.h>. Compare these with the
76 ones in pa.h and note the lack of dollar signs in these. FIXME:
77 shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */
78
79#undef ASM_OUTPUT_ADDR_VEC_ELT
80#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
33e67557 81 fprintf (FILE, "\t.word .L%d\n", VALUE)
e25724d8
AM
82
83#undef ASM_OUTPUT_ADDR_DIFF_ELT
84#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
33e67557 85 fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL)
e25724d8 86
4ad5e05d 87/* Use the default. */
e25724d8 88#undef ASM_OUTPUT_LABEL
e25724d8 89
4977bab6 90/* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and
e25724d8
AM
91 does what we want (i.e. uses colons). It must be compatible with
92 ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */
93
506a61b1 94/* Use the default. */
179cd3d3
JDA
95#undef ASM_OUTPUT_INTERNAL_LABEL
96
97/* Use the default. */
5eb99654 98#undef TARGET_ASM_GLOBALIZE_LABEL
506a61b1 99/* Globalizing directive for a label. */
692f5611 100#define GLOBAL_ASM_OP ".globl "
e25724d8
AM
101
102/* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
e53b6e56 103 labels in a function declaration (since pa.cc seems determined to do
e13896a3 104 it differently). */
e25724d8
AM
105
106#undef ASM_DECLARE_FUNCTION_NAME
107#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
108 do \
109 { \
2be2ac70 110 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
e25724d8 111 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
e13896a3 112 pa_output_function_label (FILE); \
e25724d8
AM
113 } \
114 while (0)
115
e13896a3
JDA
116/* Output function prologue for linux. */
117#undef TARGET_ASM_FUNCTION_PROLOGUE
118#define TARGET_ASM_FUNCTION_PROLOGUE pa_linux_output_function_prologue
119
a02aa5b0
JDA
120/* As well as globalizing the label, we need to encode the label
121 to ensure a plabel is generated in an indirect call. */
122
123#undef ASM_OUTPUT_EXTERNAL_LIBCALL
124#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
125 do \
126 { \
127 if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \
ae9d61ab 128 pa_encode_label (FUN); \
a02aa5b0
JDA
129 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
130 } \
131 while (0)
132
e25724d8
AM
133#undef TARGET_GAS
134#define TARGET_GAS 1
33a55f29 135
03cb4097
JDA
136/* The SYNC operations are implemented as library functions, not
137 INSN patterns. As a result, the HAVE defines for the patterns are
138 not defined. We need to define them to generate the corresponding
139 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* and __GCC_ATOMIC_*_LOCK_FREE
140 defines. */
141
142#define HAVE_sync_compare_and_swapqi 1
143#define HAVE_sync_compare_and_swaphi 1
144#define HAVE_sync_compare_and_swapsi 1
7e7c9d40 145#define HAVE_sync_compare_and_swapdi 1
938b6f1e 146
d5ca27ef
JDA
147/* It's not possible to enable GNU_stack notes since the kernel needs
148 an executable stack for signal returns and syscall restarts. */
149
938b6f1e 150#undef NEED_INDICATE_EXEC_STACK
d5ca27ef 151#define NEED_INDICATE_EXEC_STACK 0