
#ifndef INSPECTION_H_
#define INSPECTION_H_

namespace CapstoneEDB {

class Formatter;
class Instruction;
class Operand;

bool modifies_pc(const Instruction &insn);
bool is_call(const Instruction &insn);
bool is_conditional_jump(const Instruction &insn);
bool is_halt(const Instruction &insn);
bool is_jump(const Instruction &insn);
bool is_repeat(const Instruction &insn);
bool is_ret(const Instruction &insn);

// Check that instruction is x86-64 syscall
bool is_syscall(const Instruction &insn);

// Check that instruction is P5 sysenter
bool is_sysenter(const Instruction &insn);

// Check that instruction is any type of return
bool is_return(const Instruction &insn);

// Check for any type of interrupt, including int3 etc.
bool is_interrupt(const Instruction &insn);

// Check that instruction is retn (x86 0xC3)
bool is_ret(const Instruction &insn);

// Check that instruction is int N (x86 0xCD N)
bool is_int(const Instruction &insn);

// Check that instruction is any type of jump
bool is_jump(const Instruction &insn); 

bool is_nop(const Instruction &insn);
bool is_conditional_set(const Instruction &insn);
bool is_unconditional_jump(const Instruction &insn);
bool is_conditional_jump(const Instruction &insn);


bool is_terminator(const Instruction &insn);
bool is_unconditional_jump(const Instruction &insn);

bool is_conditional_fpu_move(const Instruction &insn);
bool is_conditional_gpr_move(const Instruction &insn);
bool is_fpu(const Instruction &insn);
bool is_conditional_move(const Instruction &insn);

// Check that instruction is an FPU instruction, taking only floating-point operands
bool is_fpu_taking_float(const Instruction &insn);

// Check that instruction is an FPU instruction, one of operands of which is an integer
bool is_fpu_taking_integer(const Instruction &insn);

// Check that instruction is an FPU instruction, one of operands of which is a packed BCD
bool is_fpu_taking_bcd(const Instruction &insn);

// Check that instruction comes from any SIMD ISA extension
bool is_simd(const Instruction &insn);


bool is_expression(const Operand &operand);
bool is_immediate(const Operand &operand);
bool is_register(const Operand &operand);
bool is_SIMD_PD(const Operand &operand);
bool is_SIMD_PS(const Operand &operand);
bool is_SIMD_SD(const Operand &operand);
bool is_SIMD_SS(const Operand &operand);
bool is_SIMD_SI(const Operand &operand);
bool is_SIMD_USI(const Operand &operand);

}

#endif
