]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/rs6000/rs6000-protos.h
constants.c (build_constant_data_ref): Make sure we only build one copy of the decl...
[thirdparty/gcc.git] / gcc / config / rs6000 / rs6000-protos.h
CommitLineData
9ebbca7d 1/* Definitions of target machine for GNU compiler, for IBM RS/6000.
847535b6 2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
93c9d1ba 3 Free Software Foundation, Inc.
9ebbca7d
GK
4 Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
5
5de601cf 6 This file is part of GCC.
9ebbca7d 7
5de601cf
NC
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
2f83c7d6 10 by the Free Software Foundation; either version 3, or (at your
5de601cf 11 option) any later version.
9ebbca7d 12
5de601cf
NC
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.
9ebbca7d 17
5de601cf 18 You should have received a copy of the GNU General Public License
2f83c7d6
NC
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
9ebbca7d 21
a5c76ee6
ZW
22#ifndef GCC_RS6000_PROTOS_H
23#define GCC_RS6000_PROTOS_H
24
9ebbca7d
GK
25/* Declare functions in rs6000.c */
26
27#ifdef RTX_CODE
28
29#ifdef TREE_CODE
0f6937fe 30extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, int, int, int);
9ebbca7d
GK
31#endif /* TREE_CODE */
32
66180ff3 33extern bool easy_altivec_constant (rtx, enum machine_mode);
847535b6 34extern HOST_WIDE_INT const_vector_elt_as_int (rtx, unsigned int);
48d72335
DE
35extern bool macho_lo_sum_memory_operand (rtx, enum machine_mode);
36extern int num_insns_constant (rtx, enum machine_mode);
37extern int num_insns_constant_wide (HOST_WIDE_INT);
38extern int small_data_operand (rtx, enum machine_mode);
39extern bool toc_relative_expr_p (rtx);
40extern bool invalid_e500_subreg (rtx, enum machine_mode);
41extern void validate_condition_mode (enum rtx_code, enum machine_mode);
42extern bool legitimate_constant_pool_address_p (rtx);
43extern bool legitimate_indirect_address_p (rtx, int);
6fb5fa3c 44extern bool legitimate_indexed_address_p (rtx, int);
48d72335 45
9390387d
AM
46extern rtx rs6000_got_register (rtx);
47extern rtx find_addr_reg (rtx);
66180ff3 48extern rtx gen_easy_altivec_constant (rtx);
a2369ed3 49extern const char *output_vec_const_move (rtx *);
7a4eca66 50extern void rs6000_expand_vector_init (rtx, rtx);
f5027409 51extern void paired_expand_vector_init (rtx, rtx);
7a4eca66
DE
52extern void rs6000_expand_vector_set (rtx, rtx, int);
53extern void rs6000_expand_vector_extract (rtx, rtx, int);
a2369ed3 54extern void build_mask64_2_operands (rtx, rtx *);
fba73eb1 55extern int expand_block_clear (rtx[]);
a2369ed3 56extern int expand_block_move (rtx[]);
a2369ed3 57extern const char * rs6000_output_load_multiple (rtx[]);
a2369ed3
DJ
58extern int includes_lshift_p (rtx, rtx);
59extern int includes_rshift_p (rtx, rtx);
60extern int includes_rldic_lshift_p (rtx, rtx);
61extern int includes_rldicr_lshift_p (rtx, rtx);
11ac38b2 62extern int insvdi_rshift_rlwimi_p (rtx, rtx, rtx);
a2369ed3 63extern int registers_ok_for_quad_peep (rtx, rtx);
90f81f99 64extern int mems_ok_for_quad_peep (rtx, rtx);
3a1f863f 65extern bool gpr_or_gpr_p (rtx, rtx);
3c4774e0
R
66extern enum reg_class rs6000_secondary_reload_class (enum reg_class,
67 enum machine_mode, rtx);
e2e95f45
RE
68
69extern int paired_emit_vector_cond_expr (rtx, rtx, rtx,
70 rtx, rtx, rtx);
71extern void paired_expand_vector_move (rtx operands[]);
72
73
a2369ed3
DJ
74extern int ccr_bit (rtx, int);
75extern int extract_MB (rtx);
76extern int extract_ME (rtx);
85b776df 77extern void rs6000_output_function_entry (FILE *, const char *);
a2369ed3
DJ
78extern void print_operand (FILE *, rtx, int);
79extern void print_operand_address (FILE *, rtx);
2e4316da 80extern bool rs6000_output_addr_const_extra (FILE *, rtx);
a2369ed3 81extern enum rtx_code rs6000_reverse_condition (enum machine_mode,
3a1f863f 82 enum rtx_code);
a2369ed3
DJ
83extern void rs6000_emit_sCOND (enum rtx_code, rtx);
84extern void rs6000_emit_cbranch (enum rtx_code, rtx);
85extern char * output_cbranch (rtx, const char *, int, rtx);
64022b5d 86extern char * output_e500_flip_gt_bit (rtx, rtx);
a2369ed3
DJ
87extern rtx rs6000_emit_set_const (rtx, enum machine_mode, rtx, int);
88extern int rs6000_emit_cmove (rtx, rtx, rtx, rtx);
21213b4c 89extern int rs6000_emit_vector_cond_expr (rtx, rtx, rtx, rtx, rtx, rtx);
a2369ed3 90extern void rs6000_emit_minmax (rtx, enum rtx_code, rtx, rtx);
915167f5
GK
91extern void rs6000_emit_sync (enum rtx_code, enum machine_mode,
92 rtx, rtx, rtx, rtx, bool);
9f0076e5 93extern void rs6000_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx);
b52110d4 94extern void rs6000_split_compare_and_swap (rtx, rtx, rtx, rtx, rtx);
9fc75b97
DE
95extern void rs6000_expand_compare_and_swapqhi (rtx, rtx, rtx, rtx);
96extern void rs6000_split_compare_and_swapqhi (rtx, rtx, rtx, rtx, rtx, rtx);
b52110d4 97extern void rs6000_split_lock_test_and_set (rtx, rtx, rtx, rtx);
ef765ea9
DE
98extern void rs6000_emit_swdivsf (rtx, rtx, rtx);
99extern void rs6000_emit_swdivdf (rtx, rtx, rtx);
9c78b944 100extern void rs6000_emit_swrsqrtsf (rtx, rtx);
a2369ed3
DJ
101extern void output_toc (FILE *, rtx, int, enum machine_mode);
102extern void rs6000_initialize_trampoline (rtx, rtx, rtx);
9390387d 103extern rtx rs6000_longcall_ref (rtx);
a2369ed3 104extern void rs6000_fatal_bad_address (rtx);
9390387d 105extern rtx create_TOC_reference (rtx);
a9baceb1 106extern void rs6000_split_multireg_move (rtx, rtx);
a2369ed3 107extern void rs6000_emit_move (rtx, rtx, enum machine_mode);
e41b2a33 108extern rtx rs6000_secondary_memory_needed_rtx (enum machine_mode);
a2369ed3
DJ
109extern rtx rs6000_legitimize_address (rtx, rtx, enum machine_mode);
110extern rtx rs6000_legitimize_reload_address (rtx, enum machine_mode,
c4ad648e 111 int, int, int, int *);
a2369ed3 112extern int rs6000_legitimate_address (enum machine_mode, rtx, int);
d04b6e6e 113extern bool rs6000_legitimate_offset_address_p (enum machine_mode, rtx, int);
a2369ed3 114extern bool rs6000_mode_dependent_address (rtx);
944258eb 115extern rtx rs6000_find_base_term (rtx);
d04b6e6e 116extern bool rs6000_offsettable_memref_p (rtx);
a2369ed3
DJ
117extern rtx rs6000_return_addr (int, rtx);
118extern void rs6000_output_symbol_ref (FILE*, rtx);
d1d0c603 119extern HOST_WIDE_INT rs6000_initial_elimination_offset (int, int);
565ef4ba
RS
120extern void rs6000_emit_popcount (rtx, rtx);
121extern void rs6000_emit_parity (rtx, rtx);
a2369ed3 122
fa5b0972
AM
123extern rtx rs6000_machopic_legitimize_pic_address (rtx, enum machine_mode,
124 rtx);
9ebbca7d
GK
125#endif /* RTX_CODE */
126
127#ifdef TREE_CODE
fa5b0972
AM
128extern unsigned int rs6000_special_round_type_align (tree, unsigned int,
129 unsigned int);
58182de3
GK
130extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int,
131 unsigned int);
a2369ed3 132extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
594a51fe 133 tree, int, int);
a2369ed3 134extern int function_arg_boundary (enum machine_mode, tree);
9390387d 135extern rtx function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int);
2fab365e 136extern tree altivec_resolve_overloaded_builtin (tree, tree);
586de218 137extern rtx rs6000_function_value (const_tree, const_tree);
ded9bf77 138extern rtx rs6000_libcall_value (enum machine_mode);
9390387d 139extern rtx rs6000_va_arg (tree, tree);
a2369ed3
DJ
140extern int function_ok_for_sibcall (tree);
141extern void rs6000_elf_declare_function_name (FILE *, const char *, tree);
3101faab 142extern bool rs6000_elf_in_small_data_p (const_tree);
9ebbca7d
GK
143#ifdef ARGS_SIZE_RTX
144/* expr.h defines ARGS_SIZE_RTX and `enum direction' */
586de218 145extern enum direction function_arg_padding (enum machine_mode, const_tree);
9ebbca7d 146#endif /* ARGS_SIZE_RTX */
ee890fe2 147
9ebbca7d
GK
148#endif /* TREE_CODE */
149
a2369ed3
DJ
150extern void optimization_options (int, int);
151extern void rs6000_override_options (const char *);
152extern int direct_return (void);
a2369ed3
DJ
153extern int first_reg_to_save (void);
154extern int first_fp_reg_to_save (void);
a2369ed3
DJ
155extern void output_ascii (FILE *, const char *, int);
156extern void rs6000_gen_section_name (char **, const char *, const char *);
157extern void output_function_profiler (FILE *, int);
158extern void output_profile_hook (int);
159extern int rs6000_trampoline_size (void);
4862826d 160extern alias_set_type get_TOC_alias_set (void);
a2369ed3
DJ
161extern void rs6000_emit_prologue (void);
162extern void rs6000_emit_load_toc_table (int);
163extern void rs6000_aix_emit_builtin_unwind_init (void);
93c9d1ba 164extern unsigned int rs6000_dbx_register_number (unsigned int);
a2369ed3 165extern void rs6000_emit_epilogue (int);
d1d0c603 166extern void rs6000_emit_eh_reg_restore (rtx, rtx);
a2369ed3 167extern const char * output_isel (rtx *);
a2369ed3 168extern int rs6000_register_move_cost (enum machine_mode,
c4ad648e 169 enum reg_class, enum reg_class);
a2369ed3
DJ
170extern int rs6000_memory_move_cost (enum machine_mode, enum reg_class, int);
171extern bool rs6000_tls_referenced_p (rtx);
d8ecbcdb 172extern int rs6000_hard_regno_nregs (int, enum machine_mode);
2aa4498c 173extern void rs6000_conditional_register_usage (void);
ee890fe2 174
4c4eb375
GK
175/* Declare functions in rs6000-c.c */
176
a2369ed3
DJ
177extern void rs6000_pragma_longcall (struct cpp_reader *);
178extern void rs6000_cpu_cpp_builtins (struct cpp_reader *);
a5c76ee6 179
efdba735
SH
180#if TARGET_MACHO
181char *output_call (rtx, rtx *, int, int);
182#endif
183
c921bad8
AP
184void rs6000_final_prescan_insn (rtx, rtx *operand, int num_operands);
185
0d1fbc8c 186extern bool rs6000_hard_regno_mode_ok_p[][FIRST_PSEUDO_REGISTER];
a5c76ee6 187#endif /* rs6000-protos.h */