annotate gcc/config/tilegx/linux.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions for TILE-Gx running Linux-based GNU systems with ELF.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2011-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 Contributed by Walter Lee (walt@tilera.com)
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 under the terms of the GNU General Public License as published
kono
parents:
diff changeset
9 by the Free Software Foundation; either version 3, or (at your
kono
parents:
diff changeset
10 option) any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but WITHOUT
kono
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
kono
parents:
diff changeset
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
kono
parents:
diff changeset
15 License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 #undef CPP_SPEC
kono
parents:
diff changeset
22 #define CPP_SPEC "%{pthread:-D_REENTRANT}"
kono
parents:
diff changeset
23
kono
parents:
diff changeset
24 #undef ASM_SPEC
kono
parents:
diff changeset
25 #define ASM_SPEC "%(endian_spec) %{m32:--32} %{m64:--64}"
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 #undef LINK_SPEC
kono
parents:
diff changeset
28 #define LINK_SPEC "%(endian_spec) \
kono
parents:
diff changeset
29 %{m64:-m elf64tilegx} %{m32:-m elf32tilegx} \
kono
parents:
diff changeset
30 %{shared:-shared} \
kono
parents:
diff changeset
31 %{!shared: \
kono
parents:
diff changeset
32 %{!static: \
kono
parents:
diff changeset
33 %{rdynamic:-export-dynamic} \
kono
parents:
diff changeset
34 -dynamic-linker \
kono
parents:
diff changeset
35 %{ m32: /lib32/ld.so.1} \
kono
parents:
diff changeset
36 %{!m32: /lib/ld.so.1}} \
kono
parents:
diff changeset
37 %{static:-static}}"
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 #define MULTILIB_DEFAULTS { "m64" }
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 #define NO_PROFILE_COUNTERS 1
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 #undef MCOUNT_NAME
kono
parents:
diff changeset
44 #define MCOUNT_NAME "__mcount"
kono
parents:
diff changeset
45
kono
parents:
diff changeset
46 #undef NEED_INDICATE_EXEC_STACK
kono
parents:
diff changeset
47 #define NEED_INDICATE_EXEC_STACK 1
kono
parents:
diff changeset
48
kono
parents:
diff changeset
49 #ifdef TARGET_LIBC_PROVIDES_SSP
kono
parents:
diff changeset
50 /* TILE-Gx glibc provides __stack_chk_guard two pointer-size words before
kono
parents:
diff changeset
51 tp. */
kono
parents:
diff changeset
52 #define TARGET_THREAD_SSP_OFFSET (-2 * GET_MODE_SIZE (ptr_mode))
kono
parents:
diff changeset
53 #endif
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 /* For __clear_cache in libgcc2.c. */
kono
parents:
diff changeset
56 #ifdef IN_LIBGCC2
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 /* Use the minimum page size of 4K. Alternatively we can call
kono
parents:
diff changeset
59 getpagesize() but it introduces a libc dependence.
kono
parents:
diff changeset
60 See Linux arch/tile/include/uapi/arch/icache.h for more commentary. */
kono
parents:
diff changeset
61 #undef CLEAR_INSN_CACHE
kono
parents:
diff changeset
62 #define CLEAR_INSN_CACHE(BEG, END) \
kono
parents:
diff changeset
63 { \
kono
parents:
diff changeset
64 long size = (long) (END) - (long) (BEG); \
kono
parents:
diff changeset
65 if (size) \
kono
parents:
diff changeset
66 { \
kono
parents:
diff changeset
67 const char *p = (const char *) ((unsigned long) (BEG) & -64L); \
kono
parents:
diff changeset
68 const char *end = p + (size < 4096 ? size : 4096) - 1; \
kono
parents:
diff changeset
69 __insn_mf (); \
kono
parents:
diff changeset
70 for (; p <= end; p += 64) \
kono
parents:
diff changeset
71 __insn_icoh (p); \
kono
parents:
diff changeset
72 __insn_drain (); \
kono
parents:
diff changeset
73 } \
kono
parents:
diff changeset
74 }
kono
parents:
diff changeset
75
kono
parents:
diff changeset
76 #else
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 /* define CLEAR_INSN_CACHE so that gcc knows to expand __builtin__clear_cache
kono
parents:
diff changeset
79 to the libraray call. */
kono
parents:
diff changeset
80 #undef CLEAR_INSN_CACHE
kono
parents:
diff changeset
81 #define CLEAR_INSN_CACHE 1
kono
parents:
diff changeset
82
kono
parents:
diff changeset
83 #endif