sparc-protos.h revision 285830
1/* Prototypes of target machine for SPARC. 2 Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. 3 Contributed by Michael Tiemann (tiemann@cygnus.com). 4 64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, 5 at Cygnus Support. 6 7This file is part of GCC. 8 9GCC is free software; you can redistribute it and/or modify 10it under the terms of the GNU General Public License as published by 11the Free Software Foundation; either version 2, or (at your option) 12any later version. 13 14GCC is distributed in the hope that it will be useful, 15but WITHOUT ANY WARRANTY; without even the implied warranty of 16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17GNU General Public License for more details. 18 19You should have received a copy of the GNU General Public License 20along with GCC; see the file COPYING. If not, write to 21the Free Software Foundation, 51 Franklin Street, Fifth Floor, 22Boston, MA 02110-1301, USA. */ 23 24#ifndef __SPARC_PROTOS_H__ 25#define __SPARC_PROTOS_H__ 26 27#ifdef TREE_CODE 28extern struct rtx_def *function_value (tree, enum machine_mode, int); 29extern void function_arg_advance (CUMULATIVE_ARGS *, 30 enum machine_mode, tree, int); 31extern struct rtx_def *function_arg (const CUMULATIVE_ARGS *, 32 enum machine_mode, tree, int, int); 33#ifdef RTX_CODE 34extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree); 35extern void sparc_va_start (tree, rtx); 36#endif 37extern unsigned long sparc_type_code (tree); 38#ifdef ARGS_SIZE_RTX 39/* expr.h defines ARGS_SIZE_RTX and `enum direction' */ 40extern enum direction function_arg_padding (enum machine_mode, tree); 41#endif /* ARGS_SIZE_RTX */ 42#endif /* TREE_CODE */ 43 44extern void order_regs_for_local_alloc (void); 45extern HOST_WIDE_INT sparc_compute_frame_size (HOST_WIDE_INT, int); 46extern void sparc_expand_prologue (void); 47extern void sparc_expand_epilogue (void); 48extern bool sparc_can_use_return_insn_p (void); 49extern int check_pic (int); 50extern int short_branch (int, int); 51extern void sparc_profile_hook (int); 52extern void sparc_override_options (void); 53extern void sparc_output_scratch_registers (FILE *); 54 55#ifdef RTX_CODE 56extern enum machine_mode select_cc_mode (enum rtx_code, rtx, rtx); 57/* Define the function that build the compare insn for scc and bcc. */ 58extern rtx gen_compare_reg (enum rtx_code code); 59extern void sparc_emit_float_lib_cmp (rtx, rtx, enum rtx_code); 60extern void sparc_emit_floatunsdi (rtx [2], enum machine_mode); 61extern void sparc_emit_fixunsdi (rtx [2], enum machine_mode); 62extern void emit_tfmode_binop (enum rtx_code, rtx *); 63extern void emit_tfmode_unop (enum rtx_code, rtx *); 64extern void emit_tfmode_cvt (enum rtx_code, rtx *); 65/* This function handles all v9 scc insns */ 66extern int gen_v9_scc (enum rtx_code, rtx *); 67extern void sparc_initialize_trampoline (rtx, rtx, rtx); 68extern void sparc64_initialize_trampoline (rtx, rtx, rtx); 69extern bool legitimate_constant_p (rtx); 70extern bool constant_address_p (rtx); 71extern bool legitimate_pic_operand_p (rtx); 72extern int legitimate_address_p (enum machine_mode, rtx, int); 73extern rtx legitimize_pic_address (rtx, enum machine_mode, rtx); 74extern rtx legitimize_tls_address (rtx); 75extern rtx legitimize_address (rtx, rtx, enum machine_mode); 76extern void sparc_defer_case_vector (rtx, rtx, int); 77extern bool sparc_expand_move (enum machine_mode, rtx *); 78extern void sparc_emit_set_const32 (rtx, rtx); 79extern void sparc_emit_set_const64 (rtx, rtx); 80extern void sparc_emit_set_symbolic_const64 (rtx, rtx, rtx); 81extern int sparc_splitdi_legitimate (rtx, rtx); 82extern int sparc_absnegfloat_split_legitimate (rtx, rtx); 83extern const char *output_ubranch (rtx, int, rtx); 84extern const char *output_cbranch (rtx, rtx, int, int, int, rtx); 85extern const char *output_return (rtx); 86extern const char *output_sibcall (rtx, rtx); 87extern const char *output_v8plus_shift (rtx *, rtx, const char *); 88extern const char *output_v9branch (rtx, rtx, int, int, int, int, rtx); 89extern void emit_v9_brxx_insn (enum rtx_code, rtx, rtx); 90extern void print_operand (FILE *, rtx, int); 91extern int mems_ok_for_ldd_peep (rtx, rtx, rtx); 92extern int arith_double_4096_operand (rtx, enum machine_mode); 93extern int arith_4096_operand (rtx, enum machine_mode); 94extern int zero_operand (rtx, enum machine_mode); 95extern int fp_zero_operand (rtx, enum machine_mode); 96extern int reg_or_0_operand (rtx, enum machine_mode); 97extern int empty_delay_slot (rtx); 98extern int eligible_for_return_delay (rtx); 99extern int eligible_for_sibcall_delay (rtx); 100extern int tls_call_delay (rtx); 101extern int emit_move_sequence (rtx, enum machine_mode); 102extern int fp_sethi_p (rtx); 103extern int fp_mov_p (rtx); 104extern int fp_high_losum_p (rtx); 105extern bool sparc_tls_referenced_p (rtx); 106extern int mem_min_alignment (rtx, int); 107extern int pic_address_needs_scratch (rtx); 108extern int reg_unused_after (rtx, rtx); 109extern int register_ok_for_ldd (rtx); 110extern int registers_ok_for_ldd_peep (rtx, rtx); 111extern int v9_regcmp_p (enum rtx_code); 112/* Function used for V8+ code generation. Returns 1 if the high 113 32 bits of REG are 0 before INSN. */ 114extern int sparc_check_64 (rtx, rtx); 115extern rtx gen_df_reg (rtx, int); 116extern int sparc_extra_constraint_check (rtx, int, int); 117extern void sparc_expand_compare_and_swap_12 (rtx, rtx, rtx, rtx); 118#endif /* RTX_CODE */ 119 120#endif /* __SPARC_PROTOS_H__ */ 121