]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/gnu-d.cc
rs6000: Load high and low part of 64bit constant independently
[thirdparty/gcc.git] / gcc / config / gnu-d.cc
CommitLineData
ca652f86 1/* GNU system support needed only by D front-end.
aeee4812 2 Copyright (C) 2017-2023 Free Software Foundation, Inc.
b4c522fa
IB
3
4GCC is free software; you can redistribute it and/or modify it under
5the terms of the GNU General Public License as published by the Free
6Software Foundation; either version 3, or (at your option) any later
7version.
8
9GCC is distributed in the hope that it will be useful, but WITHOUT ANY
10WARRANTY; without even the implied warranty of MERCHANTABILITY or
11FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12for more details.
13
14You should have received a copy of the GNU General Public License
15along with GCC; see the file COPYING3. If not see
16<http://www.gnu.org/licenses/>. */
17
18#include "config.h"
19#include "system.h"
20#include "coretypes.h"
21#include "tm.h"
d5ad6f84 22#include "tm_d.h"
b4c522fa
IB
23#include "d/d-target.h"
24#include "d/d-target-def.h"
25
ca652f86 26/* Implement TARGET_D_OS_VERSIONS for GNU targets. */
b4c522fa
IB
27
28static void
ca652f86 29gnu_d_os_builtins (void)
b4c522fa
IB
30{
31 d_add_builtin_version ("Posix");
ca652f86
IB
32 d_add_builtin_version ("Hurd");
33 d_add_builtin_version ("CRuntime_Glibc");
b4c522fa
IB
34}
35
d81bc495
IB
36/* Handle a call to `__traits(getTargetInfo, "objectFormat")'. */
37
38static tree
ca652f86 39gnu_d_handle_target_object_format (void)
d81bc495
IB
40{
41 const char *objfmt = "elf";
42
43 return build_string_literal (strlen (objfmt) + 1, objfmt);
44}
45
ca652f86 46/* Implement TARGET_D_REGISTER_OS_TARGET_INFO for GNU targets. */
d81bc495
IB
47
48static void
ca652f86 49gnu_d_register_target_info (void)
d81bc495
IB
50{
51 const struct d_target_info_spec handlers[] = {
ca652f86 52 { "objectFormat", gnu_d_handle_target_object_format },
d81bc495
IB
53 { NULL, NULL },
54 };
55
56 d_add_target_info_handlers (handlers);
57}
58
b4c522fa 59#undef TARGET_D_OS_VERSIONS
ca652f86 60#define TARGET_D_OS_VERSIONS gnu_d_os_builtins
b4c522fa 61
d81bc495 62#undef TARGET_D_REGISTER_OS_TARGET_INFO
ca652f86 63#define TARGET_D_REGISTER_OS_TARGET_INFO gnu_d_register_target_info
d81bc495 64
b4c522fa 65struct gcc_targetdm targetdm = TARGETDM_INITIALIZER;