1 |
38 |
julius |
/* Definitions of target machine for GNU compiler, for IBM RS/6000.
|
2 |
|
|
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007
|
3 |
|
|
Free Software Foundation, Inc.
|
4 |
|
|
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
|
5 |
|
|
|
6 |
|
|
This file is part of GCC.
|
7 |
|
|
|
8 |
|
|
GCC is free software; you can redistribute it and/or modify it
|
9 |
|
|
under the terms of the GNU General Public License as published
|
10 |
|
|
by the Free Software Foundation; either version 3, or (at your
|
11 |
|
|
option) any later version.
|
12 |
|
|
|
13 |
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT
|
14 |
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
15 |
|
|
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
16 |
|
|
License for more details.
|
17 |
|
|
|
18 |
|
|
You should have received a copy of the GNU General Public License
|
19 |
|
|
along with GCC; see the file COPYING3. If not see
|
20 |
|
|
<http://www.gnu.org/licenses/>. */
|
21 |
|
|
|
22 |
|
|
#ifndef GCC_RS6000_PROTOS_H
|
23 |
|
|
#define GCC_RS6000_PROTOS_H
|
24 |
|
|
|
25 |
|
|
/* Declare functions in rs6000.c */
|
26 |
|
|
|
27 |
|
|
#ifdef RTX_CODE
|
28 |
|
|
|
29 |
|
|
#ifdef TREE_CODE
|
30 |
|
|
extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, int, int, int);
|
31 |
|
|
extern void rs6000_va_start (tree, rtx);
|
32 |
|
|
#endif /* TREE_CODE */
|
33 |
|
|
|
34 |
|
|
extern bool easy_altivec_constant (rtx, enum machine_mode);
|
35 |
|
|
extern bool macho_lo_sum_memory_operand (rtx, enum machine_mode);
|
36 |
|
|
extern int num_insns_constant (rtx, enum machine_mode);
|
37 |
|
|
extern int num_insns_constant_wide (HOST_WIDE_INT);
|
38 |
|
|
extern int small_data_operand (rtx, enum machine_mode);
|
39 |
|
|
extern bool toc_relative_expr_p (rtx);
|
40 |
|
|
extern bool invalid_e500_subreg (rtx, enum machine_mode);
|
41 |
|
|
extern void validate_condition_mode (enum rtx_code, enum machine_mode);
|
42 |
|
|
extern bool legitimate_constant_pool_address_p (rtx);
|
43 |
|
|
extern bool legitimate_indirect_address_p (rtx, int);
|
44 |
|
|
|
45 |
|
|
extern rtx rs6000_got_register (rtx);
|
46 |
|
|
extern rtx find_addr_reg (rtx);
|
47 |
|
|
extern rtx gen_easy_altivec_constant (rtx);
|
48 |
|
|
extern const char *output_vec_const_move (rtx *);
|
49 |
|
|
extern void rs6000_expand_vector_init (rtx, rtx);
|
50 |
|
|
extern void rs6000_expand_vector_set (rtx, rtx, int);
|
51 |
|
|
extern void rs6000_expand_vector_extract (rtx, rtx, int);
|
52 |
|
|
extern void build_mask64_2_operands (rtx, rtx *);
|
53 |
|
|
extern int expand_block_clear (rtx[]);
|
54 |
|
|
extern int expand_block_move (rtx[]);
|
55 |
|
|
extern const char * rs6000_output_load_multiple (rtx[]);
|
56 |
|
|
extern int includes_lshift_p (rtx, rtx);
|
57 |
|
|
extern int includes_rshift_p (rtx, rtx);
|
58 |
|
|
extern int includes_rldic_lshift_p (rtx, rtx);
|
59 |
|
|
extern int includes_rldicr_lshift_p (rtx, rtx);
|
60 |
|
|
extern int insvdi_rshift_rlwimi_p (rtx, rtx, rtx);
|
61 |
|
|
extern int registers_ok_for_quad_peep (rtx, rtx);
|
62 |
|
|
extern int mems_ok_for_quad_peep (rtx, rtx);
|
63 |
|
|
extern bool gpr_or_gpr_p (rtx, rtx);
|
64 |
|
|
extern enum reg_class rs6000_secondary_reload_class (enum reg_class,
|
65 |
|
|
enum machine_mode, rtx);
|
66 |
|
|
extern int ccr_bit (rtx, int);
|
67 |
|
|
extern int extract_MB (rtx);
|
68 |
|
|
extern int extract_ME (rtx);
|
69 |
|
|
extern void rs6000_output_function_entry (FILE *, const char *);
|
70 |
|
|
extern void print_operand (FILE *, rtx, int);
|
71 |
|
|
extern void print_operand_address (FILE *, rtx);
|
72 |
|
|
extern enum rtx_code rs6000_reverse_condition (enum machine_mode,
|
73 |
|
|
enum rtx_code);
|
74 |
|
|
extern void rs6000_emit_sCOND (enum rtx_code, rtx);
|
75 |
|
|
extern void rs6000_emit_cbranch (enum rtx_code, rtx);
|
76 |
|
|
extern char * output_cbranch (rtx, const char *, int, rtx);
|
77 |
|
|
extern char * output_e500_flip_gt_bit (rtx, rtx);
|
78 |
|
|
extern rtx rs6000_emit_set_const (rtx, enum machine_mode, rtx, int);
|
79 |
|
|
extern int rs6000_emit_cmove (rtx, rtx, rtx, rtx);
|
80 |
|
|
extern int rs6000_emit_vector_cond_expr (rtx, rtx, rtx, rtx, rtx, rtx);
|
81 |
|
|
extern void rs6000_emit_minmax (rtx, enum rtx_code, rtx, rtx);
|
82 |
|
|
extern void rs6000_emit_sync (enum rtx_code, enum machine_mode,
|
83 |
|
|
rtx, rtx, rtx, rtx, bool);
|
84 |
|
|
extern void rs6000_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx);
|
85 |
|
|
extern void rs6000_split_compare_and_swap (rtx, rtx, rtx, rtx, rtx);
|
86 |
|
|
extern void rs6000_expand_compare_and_swapqhi (rtx, rtx, rtx, rtx);
|
87 |
|
|
extern void rs6000_split_compare_and_swapqhi (rtx, rtx, rtx, rtx, rtx, rtx);
|
88 |
|
|
extern void rs6000_split_lock_test_and_set (rtx, rtx, rtx, rtx);
|
89 |
|
|
extern void rs6000_emit_swdivsf (rtx, rtx, rtx);
|
90 |
|
|
extern void rs6000_emit_swdivdf (rtx, rtx, rtx);
|
91 |
|
|
extern void output_toc (FILE *, rtx, int, enum machine_mode);
|
92 |
|
|
extern void rs6000_initialize_trampoline (rtx, rtx, rtx);
|
93 |
|
|
extern rtx rs6000_longcall_ref (rtx);
|
94 |
|
|
extern void rs6000_fatal_bad_address (rtx);
|
95 |
|
|
extern rtx create_TOC_reference (rtx);
|
96 |
|
|
extern void rs6000_split_multireg_move (rtx, rtx);
|
97 |
|
|
extern void rs6000_emit_move (rtx, rtx, enum machine_mode);
|
98 |
|
|
extern rtx rs6000_legitimize_address (rtx, rtx, enum machine_mode);
|
99 |
|
|
extern rtx rs6000_legitimize_reload_address (rtx, enum machine_mode,
|
100 |
|
|
int, int, int, int *);
|
101 |
|
|
extern int rs6000_legitimate_address (enum machine_mode, rtx, int);
|
102 |
|
|
extern bool rs6000_legitimate_offset_address_p (enum machine_mode, rtx, int);
|
103 |
|
|
extern bool rs6000_mode_dependent_address (rtx);
|
104 |
|
|
extern bool rs6000_offsettable_memref_p (rtx);
|
105 |
|
|
extern rtx rs6000_return_addr (int, rtx);
|
106 |
|
|
extern void rs6000_output_symbol_ref (FILE*, rtx);
|
107 |
|
|
extern HOST_WIDE_INT rs6000_initial_elimination_offset (int, int);
|
108 |
|
|
|
109 |
|
|
extern rtx rs6000_machopic_legitimize_pic_address (rtx, enum machine_mode,
|
110 |
|
|
rtx);
|
111 |
|
|
#endif /* RTX_CODE */
|
112 |
|
|
|
113 |
|
|
#ifdef TREE_CODE
|
114 |
|
|
extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
|
115 |
|
|
unsigned int);
|
116 |
|
|
extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
|
117 |
|
|
tree, int, int);
|
118 |
|
|
extern int function_arg_boundary (enum machine_mode, tree);
|
119 |
|
|
extern rtx function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
|
120 |
|
|
extern tree altivec_resolve_overloaded_builtin (tree, tree);
|
121 |
|
|
extern rtx rs6000_function_value (tree, tree);
|
122 |
|
|
extern rtx rs6000_libcall_value (enum machine_mode);
|
123 |
|
|
extern rtx rs6000_va_arg (tree, tree);
|
124 |
|
|
extern int function_ok_for_sibcall (tree);
|
125 |
|
|
extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
|
126 |
|
|
extern bool rs6000_elf_in_small_data_p (tree);
|
127 |
|
|
#ifdef ARGS_SIZE_RTX
|
128 |
|
|
/* expr.h defines ARGS_SIZE_RTX and `enum direction' */
|
129 |
|
|
extern enum direction function_arg_padding (enum machine_mode, tree);
|
130 |
|
|
#endif /* ARGS_SIZE_RTX */
|
131 |
|
|
|
132 |
|
|
#endif /* TREE_CODE */
|
133 |
|
|
|
134 |
|
|
extern void optimization_options (int, int);
|
135 |
|
|
extern void rs6000_override_options (const char *);
|
136 |
|
|
extern int direct_return (void);
|
137 |
|
|
extern int first_reg_to_save (void);
|
138 |
|
|
extern int first_fp_reg_to_save (void);
|
139 |
|
|
extern void output_ascii (FILE *, const char *, int);
|
140 |
|
|
extern void rs6000_gen_section_name (char **, const char *, const char *);
|
141 |
|
|
extern void output_function_profiler (FILE *, int);
|
142 |
|
|
extern void output_profile_hook (int);
|
143 |
|
|
extern int rs6000_trampoline_size (void);
|
144 |
|
|
extern int get_TOC_alias_set (void);
|
145 |
|
|
extern void rs6000_emit_prologue (void);
|
146 |
|
|
extern void rs6000_emit_load_toc_table (int);
|
147 |
|
|
extern void rs6000_aix_emit_builtin_unwind_init (void);
|
148 |
|
|
extern unsigned int rs6000_dbx_register_number (unsigned int);
|
149 |
|
|
extern void rs6000_emit_epilogue (int);
|
150 |
|
|
extern void rs6000_emit_eh_reg_restore (rtx, rtx);
|
151 |
|
|
extern const char * output_isel (rtx *);
|
152 |
|
|
extern int rs6000_register_move_cost (enum machine_mode,
|
153 |
|
|
enum reg_class, enum reg_class);
|
154 |
|
|
extern int rs6000_memory_move_cost (enum machine_mode, enum reg_class, int);
|
155 |
|
|
extern bool rs6000_tls_referenced_p (rtx);
|
156 |
|
|
extern int rs6000_hard_regno_nregs (int, enum machine_mode);
|
157 |
|
|
extern void rs6000_conditional_register_usage (void);
|
158 |
|
|
|
159 |
|
|
/* Declare functions in rs6000-c.c */
|
160 |
|
|
|
161 |
|
|
extern void rs6000_pragma_longcall (struct cpp_reader *);
|
162 |
|
|
extern void rs6000_cpu_cpp_builtins (struct cpp_reader *);
|
163 |
|
|
|
164 |
|
|
#if TARGET_MACHO
|
165 |
|
|
char *output_call (rtx, rtx *, int, int);
|
166 |
|
|
#endif
|
167 |
|
|
|
168 |
|
|
extern bool rs6000_hard_regno_mode_ok_p[][FIRST_PSEUDO_REGISTER];
|
169 |
|
|
#endif /* rs6000-protos.h */
|