annotate gcc/config/i386/gnu-user.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions for Intel 386 systems using GNU userspace.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 1994-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3 Contributed by Eric Youngdale.
kono
parents:
diff changeset
4 Modified for stabs-in-ELF by H.J. Lu.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 This file is part of GCC.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
10 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
11 any later version.
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
16 GNU General Public License for more details.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
19 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
20 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 /* Output at beginning of assembler file. */
kono
parents:
diff changeset
23 /* The .file command should always begin the output. */
kono
parents:
diff changeset
24 #define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 #undef ASM_COMMENT_START
kono
parents:
diff changeset
27 #define ASM_COMMENT_START "#"
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 #undef DBX_REGISTER_NUMBER
kono
parents:
diff changeset
30 #define DBX_REGISTER_NUMBER(n) \
kono
parents:
diff changeset
31 (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 /* Output assembler code to FILE to call the profiler.
kono
parents:
diff changeset
34 To the best of my knowledge, no GNU userspace libc has required the label
kono
parents:
diff changeset
35 argument to mcount. */
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 #define NO_PROFILE_COUNTERS 1
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 #undef MCOUNT_NAME
kono
parents:
diff changeset
40 #define MCOUNT_NAME "mcount"
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 /* The GLIBC version of mcount for the x86 assumes that there is a
kono
parents:
diff changeset
43 frame, so we cannot allow profiling without a frame pointer. */
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 #undef SUBTARGET_FRAME_POINTER_REQUIRED
kono
parents:
diff changeset
46 #define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 #undef SIZE_TYPE
kono
parents:
diff changeset
49 #define SIZE_TYPE "unsigned int"
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 #undef PTRDIFF_TYPE
kono
parents:
diff changeset
52 #define PTRDIFF_TYPE "int"
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 #undef WCHAR_TYPE
kono
parents:
diff changeset
55 #define WCHAR_TYPE "long int"
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 #undef WCHAR_TYPE_SIZE
kono
parents:
diff changeset
58 #define WCHAR_TYPE_SIZE BITS_PER_WORD
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 /* Provide a LINK_SPEC appropriate for GNU userspace. Here we provide support
kono
parents:
diff changeset
61 for the special GCC options -static and -shared, which allow us to
kono
parents:
diff changeset
62 link things in one of these three modes by applying the appropriate
kono
parents:
diff changeset
63 combinations of options at link-time.
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 When the -shared link option is used a final link is not being
kono
parents:
diff changeset
66 done. */
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 #undef ASM_SPEC
kono
parents:
diff changeset
69 #define ASM_SPEC \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
70 "--32 %{msse2avx:%{!mavx:-msse2avx}}"
111
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 #undef SUBTARGET_EXTRA_SPECS
kono
parents:
diff changeset
73 #define SUBTARGET_EXTRA_SPECS \
kono
parents:
diff changeset
74 { "link_emulation", GNU_USER_LINK_EMULATION },\
kono
parents:
diff changeset
75 { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
kono
parents:
diff changeset
76
kono
parents:
diff changeset
77 #define GNU_USER_TARGET_LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
kono
parents:
diff changeset
78 %{!shared: \
kono
parents:
diff changeset
79 %{!static: \
kono
parents:
diff changeset
80 %{!static-pie: \
kono
parents:
diff changeset
81 %{rdynamic:-export-dynamic} \
kono
parents:
diff changeset
82 -dynamic-linker %(dynamic_linker)}} \
kono
parents:
diff changeset
83 %{static:-static} %{static-pie:-static -pie --no-dynamic-linker -z text}}"
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 #undef LINK_SPEC
kono
parents:
diff changeset
86 #define LINK_SPEC GNU_USER_TARGET_LINK_SPEC
kono
parents:
diff changeset
87
kono
parents:
diff changeset
88 /* A C statement (sans semicolon) to output to the stdio stream
kono
parents:
diff changeset
89 FILE the assembler definition of uninitialized global DECL named
kono
parents:
diff changeset
90 NAME whose size is SIZE bytes and alignment is ALIGN bytes.
kono
parents:
diff changeset
91 Try to use asm_output_aligned_bss to implement this macro. */
kono
parents:
diff changeset
92
kono
parents:
diff changeset
93 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
kono
parents:
diff changeset
94 asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
kono
parents:
diff changeset
95
kono
parents:
diff changeset
96 /* A C statement to output to the stdio stream FILE an assembler
kono
parents:
diff changeset
97 command to advance the location counter to a multiple of 1<<LOG
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
98 bytes if it is within MAX_SKIP bytes. */
111
kono
parents:
diff changeset
99
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
100 #define SUBALIGN_LOG 3
111
kono
parents:
diff changeset
101
kono
parents:
diff changeset
102 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
kono
parents:
diff changeset
103 #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
kono
parents:
diff changeset
104 do { \
kono
parents:
diff changeset
105 if ((LOG) != 0) { \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
106 if ((MAX_SKIP) == 0 || (MAX_SKIP) >= (1 << (LOG)) - 1) \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
107 fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
108 else \
111
kono
parents:
diff changeset
109 fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
kono
parents:
diff changeset
110 } \
kono
parents:
diff changeset
111 } while (0)
kono
parents:
diff changeset
112 #endif
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 /* Handle special EH pointer encodings. Absolute, pc-relative, and
kono
parents:
diff changeset
115 indirect are handled automatically. */
kono
parents:
diff changeset
116 #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
kono
parents:
diff changeset
117 do { \
kono
parents:
diff changeset
118 if ((SIZE) == 4 && ((ENCODING) & 0x70) == DW_EH_PE_datarel) \
kono
parents:
diff changeset
119 { \
kono
parents:
diff changeset
120 fputs (ASM_LONG, FILE); \
kono
parents:
diff changeset
121 assemble_name (FILE, XSTR (ADDR, 0)); \
kono
parents:
diff changeset
122 fputs (((ENCODING) & DW_EH_PE_indirect ? "@GOT" : "@GOTOFF"), FILE); \
kono
parents:
diff changeset
123 goto DONE; \
kono
parents:
diff changeset
124 } \
kono
parents:
diff changeset
125 } while (0)
kono
parents:
diff changeset
126
kono
parents:
diff changeset
127 #ifdef TARGET_LIBC_PROVIDES_SSP
kono
parents:
diff changeset
128 /* i386 glibc provides __stack_chk_guard in %gs:0x14. */
kono
parents:
diff changeset
129 #define TARGET_THREAD_SSP_OFFSET 0x14
kono
parents:
diff changeset
130
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
131 /* i386 glibc provides __private_ss in %gs:0x30. */
111
kono
parents:
diff changeset
132 #define TARGET_THREAD_SPLIT_STACK_OFFSET 0x30
kono
parents:
diff changeset
133 #endif