1 /* Definitions of target machine for GNU compiler, for IBM RS/6000.
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005
3 Free Software Foundation, Inc.
4 Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
6 This file is part of GCC.
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 2, or (at your
11 option) any later version.
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.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to the
20 Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
21 MA 02110-1301, USA. */
23 #ifndef GCC_RS6000_PROTOS_H
24 #define GCC_RS6000_PROTOS_H
26 /* Declare functions in rs6000.c */
31 extern void init_cumulative_args (CUMULATIVE_ARGS
*, tree
, rtx
, int, int, int);
32 extern void rs6000_va_start (tree
, rtx
);
33 #endif /* TREE_CODE */
35 extern bool easy_altivec_constant (rtx
, enum machine_mode
);
36 extern bool macho_lo_sum_memory_operand (rtx
, enum machine_mode
);
37 extern int num_insns_constant (rtx
, enum machine_mode
);
38 extern int num_insns_constant_wide (HOST_WIDE_INT
);
39 extern int small_data_operand (rtx
, enum machine_mode
);
40 extern bool toc_relative_expr_p (rtx
);
41 extern bool invalid_e500_subreg (rtx
, enum machine_mode
);
42 extern void validate_condition_mode (enum rtx_code
, enum machine_mode
);
43 extern bool legitimate_constant_pool_address_p (rtx
);
44 extern bool legitimate_indirect_address_p (rtx
, int);
45 extern bool rs6000_legitimate_offset_address_p (enum machine_mode
, rtx
, int);
46 extern bool rs6000_legitimate_small_data_p (enum machine_mode
, rtx
);
48 extern rtx
rs6000_got_register (rtx
);
49 extern rtx
find_addr_reg (rtx
);
50 extern rtx
gen_easy_altivec_constant (rtx
);
51 extern const char *output_vec_const_move (rtx
*);
52 extern void rs6000_expand_vector_init (rtx
, rtx
);
53 extern void rs6000_expand_vector_set (rtx
, rtx
, int);
54 extern void rs6000_expand_vector_extract (rtx
, rtx
, int);
55 extern void build_mask64_2_operands (rtx
, rtx
*);
56 extern int expand_block_clear (rtx
[]);
57 extern int expand_block_move (rtx
[]);
58 extern const char * rs6000_output_load_multiple (rtx
[]);
59 extern int includes_lshift_p (rtx
, rtx
);
60 extern int includes_rshift_p (rtx
, rtx
);
61 extern int includes_rldic_lshift_p (rtx
, rtx
);
62 extern int includes_rldicr_lshift_p (rtx
, rtx
);
63 extern int insvdi_rshift_rlwimi_p (rtx
, rtx
, rtx
);
64 extern int registers_ok_for_quad_peep (rtx
, rtx
);
65 extern int mems_ok_for_quad_peep (rtx
, rtx
);
66 extern bool gpr_or_gpr_p (rtx
, rtx
);
67 extern enum reg_class
secondary_reload_class (enum reg_class
,
68 enum machine_mode
, rtx
);
69 extern int ccr_bit (rtx
, int);
70 extern int extract_MB (rtx
);
71 extern int extract_ME (rtx
);
72 extern void rs6000_output_function_entry (FILE *, const char *);
73 extern void print_operand (FILE *, rtx
, int);
74 extern void print_operand_address (FILE *, rtx
);
75 extern enum rtx_code
rs6000_reverse_condition (enum machine_mode
,
77 extern void rs6000_emit_sCOND (enum rtx_code
, rtx
);
78 extern void rs6000_emit_cbranch (enum rtx_code
, rtx
);
79 extern char * output_cbranch (rtx
, const char *, int, rtx
);
80 extern char * output_e500_flip_gt_bit (rtx
, rtx
);
81 extern rtx
rs6000_emit_set_const (rtx
, enum machine_mode
, rtx
, int);
82 extern int rs6000_emit_cmove (rtx
, rtx
, rtx
, rtx
);
83 extern int rs6000_emit_vector_cond_expr (rtx
, rtx
, rtx
, rtx
, rtx
, rtx
);
84 extern void rs6000_emit_minmax (rtx
, enum rtx_code
, rtx
, rtx
);
85 extern void rs6000_emit_sync (enum rtx_code
, enum machine_mode
,
86 rtx
, rtx
, rtx
, rtx
, bool);
87 extern void rs6000_split_atomic_op (enum rtx_code
, rtx
, rtx
, rtx
, rtx
, rtx
);
88 extern void rs6000_split_compare_and_swap (rtx
, rtx
, rtx
, rtx
, rtx
);
89 extern void rs6000_split_lock_test_and_set (rtx
, rtx
, rtx
, rtx
);
90 extern void rs6000_emit_swdivsf (rtx
, rtx
, rtx
);
91 extern void rs6000_emit_swdivdf (rtx
, rtx
, rtx
);
92 extern void output_toc (FILE *, rtx
, int, enum machine_mode
);
93 extern void rs6000_initialize_trampoline (rtx
, rtx
, rtx
);
94 extern rtx
rs6000_longcall_ref (rtx
);
95 extern void rs6000_fatal_bad_address (rtx
);
96 extern rtx
create_TOC_reference (rtx
);
97 extern void rs6000_split_multireg_move (rtx
, rtx
);
98 extern void rs6000_emit_move (rtx
, rtx
, enum machine_mode
);
99 extern rtx
rs6000_legitimize_address (rtx
, rtx
, enum machine_mode
);
100 extern rtx
rs6000_legitimize_reload_address (rtx
, enum machine_mode
,
101 int, int, int, int *);
102 extern int rs6000_legitimate_address (enum machine_mode
, rtx
, int);
103 extern bool rs6000_mode_dependent_address (rtx
);
104 extern rtx
rs6000_return_addr (int, rtx
);
105 extern void rs6000_output_symbol_ref (FILE*, rtx
);
106 extern HOST_WIDE_INT
rs6000_initial_elimination_offset (int, int);
108 extern rtx
rs6000_machopic_legitimize_pic_address (rtx orig
,
109 enum machine_mode mode
,
112 #endif /* RTX_CODE */
115 extern unsigned int rs6000_special_round_type_align (tree
, int, int);
116 extern void function_arg_advance (CUMULATIVE_ARGS
*, enum machine_mode
,
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
);
127 /* expr.h defines ARGS_SIZE_RTX and `enum direction' */
128 extern enum direction
function_arg_padding (enum machine_mode
, tree
);
129 #endif /* ARGS_SIZE_RTX */
131 #endif /* TREE_CODE */
133 extern void optimization_options (int, int);
134 extern void rs6000_override_options (const char *);
135 extern int direct_return (void);
136 extern int first_reg_to_save (void);
137 extern int first_fp_reg_to_save (void);
138 extern void output_ascii (FILE *, const char *, int);
139 extern void rs6000_gen_section_name (char **, const char *, const char *);
140 extern void output_function_profiler (FILE *, int);
141 extern void output_profile_hook (int);
142 extern int rs6000_trampoline_size (void);
143 extern void toc_section (void);
144 extern void sdata_section (void);
145 extern void sdata2_section (void);
146 extern void sbss_section (void);
147 extern void private_data_section (void);
148 extern void read_only_data_section (void);
149 extern void read_only_private_data_section (void);
150 extern int get_TOC_alias_set (void);
151 extern void rs6000_emit_prologue (void);
152 extern void rs6000_emit_load_toc_table (int);
153 extern void rs6000_aix_emit_builtin_unwind_init (void);
154 extern unsigned int rs6000_dbx_register_number (unsigned int);
155 extern void rs6000_emit_epilogue (int);
156 extern void rs6000_emit_eh_reg_restore (rtx
, rtx
);
157 extern const char * output_isel (rtx
*);
158 extern int rs6000_register_move_cost (enum machine_mode
,
159 enum reg_class
, enum reg_class
);
160 extern int rs6000_memory_move_cost (enum machine_mode
, enum reg_class
, int);
161 extern bool rs6000_tls_referenced_p (rtx
);
162 extern int rs6000_hard_regno_nregs (int, enum machine_mode
);
163 extern void rs6000_conditional_register_usage (void);
165 /* Declare functions in rs6000-c.c */
167 extern void rs6000_pragma_longcall (struct cpp_reader
*);
168 extern void rs6000_cpu_cpp_builtins (struct cpp_reader
*);
171 char *output_call (rtx
, rtx
*, int, int);
174 extern bool rs6000_hard_regno_mode_ok_p
[][FIRST_PSEUDO_REGISTER
];
175 #endif /* rs6000-protos.h */