/* Definitions for PA_RISC with ELF format
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
- 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1999-2024 Free Software Foundation, Inc.
This file is part of GCC.
while (0)
#undef CPP_SPEC
-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#undef ASM_SPEC
#define ASM_SPEC \
#undef ASM_OUTPUT_ADDR_VEC_ELT
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
- if (TARGET_BIG_SWITCH) \
- fprintf (FILE, "\t.word .L%d\n", VALUE); \
- else \
- fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
+ fprintf (FILE, "\t.word .L%d\n", VALUE)
#undef ASM_OUTPUT_ADDR_DIFF_ELT
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
- if (TARGET_BIG_SWITCH) \
- fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL); \
- else \
- fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
+ fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL)
/* Use the default. */
#undef ASM_OUTPUT_LABEL
#define GLOBAL_ASM_OP ".globl "
/* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
- labels in a function declaration (since pa.c seems determined to do
- it differently) */
+ labels in a function declaration (since pa.cc seems determined to do
+ it differently). */
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
{ \
ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
+ pa_output_function_label (FILE); \
} \
while (0)
+/* Output function prologue for linux. */
+#undef TARGET_ASM_FUNCTION_PROLOGUE
+#define TARGET_ASM_FUNCTION_PROLOGUE pa_linux_output_function_prologue
+
/* As well as globalizing the label, we need to encode the label
to ensure a plabel is generated in an indirect call. */
do \
{ \
if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \
- hppa_encode_label (FUN); \
+ pa_encode_label (FUN); \
(*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
} \
while (0)
-/* Linux always uses gas. */
#undef TARGET_GAS
#define TARGET_GAS 1
+
+/* The SYNC operations are implemented as library functions, not
+ INSN patterns. As a result, the HAVE defines for the patterns are
+ not defined. We need to define them to generate the corresponding
+ __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* and __GCC_ATOMIC_*_LOCK_FREE
+ defines. */
+
+#define HAVE_sync_compare_and_swapqi 1
+#define HAVE_sync_compare_and_swaphi 1
+#define HAVE_sync_compare_and_swapsi 1
+#define HAVE_sync_compare_and_swapdi 1
+
+/* Enable GNU stack notes. */
+
+#undef NEED_INDICATE_EXEC_STACK
+#define NEED_INDICATE_EXEC_STACK 1