X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Fconfig%2Fh8300%2Fh8300-protos.h;fp=gcc%2Fconfig%2Fh8300%2Fh8300-protos.h;h=2e7b72fe6c476048d375e578165f233e9010d9cc;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=5d84a979ee064a5d1e8f9ae4d4e6ffa6e39bbd8b;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/config/h8300/h8300-protos.h b/gcc/config/h8300/h8300-protos.h index 5d84a979..2e7b72fe 100644 --- a/gcc/config/h8300/h8300-protos.h +++ b/gcc/config/h8300/h8300-protos.h @@ -1,82 +1,122 @@ -/* Definitions of target machine for GNU compiler. - Hitachi H8/300 version generating coff - Copyright (C) 2000 Free SoftwareFoundation, Inc. +/* Definitions of target machine for GNU compiler. + Renesas H8/300 version + Copyright (C) 2000, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. Contributed by Steve Chamberlain (sac@cygnus.com), Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com). -This file is part of GNU CC. +This file is part of GCC. -GNU CC is free software; you can redistribute it and/or modify +GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) +the Free Software Foundation; either version 3, or (at your option) any later version. -GNU CC is distributed in the hope that it will be useful, +GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +along with GCC; see the file COPYING3. If not see +. */ #ifndef GCC_H8300_PROTOS_H #define GCC_H8300_PROTOS_H /* Declarations for functions used in insn-output.c. */ #ifdef RTX_CODE -extern const char *output_a_shift PARAMS ((rtx *)); -extern const char *emit_a_rotate PARAMS ((enum rtx_code, rtx *)); -extern const char *output_simode_bld PARAMS ((int, rtx[])); -extern void print_operand_address PARAMS ((FILE *, rtx)); -extern int const_costs PARAMS ((rtx, enum rtx_code, enum rtx_code)); -extern void print_operand PARAMS ((FILE *, rtx, int)); -extern void final_prescan_insn PARAMS ((rtx, rtx *, int)); -extern int do_movsi PARAMS ((rtx[])); -extern void notice_update_cc PARAMS ((rtx, rtx)); -extern const char *output_logical_op PARAMS ((enum machine_mode, int, rtx *)); -extern int expand_a_shift PARAMS ((enum machine_mode, int, rtx[])); -extern int expand_a_rotate PARAMS ((enum rtx_code, rtx[])); -extern int fix_bit_operand PARAMS ((rtx *, int, enum rtx_code)); -extern int h8300_adjust_insn_length PARAMS ((rtx, int)); -extern void split_adds_subs PARAMS ((enum machine_mode, rtx[])); - -extern int general_operand_src PARAMS ((rtx, enum machine_mode)); -extern int general_operand_dst PARAMS ((rtx, enum machine_mode)); -extern int o_operand PARAMS ((rtx, enum machine_mode)); -extern int call_insn_operand PARAMS ((rtx, enum machine_mode)); -extern int two_insn_adds_subs_operand PARAMS ((rtx, enum machine_mode)); -extern int small_call_insn_operand PARAMS ((rtx, enum machine_mode)); -extern int jump_address_operand PARAMS ((rtx, enum machine_mode)); -extern int bit_operand PARAMS ((rtx, enum machine_mode)); -extern int bit_memory_operand PARAMS ((rtx, enum machine_mode)); -extern int bit_operator PARAMS ((rtx, enum machine_mode)); -extern int nshift_operator PARAMS ((rtx, enum machine_mode)); +extern unsigned int compute_mov_length (rtx *); +extern const char *output_plussi (rtx *); +extern unsigned int compute_plussi_length (rtx *); +extern int compute_plussi_cc (rtx *); +extern const char *output_a_shift (rtx *); +extern unsigned int compute_a_shift_length (rtx, rtx *); +extern int compute_a_shift_cc (rtx, rtx *); +extern const char *output_a_rotate (enum rtx_code, rtx *); +extern unsigned int compute_a_rotate_length (rtx *); +extern const char *output_simode_bld (int, rtx[]); +extern void print_operand_address (FILE *, rtx); +extern void print_operand (FILE *, rtx, int); +extern void final_prescan_insn (rtx, rtx *, int); +extern int h8300_expand_movsi (rtx[]); +extern void notice_update_cc (rtx, rtx); +extern const char *output_logical_op (enum machine_mode, rtx *); +extern unsigned int compute_logical_op_length (enum machine_mode, + rtx *); +extern int compute_logical_op_cc (enum machine_mode, rtx *); +extern void h8300_expand_branch (enum rtx_code, rtx); +extern bool expand_a_shift (enum machine_mode, int, rtx[]); +extern int h8300_shift_needs_scratch_p (int, enum machine_mode); +extern int expand_a_rotate (rtx[]); +extern int fix_bit_operand (rtx *, enum rtx_code); +extern int h8300_adjust_insn_length (rtx, int); +extern void split_adds_subs (enum machine_mode, rtx[]); + +extern int h8300_eightbit_constant_address_p (rtx); +extern int h8300_tiny_constant_address_p (rtx); +extern int byte_accesses_mergeable_p (rtx, rtx); +extern int same_cmp_preceding_p (rtx); +extern int same_cmp_following_p (rtx); + +extern int h8300_legitimate_constant_p (rtx); +extern int h8300_legitimate_address_p (enum machine_mode, rtx, int); /* Used in builtins.c */ -extern rtx h8300_return_addr_rtx PARAMS ((int, rtx)); +extern rtx h8300_return_addr_rtx (int, rtx); + +/* Classifies an h8sx shift operation. + + H8SX_SHIFT_NONE + The shift cannot be done in a single instruction. + + H8SX_SHIFT_UNARY + The shift is effectively a unary operation. The instruction will + allow any sort of destination operand and have a format similar + to neg and not. This is true of certain power-of-2 shifts. + + H8SX_SHIFT_BINARY + The shift is a binary operation. The destination must be a + register and the source can be a register or a constant. */ +enum h8sx_shift_type { + H8SX_SHIFT_NONE, + H8SX_SHIFT_UNARY, + H8SX_SHIFT_BINARY +}; + +extern enum h8sx_shift_type h8sx_classify_shift (enum machine_mode, enum rtx_code, rtx); +extern int h8300_ldm_stm_parallel (rtvec, int, int); #endif /* RTX_CODE */ #ifdef TREE_CODE -extern struct rtx_def *function_arg PARAMS ((CUMULATIVE_ARGS *, - enum machine_mode, tree, int)); -extern int h8300_funcvec_function_p PARAMS ((tree)); -extern int h8300_eightbit_data_p PARAMS ((tree)); -extern int h8300_tiny_data_p PARAMS ((tree)); -extern void h8300_encode_label PARAMS ((tree)); +extern struct rtx_def *function_arg (CUMULATIVE_ARGS *, + enum machine_mode, tree, int); +extern int h8300_funcvec_function_p (tree); +extern int h8300_eightbit_data_p (tree); +extern int h8300_tiny_data_p (tree); #endif /* TREE_CODE */ -extern void h8300_init_once PARAMS ((void)); -extern void asm_file_start PARAMS ((FILE *)); -extern void asm_file_end PARAMS ((FILE *)); -extern int ok_for_bclr PARAMS ((HOST_WIDE_INT)); -extern int small_power_of_two PARAMS ((HOST_WIDE_INT)); -extern int initial_offset PARAMS ((int, int)); - -#ifdef GCC_C_PRAGMA_H -extern void h8300_pr_interrupt PARAMS ((cpp_reader *)); -extern void h8300_pr_saveall PARAMS ((cpp_reader *)); -#endif +extern void h8300_init_once (void); +extern int h8300_can_use_return_insn_p (void); +extern void h8300_expand_prologue (void); +extern void h8300_expand_epilogue (void); +extern int h8300_current_function_interrupt_function_p (void); +extern int h8300_initial_elimination_offset (int, int); +extern int h8300_regs_ok_for_stm (int, rtx[]); +extern int h8300_hard_regno_rename_ok (unsigned int, unsigned int); +extern int h8300_hard_regno_nregs (int, enum machine_mode); +extern int h8300_hard_regno_mode_ok (int, enum machine_mode); + +struct cpp_reader; +extern void h8300_pr_interrupt (struct cpp_reader *); +extern void h8300_pr_saveall (struct cpp_reader *); +extern enum reg_class h8300_reg_class_from_letter (int); +extern rtx h8300_get_index (rtx, enum machine_mode mode, int *); +extern unsigned int h8300_insn_length_from_table (rtx, rtx *); +extern const char * output_h8sx_shift (rtx *, int, int); +extern bool h8300_operands_match_p (rtx *); +extern bool h8sx_mergeable_memrefs_p (rtx, rtx); +extern bool h8sx_emit_movmd (rtx, rtx, rtx, HOST_WIDE_INT); +extern void h8300_swap_into_er6 (rtx); +extern void h8300_swap_out_of_er6 (rtx); #endif /* ! GCC_H8300_PROTOS_H */