/* Generated automatically by the program 'build/genpreds'
   from the machine description file '/home/chipon/kungfu32/src/gcc_fs/gcc/config/kf32/kf32.md'.  */

#ifndef GCC_TM_PREDS_H
#define GCC_TM_PREDS_H

#ifdef HAVE_MACHINE_MODES
extern int general_operand (rtx, enum machine_mode);
extern int address_operand (rtx, enum machine_mode);
extern int register_operand (rtx, enum machine_mode);
extern int pmode_register_operand (rtx, enum machine_mode);
extern int scratch_operand (rtx, enum machine_mode);
extern int immediate_operand (rtx, enum machine_mode);
extern int const_int_operand (rtx, enum machine_mode);
extern int const_double_operand (rtx, enum machine_mode);
extern int nonimmediate_operand (rtx, enum machine_mode);
extern int nonmemory_operand (rtx, enum machine_mode);
extern int push_operand (rtx, enum machine_mode);
extern int pop_operand (rtx, enum machine_mode);
extern int memory_operand (rtx, enum machine_mode);
extern int indirect_operand (rtx, enum machine_mode);
extern int ordered_comparison_operator (rtx, enum machine_mode);
extern int comparison_operator (rtx, enum machine_mode);
extern int kungfu32_arith_reg_operand (rtx, enum machine_mode);
extern int kungfu32_general_movsrc_operand (rtx, enum machine_mode);
extern int kungfu32_general_movdst_operand (rtx, enum machine_mode);
extern int kungfu32_reload_operand (rtx, enum machine_mode);
extern int kungfu32_arith_J_operand (rtx, enum machine_mode);
extern int kungfu32_arith_K_operand (rtx, enum machine_mode);
extern int kungfu32_arith_K_operand_not_0 (rtx, enum machine_mode);
extern int kungfu32_arith_M_operand (rtx, enum machine_mode);
extern int kungfu32_arith_O_operand (rtx, enum machine_mode);
extern int kungfu32_arith_imm_operand (rtx, enum machine_mode);
extern int kungfu32_arith_any_imm_operand (rtx, enum machine_mode);
extern int kungfu32_literal_K_operand (rtx, enum machine_mode);
extern int kungfu32_addsub_operand (rtx, enum machine_mode);
extern int kungfu32_compare_operand (rtx, enum machine_mode);
extern int kungfu32_load_multiple_operation (rtx, enum machine_mode);
extern int kungfu32_store_multiple_operation (rtx, enum machine_mode);
extern int kungfu32_call_address_operand (rtx, enum machine_mode);
extern int symbolic_operand (rtx, enum machine_mode);
extern int const_int_or_symbolic_operand (rtx, enum machine_mode);
extern int push_mult_memory_operand (rtx, enum machine_mode);
extern int multi_register_push (rtx, enum machine_mode);
extern int multi_register_pop (rtx, enum machine_mode);
extern int kf32_arith_reg_operand (rtx, enum machine_mode);
extern int kf32_symbolic_imm_operand (rtx, enum machine_mode);
extern int kf32_general_movsrc_operand (rtx, enum machine_mode);
extern int kf32_arith_J_operand (rtx, enum machine_mode);
extern int kf32_arith_K_operand (rtx, enum machine_mode);
extern int kf32_arith_L_operand (rtx, enum machine_mode);
extern int kf32_arith_L_operand_not_0 (rtx, enum machine_mode);
extern int kf32_arith_M_operand_not_0 (rtx, enum machine_mode);
extern int kf32_arith_imm_operand (rtx, enum machine_mode);
extern int kf32_arith_imm_operand_not_0 (rtx, enum machine_mode);
extern int kf32_arith_two_zero_operand (rtx, enum machine_mode);
extern int kf32_arith_two_one_operand (rtx, enum machine_mode);
extern int kf32_call_address_operand (rtx, enum machine_mode);
extern int kf32_arith_any_imm_operand (rtx, enum machine_mode);
extern int h_register_operand (rtx, enum machine_mode);
extern int special_memory_operand (rtx, enum machine_mode);
#endif /* HAVE_MACHINE_MODES */

#define CONSTRAINT_NUM_DEFINED_P 1
enum constraint_num
{
  CONSTRAINT__UNKNOWN = 0,
  CONSTRAINT_Ra,
  CONSTRAINT_Rb,
  CONSTRAINT_Rl,
  CONSTRAINT_Rh,
  CONSTRAINT_Rp,
  CONSTRAINT_Rc,
  CONSTRAINT_Rr,
  CONSTRAINT_Rs,
  CONSTRAINT_Ri,
  CONSTRAINT_Rm,
  CONSTRAINT_RR,
  CONSTRAINT_l,
  CONSTRAINT_h,
  CONSTRAINT_Ai,
  CONSTRAINT_Au,
  CONSTRAINT_Di,
  CONSTRAINT_Iu,
  CONSTRAINT_Ju,
  CONSTRAINT_Is,
  CONSTRAINT_Js,
  CONSTRAINT_K,
  CONSTRAINT_L,
  CONSTRAINT_P,
  CONSTRAINT_M,
  CONSTRAINT_QS,
  CONSTRAINT_Qi,
  CONSTRAINT_Ql,
  CONSTRAINT__LIMIT
};

extern enum constraint_num lookup_constraint (const char *);
extern bool constraint_satisfied_p (rtx, enum constraint_num);

static inline size_t
insn_constraint_len (char fc, const char *str ATTRIBUTE_UNUSED)
{
  switch (fc)
    {
    case 'A': return 2;
    case 'D': return 2;
    case 'I': return 2;
    case 'J': return 2;
    case 'Q': return 2;
    case 'R': return 2;
    default: break;
    }
  return 1;
}

#define CONSTRAINT_LEN(c_,s_) insn_constraint_len (c_,s_)

extern enum reg_class regclass_for_constraint (enum constraint_num);
#define REG_CLASS_FROM_CONSTRAINT(c_,s_) \
    regclass_for_constraint (lookup_constraint (s_))
#define REG_CLASS_FOR_CONSTRAINT(x_) \
    regclass_for_constraint (x_)

extern bool insn_const_int_ok_for_constraint (HOST_WIDE_INT, enum constraint_num);
#define CONST_OK_FOR_CONSTRAINT_P(v_,c_,s_) \
    insn_const_int_ok_for_constraint (v_, lookup_constraint (s_))

#define CONST_DOUBLE_OK_FOR_CONSTRAINT_P(v_,c_,s_) 0

#define EXTRA_CONSTRAINT_STR(v_,c_,s_) \
    constraint_satisfied_p (v_, lookup_constraint (s_))

#define EXTRA_MEMORY_CONSTRAINT(c_,s_) false

#define EXTRA_ADDRESS_CONSTRAINT(c_,s_) false

#endif /* tm-preds.h */
