summaryrefslogtreecommitdiff
path: root/gcc/d/d-target.def
blob: d641c74342968a641da7c1ca029b1d94690b37ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* d-target.def -- Target hook definitions for the D front end.
   Copyright (C) 2017-2020 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
   Free Software Foundation; either version 3, or (at your option) any
   later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; see the file COPYING3.  If not see
   <http://www.gnu.org/licenses/>.  */

/* See target-hooks-macros.h for details of macros that should be
   provided by the including file, and how to use them here.  */

#include "target-hooks-macros.h"

#undef HOOK_TYPE
#define HOOK_TYPE "D Target Hook"

HOOK_VECTOR (TARGETDM_INITIALIZER, gcc_targetdm)

#undef HOOK_PREFIX
#define HOOK_PREFIX "TARGET_"

/* Environmental version identifiers relating to the target CPU.  */
DEFHOOK
(d_cpu_versions,
 "Declare all environmental version identifiers relating to the target CPU\n\
using the function @code{builtin_version}, which takes a string representing\n\
the name of the version.  Version identifiers predefined by this hook apply\n\
to all modules that are being compiled and imported.",
 void, (void),
 hook_void_void)

/* Environmental version identifiers relating to the target OS.  */
DEFHOOK
(d_os_versions,
 "Similarly to @code{TARGET_D_CPU_VERSIONS}, but is used for versions\n\
relating to the target operating system.",
 void, (void),
 hook_void_void)

/* The sizeof CRITICAL_SECTION or pthread_mutex_t.  */
DEFHOOK
(d_critsec_size,
 "Returns the size of the data structure used by the target operating system\n\
for critical sections and monitors.  For example, on Microsoft Windows this\n\
would return the @code{sizeof(CRITICAL_SECTION)}, while other platforms that\n\
implement pthreads would return @code{sizeof(pthread_mutex_t)}.",
 unsigned, (void),
 hook_uint_void_0)

/* Close the 'struct gcc_targetdm' definition.  */
HOOK_VECTOR_END (C90_EMPTY_HACK)