Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / config / picochip / picochip-protos.h
blob268b80595e0d22e3135f65c7f2e3f4de07508d20
1 /* Prototypes for exported functions defined in picochip.c
3 Copyright (C) 2000, 2001, 2008 Free Software Foundation, Inc.
4 Contributed by picoChip Designs Ltd. (http://www.picochip.com)
5 Maintained by Daniel Towner (daniel.towner@picochip.com) and
6 Hariharan Sandanagobalane (hariharan@picochip.com).
8 This file is part of GCC.
10 GCC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3, or (at your option)
13 any later version.
15 GCC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with GCC; see the file COPYING3. If not, see
22 <http://www.gnu.org/licenses/>. */
24 #include "target.h"
25 extern void picochip_function_prologue (FILE *, HOST_WIDE_INT);
26 extern void picochip_function_epilogue (FILE *, HOST_WIDE_INT);
28 extern enum reg_class picochip_reg_class_from_letter (unsigned);
29 extern int picochip_const_ok_for_letter_p (unsigned HOST_WIDE_INT value, unsigned c);
31 #ifdef RTX_CODE /* inside TREE_CODE */
33 extern int picochip_reg_mode_ok_for_base_p (int mode, rtx x, unsigned strict);
34 extern void picochip_print_operand (FILE * file, rtx op, int letter);
35 extern void picochip_print_operand_address (FILE * file, rtx operand);
37 extern const char *picochip_output_cbranch (rtx operands[]);
38 extern const char *picochip_output_branch (rtx operands[], rtx insn);
39 extern const char *picochip_output_compare (rtx operands[]);
40 extern const char *picochip_output_jump (rtx insn);
42 extern const char *picochip_output_put_array (int alternative,
43 rtx operands[]);
44 extern const char *picochip_output_get_array (int alternative,
45 rtx operands[]);
46 extern const char *picochip_output_testport_array (int alternative,
47 rtx operands[]);
49 extern int picochip_expand_movmemhi (rtx *operands);
51 extern rtx gen_SImode_mem(rtx opnd1,rtx opnd2);
52 extern bool ok_to_peephole_stw(rtx opnd0, rtx opnd1, rtx opnd2, rtx opnd3);
53 extern bool ok_to_peephole_ldw(rtx opnd0, rtx opnd1, rtx opnd2, rtx opnd3);
55 extern rtx gen_min_reg(rtx opnd1,rtx opnd2);
57 extern rtx picochip_function_arg (CUMULATIVE_ARGS cum, int mode, tree type,
58 int named);
60 extern rtx picochip_incoming_function_arg (CUMULATIVE_ARGS, int, tree, int);
61 extern CUMULATIVE_ARGS picochip_arg_advance (CUMULATIVE_ARGS cum, int mode,
62 tree type, int named);
64 extern int picochip_regno_nregs (int regno, int mode);
65 extern int picochip_class_max_nregs (int klass, int mode);
67 extern void picochip_order_regs_for_local_alloc (void);
69 extern int picochip_word_aligned_memory_reference (rtx operand);
70 extern int picochip_alignable_memory_operand (rtx operand, enum machine_mode mode);
71 extern int picochip_absolute_memory_operand (rtx op, enum machine_mode mode);
73 extern rtx picochip_function_value (const_tree valtype, const_tree func, bool outgoing);
74 extern int picochip_symbol_offset (rtx operand);
76 extern int picochip_get_function_arg_boundary (enum machine_mode mode);
78 extern reg_class_t picochip_secondary_reload(bool in_p,
79 rtx x,
80 reg_class_t cla,
81 enum machine_mode mode,
82 secondary_reload_info *sri);
84 extern void picochip_get_hi_aligned_mem (rtx ref, rtx * paligned_mem, rtx * pbitnum);
86 extern rtx picochip_get_low_const (rtx value);
87 extern rtx picochip_get_high_const (rtx value);
89 extern void picochip_expand_prologue (void);
90 extern void picochip_expand_epilogue (int is_sibling_call);
92 extern void picochip_final_prescan_insn (rtx insn, rtx * operand, int num_operands);
93 extern const char *picochip_asm_output_opcode (FILE * f, const char *ptr);
94 extern void picochip_override_options (void);
96 extern int picochip_check_conditional_copy (rtx * operands);
98 extern rtx picochip_return_addr_rtx(int count, rtx frameaddr);
99 extern rtx picochip_struct_value_rtx(tree fntype ATTRIBUTE_UNUSED,
100 int incoming ATTRIBUTE_UNUSED);
102 #endif /* RTX_CODE inside TREE_CODE */
104 extern int picochip_legitimize_reload_address (rtx *x, enum machine_mode mode,
105 int opnum, int type, int ind_levels);
108 void picochip_output_ascii (FILE * file, const char *str, int length);
110 extern int picochip_hard_regno_mode_ok (int regno, enum machine_mode mode);
111 extern void picochip_generate_internal_label (char *str, const char *prefix,
112 long num);
114 extern bool picochip_return_in_memory(const_tree type,
115 const_tree fntype ATTRIBUTE_UNUSED);
117 extern int initial_elimination_offset (int from, int to);
119 extern void picochip_output_aligned_common (FILE * stream, const char *name,
120 unsigned size, unsigned align);
122 extern void picochip_output_global (FILE * stream, const char *name);
124 extern void picochip_output_aligned_local (FILE * stream, const char *name,
125 unsigned size, unsigned alignment);
127 extern void picochip_output_label (FILE * stream, const char name[]);
128 extern void picochip_output_labelref (FILE * stream, const char name[]);
129 extern void picochip_weaken_label (FILE * stream, const char name[]);
130 extern void picochip_output_internal_label (FILE * stream, const char *prefix,
131 unsigned long num);
133 extern void warn_of_byte_access (void);
135 /* True if VLIW scheduling is enabled (i.e., second scheduling pass). */
136 extern int picochip_flag_schedule_insns2;
138 extern void picochip_asm_output_anchor (rtx symbol);
140 /* Instruction set capability flags. These are initialised to the
141 appropriate values by picochip_override_options, once the user has
142 selected a CPU type. */
143 extern bool picochip_has_mul_unit;
144 extern bool picochip_has_mac_unit;