re PR middle-end/55027 (simplify vector multiplication by 1)
[official-gcc.git] / gcc / config / pa / pa-openbsd.h
blob785409cf780a52e38b95e92f6dbce70159942084
1 /* Definitions for PA_RISC with ELF format
2 Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
3 2011, 2012
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
23 #undef TARGET_OS_CPP_BUILTINS
24 #define TARGET_OS_CPP_BUILTINS() \
25 do \
26 { \
27 OPENBSD_OS_CPP_BUILTINS(); \
28 builtin_assert ("machine=bigendian"); \
29 } \
30 while (0)
32 /* Our profiling scheme doesn't LP labels and counter words. */
33 #define NO_DEFERRED_PROFILE_COUNTERS 1
35 #undef STRING_ASM_OP
36 #define STRING_ASM_OP "\t.stringz\t"
38 #define TEXT_SECTION_ASM_OP "\t.text"
39 #define DATA_SECTION_ASM_OP "\t.data"
40 #define BSS_SECTION_ASM_OP "\t.section\t.bss"
42 /* We want local labels to start with period if made with asm_fprintf. */
43 #undef LOCAL_LABEL_PREFIX
44 #define LOCAL_LABEL_PREFIX "."
46 /* Define these to generate the Linux/ELF/SysV style of internal
47 labels all the time - i.e. to be compatible with
48 ASM_GENERATE_INTERNAL_LABEL in <elfos.h>. Compare these with the
49 ones in pa.h and note the lack of dollar signs in these. FIXME:
50 shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */
52 #undef ASM_OUTPUT_ADDR_VEC_ELT
53 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
54 if (TARGET_BIG_SWITCH) \
55 fprintf (FILE, "\t.word .L%d\n", VALUE); \
56 else \
57 fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
59 #undef ASM_OUTPUT_ADDR_DIFF_ELT
60 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
61 if (TARGET_BIG_SWITCH) \
62 fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL); \
63 else \
64 fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE)
66 /* Use the default. */
67 #undef ASM_OUTPUT_LABEL
69 /* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and
70 does what we want (i.e. uses colons). It must be compatible with
71 ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */
73 /* Use the default. */
74 #undef ASM_OUTPUT_INTERNAL_LABEL
76 /* Use the default. */
77 #undef TARGET_ASM_GLOBALIZE_LABEL
79 /* FIXME: Hacked from the <elfos.h> one so that we avoid multiple
80 labels in a function declaration (since pa.c seems determined to do
81 it differently) */
83 #undef ASM_DECLARE_FUNCTION_NAME
84 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
85 do \
86 { \
87 ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
88 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
89 } \
90 while (0)
92 /* As well as globalizing the label, we need to encode the label
93 to ensure a plabel is generated in an indirect call. */
95 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
96 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
97 do \
98 { \
99 if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \
100 pa_encode_label (FUN); \
101 (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \
103 while (0)
105 /* This says how to output an assembler line to define a global common symbol
106 with size SIZE (in bytes) and alignment ALIGN (in bits). */
108 #undef ASM_OUTPUT_ALIGNED_COMMON
109 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
110 pa_asm_output_aligned_common (FILE, NAME, SIZE, ALIGN)
112 /* This says how to output an assembler line to define a local common symbol
113 with size SIZE (in bytes) and alignment ALIGN (in bits). This macro
114 controls how the assembler definitions of uninitialized static variables
115 are output. */
117 #undef ASM_OUTPUT_ALIGNED_LOCAL
118 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
119 pa_asm_output_aligned_local (FILE, NAME, SIZE, ALIGN)
121 /* OpenBSD always uses gas. */
122 #undef TARGET_GAS
123 #define TARGET_GAS 1
125 /* Layout of source language data types. */
127 /* This must agree with <machine/_types.h> */
128 #undef SIZE_TYPE
129 #define SIZE_TYPE "long unsigned int"
131 #undef PTRDIFF_TYPE
132 #define PTRDIFF_TYPE "long int"
134 #undef WCHAR_TYPE
135 #define WCHAR_TYPE "int"
137 #undef WCHAR_TYPE_SIZE
138 #define WCHAR_TYPE_SIZE 32
140 #undef WINT_TYPE
141 #define WINT_TYPE "int"
143 #undef LINK_SPEC
144 #define LINK_SPEC \
145 "%{!shared:%{!nostdlib:%{!r:%{!e*:-e __start}}}} \
146 %{shared:-shared} %{R*} \
147 %{static:-Bstatic} \
148 %{!static:-Bdynamic} \
149 %{assert*} \
150 -dynamic-linker /usr/libexec/ld.so"
152 #undef STARTFILE_SPEC
153 #define STARTFILE_SPEC "\
154 %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
155 crtbegin%O%s} %{shared:crtbeginS%O%s}"
157 #undef ENDFILE_SPEC
158 #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
160 #define OBSD_HAS_CORRECT_SPECS
162 #define HAVE_ENABLE_EXECUTE_STACK