1/* Prototypes of target machine for GNU compiler for Xtensa. 2 Copyright (C) 2001-2015 Free Software Foundation, Inc. 3 Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify it under 8the terms of the GNU General Public License as published by the Free 9Software Foundation; either version 3, or (at your option) any later 10version. 11 12GCC is distributed in the hope that it will be useful, but WITHOUT ANY 13WARRANTY; without even the implied warranty of MERCHANTABILITY or 14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15for more details. 16 17You should have received a copy of the GNU General Public License 18along with GCC; see the file COPYING3. If not see 19<http://www.gnu.org/licenses/>. */ 20 21#ifndef __XTENSA_PROTOS_H__ 22#define __XTENSA_PROTOS_H__ 23 24/* Functions to test whether an immediate fits in a given field. */ 25extern bool xtensa_simm8 (HOST_WIDE_INT); 26extern bool xtensa_simm8x256 (HOST_WIDE_INT); 27extern bool xtensa_simm12b (HOST_WIDE_INT); 28extern bool xtensa_b4const_or_zero (HOST_WIDE_INT); 29extern bool xtensa_b4constu (HOST_WIDE_INT); 30extern bool xtensa_mask_immediate (HOST_WIDE_INT); 31extern bool xtensa_mem_offset (unsigned, machine_mode); 32 33/* Functions within xtensa.c that we reference. */ 34#ifdef RTX_CODE 35extern int xt_true_regnum (rtx); 36extern int xtensa_valid_move (machine_mode, rtx *); 37extern int smalloffset_mem_p (rtx); 38extern int constantpool_mem_p (rtx); 39extern void xtensa_extend_reg (rtx, rtx); 40extern void xtensa_expand_conditional_branch (rtx *, machine_mode); 41extern int xtensa_expand_conditional_move (rtx *, int); 42extern int xtensa_expand_scc (rtx *, machine_mode); 43extern int xtensa_expand_block_move (rtx *); 44extern void xtensa_split_operand_pair (rtx *, machine_mode); 45extern int xtensa_emit_move_sequence (rtx *, machine_mode); 46extern rtx xtensa_copy_incoming_a7 (rtx); 47extern void xtensa_expand_nonlocal_goto (rtx *); 48extern void xtensa_expand_compare_and_swap (rtx, rtx, rtx, rtx); 49extern void xtensa_expand_atomic (enum rtx_code, rtx, rtx, rtx, bool); 50extern void xtensa_emit_loop_end (rtx_insn *, rtx *); 51extern char *xtensa_emit_branch (bool, bool, rtx *); 52extern char *xtensa_emit_bit_branch (bool, bool, rtx *); 53extern char *xtensa_emit_movcc (bool, bool, bool, rtx *); 54extern char *xtensa_emit_call (int, rtx *); 55extern bool xtensa_tls_referenced_p (rtx); 56 57#ifdef TREE_CODE 58extern void init_cumulative_args (CUMULATIVE_ARGS *, int); 59#endif /* TREE_CODE */ 60 61extern void print_operand (FILE *, rtx, int); 62extern void print_operand_address (FILE *, rtx); 63extern void xtensa_output_literal (FILE *, rtx, machine_mode, int); 64extern void xtensa_set_return_address (rtx, rtx); 65extern rtx xtensa_return_addr (int, rtx); 66#endif /* RTX_CODE */ 67 68extern void xtensa_setup_frame_addresses (void); 69extern int xtensa_dbx_register_number (int); 70extern long compute_frame_size (int); 71extern void xtensa_expand_prologue (void); 72extern void xtensa_expand_epilogue (void); 73extern void order_regs_for_local_alloc (void); 74extern enum reg_class xtensa_regno_to_class (int regno); 75 76#endif /* !__XTENSA_PROTOS_H__ */ 77