annotate gcc/explow.h @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
kono
parents:
diff changeset
1 /* Export function prototypes from explow.c.
kono
parents:
diff changeset
2 Copyright (C) 2015-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
9 version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
14 for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 #ifndef GCC_EXPLOW_H
kono
parents:
diff changeset
21 #define GCC_EXPLOW_H
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 /* Return a memory reference like MEMREF, but which is known to have a
kono
parents:
diff changeset
24 valid address. */
kono
parents:
diff changeset
25 extern rtx validize_mem (rtx);
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 extern rtx use_anchored_address (rtx);
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 /* Copy given rtx to a new temp reg and return that. */
kono
parents:
diff changeset
30 extern rtx copy_to_reg (rtx);
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 /* Like copy_to_reg but always make the reg Pmode. */
kono
parents:
diff changeset
33 extern rtx copy_addr_to_reg (rtx);
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 /* Like copy_to_reg but always make the reg the specified mode MODE. */
kono
parents:
diff changeset
36 extern rtx copy_to_mode_reg (machine_mode, rtx);
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 /* Copy given rtx to given temp reg and return that. */
kono
parents:
diff changeset
39 extern rtx copy_to_suggested_reg (rtx, rtx, machine_mode);
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 /* Copy a value to a register if it isn't already a register.
kono
parents:
diff changeset
42 Args are mode (in case value is a constant) and the value. */
kono
parents:
diff changeset
43 extern rtx force_reg (machine_mode, rtx);
kono
parents:
diff changeset
44
kono
parents:
diff changeset
45 /* Return given rtx, copied into a new temp reg if it was in memory. */
kono
parents:
diff changeset
46 extern rtx force_not_mem (rtx);
kono
parents:
diff changeset
47
kono
parents:
diff changeset
48 /* Return mode and signedness to use when an argument or result in the
kono
parents:
diff changeset
49 given mode is promoted. */
kono
parents:
diff changeset
50 extern machine_mode promote_function_mode (const_tree, machine_mode, int *,
kono
parents:
diff changeset
51 const_tree, int);
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 /* Return mode and signedness to use when an object in the given mode
kono
parents:
diff changeset
54 is promoted. */
kono
parents:
diff changeset
55 extern machine_mode promote_mode (const_tree, machine_mode, int *);
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 /* Return mode and signedness to use when object is promoted. */
kono
parents:
diff changeset
58 machine_mode promote_decl_mode (const_tree, int *);
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 /* Return mode and signedness to use when object is promoted. */
kono
parents:
diff changeset
61 machine_mode promote_ssa_mode (const_tree, int *);
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 /* Remove some bytes from the stack. An rtx says how many. */
kono
parents:
diff changeset
64 extern void adjust_stack (rtx);
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 /* Add some bytes to the stack. An rtx says how many. */
kono
parents:
diff changeset
67 extern void anti_adjust_stack (rtx);
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 /* Add some bytes to the stack while probing it. An rtx says how many. */
kono
parents:
diff changeset
70 extern void anti_adjust_stack_and_probe (rtx, bool);
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 /* Support for building allocation/probing loops for stack-clash
kono
parents:
diff changeset
73 protection of dyamically allocated stack space. */
kono
parents:
diff changeset
74 extern void compute_stack_clash_protection_loop_data (rtx *, rtx *, rtx *,
kono
parents:
diff changeset
75 HOST_WIDE_INT *, rtx);
kono
parents:
diff changeset
76 extern void emit_stack_clash_protection_probe_loop_start (rtx *, rtx *,
kono
parents:
diff changeset
77 rtx, bool);
kono
parents:
diff changeset
78 extern void emit_stack_clash_protection_probe_loop_end (rtx, rtx,
kono
parents:
diff changeset
79 rtx, bool);
kono
parents:
diff changeset
80
kono
parents:
diff changeset
81 /* This enum is used for the following two functions. */
kono
parents:
diff changeset
82 enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL};
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 /* Save the stack pointer at the specified level. */
kono
parents:
diff changeset
85 extern void emit_stack_save (enum save_level, rtx *);
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 /* Restore the stack pointer from a save area of the specified level. */
kono
parents:
diff changeset
88 extern void emit_stack_restore (enum save_level, rtx);
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 /* Invoke emit_stack_save for the nonlocal_goto_save_area. */
kono
parents:
diff changeset
91 extern void update_nonlocal_goto_save_area (void);
kono
parents:
diff changeset
92
kono
parents:
diff changeset
93 /* Record a new stack level. */
kono
parents:
diff changeset
94 extern void record_new_stack_level (void);
kono
parents:
diff changeset
95
kono
parents:
diff changeset
96 /* Allocate some space on the stack dynamically and return its address. */
kono
parents:
diff changeset
97 extern rtx allocate_dynamic_stack_space (rtx, unsigned, unsigned,
kono
parents:
diff changeset
98 HOST_WIDE_INT, bool);
kono
parents:
diff changeset
99
kono
parents:
diff changeset
100 /* Calculate the necessary size of a constant dynamic stack allocation from the
kono
parents:
diff changeset
101 size of the variable area. */
kono
parents:
diff changeset
102 extern void get_dynamic_stack_size (rtx *, unsigned, unsigned, HOST_WIDE_INT *);
kono
parents:
diff changeset
103
kono
parents:
diff changeset
104 /* Returns the address of the dynamic stack space without allocating it. */
kono
parents:
diff changeset
105 extern rtx get_dynamic_stack_base (HOST_WIDE_INT offset,
kono
parents:
diff changeset
106 unsigned required_align);
kono
parents:
diff changeset
107
kono
parents:
diff changeset
108 /* Emit one stack probe at ADDRESS, an address within the stack. */
kono
parents:
diff changeset
109 extern void emit_stack_probe (rtx);
kono
parents:
diff changeset
110
kono
parents:
diff changeset
111 /* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive.
kono
parents:
diff changeset
112 FIRST is a constant and size is a Pmode RTX. These are offsets from
kono
parents:
diff changeset
113 the current stack pointer. STACK_GROWS_DOWNWARD says whether to add
kono
parents:
diff changeset
114 or subtract them from the stack pointer. */
kono
parents:
diff changeset
115 extern void probe_stack_range (HOST_WIDE_INT, rtx);
kono
parents:
diff changeset
116
kono
parents:
diff changeset
117 /* Return an rtx that refers to the value returned by a library call
kono
parents:
diff changeset
118 in its original home. This becomes invalid if any more code is emitted. */
kono
parents:
diff changeset
119 extern rtx hard_libcall_value (machine_mode, rtx);
kono
parents:
diff changeset
120
kono
parents:
diff changeset
121 /* Return an rtx that refers to the value returned by a function
kono
parents:
diff changeset
122 in its original home. This becomes invalid if any more code is emitted. */
kono
parents:
diff changeset
123 extern rtx hard_function_value (const_tree, const_tree, const_tree, int);
kono
parents:
diff changeset
124
kono
parents:
diff changeset
125 /* Convert arg to a valid memory address for specified machine mode that points
kono
parents:
diff changeset
126 to a specific named address space, by emitting insns to perform arithmetic
kono
parents:
diff changeset
127 if necessary. */
kono
parents:
diff changeset
128 extern rtx memory_address_addr_space (machine_mode, rtx, addr_space_t);
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 extern rtx eliminate_constant_term (rtx, rtx *);
kono
parents:
diff changeset
131
kono
parents:
diff changeset
132 /* Like memory_address_addr_space, except assume the memory address points to
kono
parents:
diff changeset
133 the generic named address space. */
kono
parents:
diff changeset
134 #define memory_address(MODE,RTX) \
kono
parents:
diff changeset
135 memory_address_addr_space ((MODE), (RTX), ADDR_SPACE_GENERIC)
kono
parents:
diff changeset
136
kono
parents:
diff changeset
137 #endif /* GCC_EXPLOW_H */