1 /* Definitions for PA_RISC with ELF format
2 Copyright (C) 1999-2020 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 GCC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
21 #undef TARGET_OS_CPP_BUILTINS
22 #define TARGET_OS_CPP_BUILTINS() \
25 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
26 builtin_assert ("machine=bigendian"); \
31 #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
37 /* Define this for shared library support because it isn't in the main
40 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
47 %{rdynamic:-export-dynamic} \
48 -dynamic-linker " GNU_USER_DYNAMIC_LINKER "} \
51 /* glibc's profiling functions don't need gcc to allocate counters. */
52 #define NO_DEFERRED_PROFILE_COUNTERS 1
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. */
61 #define STRING_ASM_OP "\t.stringz\t"
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"
67 #define TARGET_ASM_FILE_START pa_linux_file_start
69 /* We want local labels to start with period if made with asm_fprintf. */
70 #undef LOCAL_LABEL_PREFIX
71 #define LOCAL_LABEL_PREFIX "."
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? */
79 #undef ASM_OUTPUT_ADDR_VEC_ELT
80 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
81 fprintf (FILE, "\t.word .L%d\n", VALUE)
83 #undef ASM_OUTPUT_ADDR_DIFF_ELT
84 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
85 fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL)
87 /* Use the default. */
88 #undef ASM_OUTPUT_LABEL
90 /* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and
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. */
94 /* Use the default. */
95 #undef ASM_OUTPUT_INTERNAL_LABEL
97 /* Use the default. */
98 #undef TARGET_ASM_GLOBALIZE_LABEL
99 /* Globalizing directive for a label. */
100 #define GLOBAL_ASM_OP ".globl "
102 /* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
103 labels in a function declaration (since pa.c seems determined to do
106 #undef ASM_DECLARE_FUNCTION_NAME
107 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
110 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
111 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
112 pa_output_function_label (FILE); \
116 /* Output function prologue for linux. */
117 #undef TARGET_ASM_FUNCTION_PROLOGUE
118 #define TARGET_ASM_FUNCTION_PROLOGUE pa_linux_output_function_prologue
120 /* As well as globalizing the label, we need to encode the label
121 to ensure a plabel is generated in an indirect call. */
123 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
124 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
127 if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \
128 pa_encode_label (FUN); \
129 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
136 #undef TARGET_SYNC_LIBCALL
137 #define TARGET_SYNC_LIBCALL 1
139 /* The SYNC operations are implemented as library functions, not
140 INSN patterns. As a result, the HAVE defines for the patterns are
141 not defined. We need to define them to generate the corresponding
142 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* and __GCC_ATOMIC_*_LOCK_FREE
145 #define HAVE_sync_compare_and_swapqi 1
146 #define HAVE_sync_compare_and_swaphi 1
147 #define HAVE_sync_compare_and_swapsi 1
148 #define HAVE_sync_compare_and_swapdi 1
150 /* It's not possible to enable GNU_stack notes since the kernel needs
151 an executable stack for signal returns and syscall restarts. */
153 #undef NEED_INDICATE_EXEC_STACK
154 #define NEED_INDICATE_EXEC_STACK 0