]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/i386/netbsd64.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / i386 / netbsd64.h
CommitLineData
a805d35f 1/* Definitions of target machine for GCC,
7c884404 2 for x86-64/ELF NetBSD systems.
83ffe9cd 3 Copyright (C) 2002-2023 Free Software Foundation, Inc.
7c884404
JT
4 Contributed by Wasabi Systems, Inc.
5
a805d35f 6This file is part of GCC.
7c884404 7
a805d35f 8GCC is free software; you can redistribute it and/or modify
7c884404 9it under the terms of the GNU General Public License as published by
2f83c7d6 10the Free Software Foundation; either version 3, or (at your option)
7c884404
JT
11any later version.
12
a805d35f 13GCC is distributed in the hope that it will be useful,
7c884404
JT
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
2f83c7d6
NC
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
7c884404 21
45beef47
JT
22#define TARGET_OS_CPP_BUILTINS() \
23 do \
24 { \
25 NETBSD_OS_CPP_BUILTINS_ELF(); \
45beef47
JT
26 } \
27 while (0)
7c884404 28
7c884404 29
a3e944f9 30/* Extra specs needed for NetBSD/x86-64 ELF. */
7c884404 31
fa7a0712 32#undef SUBTARGET_EXTRA_SPECS
45beef47 33#define SUBTARGET_EXTRA_SPECS \
a3e944f9
JT
34 { "netbsd_cpp_spec", NETBSD_CPP_SPEC }, \
35 { "netbsd_link_spec", NETBSD_LINK_SPEC_ELF }, \
36 { "netbsd_entry_point", NETBSD_ENTRY_POINT },
37
38
39/* Provide a LINK_SPEC appropriate for a NetBSD/x86-64 ELF target. */
40
41#undef LINK_SPEC
42#define LINK_SPEC \
43 "%{m32:-m elf_i386} \
44 %{m64:-m elf_x86_64} \
45 %(netbsd_link_spec)"
46
47#define NETBSD_ENTRY_POINT "_start"
48
fa7a0712 49
45beef47 50/* Provide a CPP_SPEC appropriate for NetBSD. */
fa7a0712
JT
51
52#undef CPP_SPEC
1ba7b414 53#define CPP_SPEC "%(netbsd_cpp_spec)"
fa7a0712
JT
54
55
7c884404
JT
56/* Output assembler code to FILE to call the profiler. */
57
58#undef FUNCTION_PROFILER
59#define FUNCTION_PROFILER(FILE, LABELNO) \
60{ \
61 if (TARGET_64BIT && flag_pic) \
62 fprintf (FILE, "\tcall *__mcount@PLT\n"); \
63 else if (flag_pic) \
64 fprintf (FILE, "\tcall *__mcount@PLT\n"); \
65 else \
66 fprintf (FILE, "\tcall __mcount\n"); \
67}
68
10e48e39 69#define HAVE_ENABLE_EXECUTE_STACK