Rizin
unix-like reverse engineering framework and cli tools
M68KDisassembler.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "../../cs_priv.h"
#include "../../utils.h"
#include "../../MCInst.h"
#include "../../MCInstrDesc.h"
#include "../../MCRegisterInfo.h"
#include "M68KInstPrinter.h"
#include "M68KDisassembler.h"
#include "M68KInstructionTable.inc"

Go to the source code of this file.

Classes

struct  instruction_struct
 

Macros

#define BIT_0(A)   ((A) & 0x00000001)
 
#define BIT_1(A)   ((A) & 0x00000002)
 
#define BIT_2(A)   ((A) & 0x00000004)
 
#define BIT_3(A)   ((A) & 0x00000008)
 
#define BIT_4(A)   ((A) & 0x00000010)
 
#define BIT_5(A)   ((A) & 0x00000020)
 
#define BIT_6(A)   ((A) & 0x00000040)
 
#define BIT_7(A)   ((A) & 0x00000080)
 
#define BIT_8(A)   ((A) & 0x00000100)
 
#define BIT_9(A)   ((A) & 0x00000200)
 
#define BIT_A(A)   ((A) & 0x00000400)
 
#define BIT_B(A)   ((A) & 0x00000800)
 
#define BIT_C(A)   ((A) & 0x00001000)
 
#define BIT_D(A)   ((A) & 0x00002000)
 
#define BIT_E(A)   ((A) & 0x00004000)
 
#define BIT_F(A)   ((A) & 0x00008000)
 
#define BIT_10(A)   ((A) & 0x00010000)
 
#define BIT_11(A)   ((A) & 0x00020000)
 
#define BIT_12(A)   ((A) & 0x00040000)
 
#define BIT_13(A)   ((A) & 0x00080000)
 
#define BIT_14(A)   ((A) & 0x00100000)
 
#define BIT_15(A)   ((A) & 0x00200000)
 
#define BIT_16(A)   ((A) & 0x00400000)
 
#define BIT_17(A)   ((A) & 0x00800000)
 
#define BIT_18(A)   ((A) & 0x01000000)
 
#define BIT_19(A)   ((A) & 0x02000000)
 
#define BIT_1A(A)   ((A) & 0x04000000)
 
#define BIT_1B(A)   ((A) & 0x08000000)
 
#define BIT_1C(A)   ((A) & 0x10000000)
 
#define BIT_1D(A)   ((A) & 0x20000000)
 
#define BIT_1E(A)   ((A) & 0x40000000)
 
#define BIT_1F(A)   ((A) & 0x80000000)
 
#define TYPE_68000   1
 
#define TYPE_68010   2
 
#define TYPE_68020   4
 
#define TYPE_68030   8
 
#define TYPE_68040   16
 
#define M68000_ONLY   TYPE_68000
 
#define M68010_ONLY   TYPE_68010
 
#define M68010_LESS   (TYPE_68000 | TYPE_68010)
 
#define M68010_PLUS   (TYPE_68010 | TYPE_68020 | TYPE_68030 | TYPE_68040)
 
#define M68020_ONLY   TYPE_68020
 
#define M68020_LESS   (TYPE_68010 | TYPE_68020)
 
#define M68020_PLUS   (TYPE_68020 | TYPE_68030 | TYPE_68040)
 
#define M68030_ONLY   TYPE_68030
 
#define M68030_LESS   (TYPE_68010 | TYPE_68020 | TYPE_68030)
 
#define M68030_PLUS   (TYPE_68030 | TYPE_68040)
 
#define M68040_PLUS   TYPE_68040
 
#define EXT_8BIT_DISPLACEMENT(A)   ((A)&0xff)
 
#define EXT_FULL(A)   BIT_8(A)
 
#define EXT_EFFECTIVE_ZERO(A)   (((A)&0xe4) == 0xc4 || ((A)&0xe2) == 0xc0)
 
#define EXT_BASE_REGISTER_PRESENT(A)   (!BIT_7(A))
 
#define EXT_INDEX_REGISTER_PRESENT(A)   (!BIT_6(A))
 
#define EXT_INDEX_REGISTER(A)   (((A)>>12)&7)
 
#define EXT_INDEX_PRE_POST(A)   (EXT_INDEX_PRESENT(A) && (A)&3)
 
#define EXT_INDEX_PRE(A)   (EXT_INDEX_PRESENT(A) && ((A)&7) < 4 && ((A)&7) != 0)
 
#define EXT_INDEX_POST(A)   (EXT_INDEX_PRESENT(A) && ((A)&7) > 4)
 
#define EXT_INDEX_SCALE(A)   (((A)>>9)&3)
 
#define EXT_INDEX_LONG(A)   BIT_B(A)
 
#define EXT_INDEX_AR(A)   BIT_F(A)
 
#define EXT_BASE_DISPLACEMENT_PRESENT(A)   (((A)&0x30) > 0x10)
 
#define EXT_BASE_DISPLACEMENT_WORD(A)   (((A)&0x30) == 0x20)
 
#define EXT_BASE_DISPLACEMENT_LONG(A)   (((A)&0x30) == 0x30)
 
#define EXT_OUTER_DISPLACEMENT_PRESENT(A)   (((A)&3) > 1 && ((A)&0x47) < 0x44)
 
#define EXT_OUTER_DISPLACEMENT_WORD(A)   (((A)&3) == 2 && ((A)&0x47) < 0x44)
 
#define EXT_OUTER_DISPLACEMENT_LONG(A)   (((A)&3) == 3 && ((A)&0x47) < 0x44)
 
#define IS_BITSET(val, b)   ((val) & (1 << (b)))
 
#define BITFIELD_MASK(sb, eb)   (((1 << ((sb) + 1))-1) & (~((1 << (eb))-1)))
 
#define BITFIELD(val, sb, eb)   ((BITFIELD_MASK(sb,eb) & (val)) >> (eb))
 
#define LIMIT_CPU_TYPES(info, ALLOWED_CPU_TYPES)
 
#define get_ea_mode_str_8(instruction)   get_ea_mode_str(instruction, 0)
 
#define get_ea_mode_str_16(instruction)   get_ea_mode_str(instruction, 1)
 
#define get_ea_mode_str_32(instruction)   get_ea_mode_str(instruction, 2)
 
#define get_imm_str_s8()   get_imm_str_s(0)
 
#define get_imm_str_s16()   get_imm_str_s(1)
 
#define get_imm_str_s32()   get_imm_str_s(2)
 
#define get_imm_str_u8()   get_imm_str_u(0)
 
#define get_imm_str_u16()   get_imm_str_u(1)
 
#define get_imm_str_u32()   get_imm_str_u(2)
 

Enumerations

enum  {
  M68K_CPU_TYPE_INVALID , M68K_CPU_TYPE_68000 , M68K_CPU_TYPE_68010 , M68K_CPU_TYPE_68EC020 ,
  M68K_CPU_TYPE_68020 , M68K_CPU_TYPE_68030 , M68K_CPU_TYPE_68040
}
 

Functions

static unsigned int m68k_read_disassembler_16 (const m68k_info *info, const uint64_t addr)
 
static unsigned int m68k_read_disassembler_32 (const m68k_info *info, const uint64_t addr)
 
static uint64_t m68k_read_disassembler_64 (const m68k_info *info, const uint64_t addr)
 
static unsigned int m68k_read_safe_16 (const m68k_info *info, const uint64_t address)
 
static unsigned int m68k_read_safe_32 (const m68k_info *info, const uint64_t address)
 
static uint64_t m68k_read_safe_64 (const m68k_info *info, const uint64_t address)
 
static int make_int_8 (int value)
 
static int make_int_16 (int value)
 
static void d68000_invalid (m68k_info *info)
 
static int instruction_is_valid (m68k_info *info, const unsigned int word_check)
 
static unsigned int peek_imm_8 (const m68k_info *info)
 
static unsigned int peek_imm_16 (const m68k_info *info)
 
static unsigned int peek_imm_32 (const m68k_info *info)
 
static unsigned long long peek_imm_64 (const m68k_info *info)
 
static unsigned int read_imm_8 (m68k_info *info)
 
static unsigned int read_imm_16 (m68k_info *info)
 
static unsigned int read_imm_32 (m68k_info *info)
 
static unsigned long long read_imm_64 (m68k_info *info)
 
static void get_with_index_address_mode (m68k_info *info, cs_m68k_op *op, uint32_t instruction, uint32_t size, bool is_pc)
 
static void get_ea_mode_op (m68k_info *info, cs_m68k_op *op, uint32_t instruction, uint32_t size)
 
static void set_insn_group (m68k_info *info, m68k_group_type group)
 
static cs_m68kbuild_init_op (m68k_info *info, int opcode, int count, int size)
 
static void build_re_gen_1 (m68k_info *info, bool isDreg, int opcode, uint8_t size)
 
static void build_re_1 (m68k_info *info, int opcode, uint8_t size)
 
static void build_er_gen_1 (m68k_info *info, bool isDreg, int opcode, uint8_t size)
 
static void build_rr (m68k_info *info, int opcode, uint8_t size, int imm)
 
static void build_r (m68k_info *info, int opcode, uint8_t size)
 
static void build_imm_ea (m68k_info *info, int opcode, uint8_t size, int imm)
 
static void build_3bit_d (m68k_info *info, int opcode, int size)
 
static void build_3bit_ea (m68k_info *info, int opcode, int size)
 
static void build_mm (m68k_info *info, int opcode, uint8_t size, int imm)
 
static void build_ea (m68k_info *info, int opcode, uint8_t size)
 
static void build_ea_a (m68k_info *info, int opcode, uint8_t size)
 
static void build_ea_ea (m68k_info *info, int opcode, int size)
 
static void build_pi_pi (m68k_info *info, int opcode, int size)
 
static void build_imm_special_reg (m68k_info *info, int opcode, int imm, int size, m68k_reg reg)
 
static void build_relative_branch (m68k_info *info, int opcode, int size, int displacement)
 
static void build_absolute_jump_with_immediate (m68k_info *info, int opcode, int size, int immediate)
 
static void build_bcc (m68k_info *info, int size, int displacement)
 
static void build_trap (m68k_info *info, int size, int immediate)
 
static void build_dbxx (m68k_info *info, int opcode, int size, int displacement)
 
static void build_dbcc (m68k_info *info, int size, int displacement)
 
static void build_d_d_ea (m68k_info *info, int opcode, int size)
 
static void build_bitfield_ins (m68k_info *info, int opcode, int has_d_arg)
 
static void build_d (m68k_info *info, int opcode, int size)
 
static uint16_t reverse_bits (uint32_t v)
 
static uint8_t reverse_bits_8 (uint32_t v)
 
static void build_movem_re (m68k_info *info, int opcode, int size)
 
static void build_movem_er (m68k_info *info, int opcode, int size)
 
static void build_imm (m68k_info *info, int opcode, int data)
 
static void build_illegal (m68k_info *info, int data)
 
static void build_invalid (m68k_info *info, int data)
 
static void build_cas2 (m68k_info *info, int size)
 
static void build_chk2_cmp2 (m68k_info *info, int size)
 
static void build_move16 (m68k_info *info, int data[2], int modes[2])
 
static void build_link (m68k_info *info, int disp, int size)
 
static void build_cpush_cinv (m68k_info *info, int op_offset)
 
static void build_movep_re (m68k_info *info, int size)
 
static void build_movep_er (m68k_info *info, int size)
 
static void build_moves (m68k_info *info, int size)
 
static void build_er_1 (m68k_info *info, int opcode, uint8_t size)
 
static void d68000_illegal (m68k_info *info)
 
static void d68000_1010 (m68k_info *info)
 
static void d68000_1111 (m68k_info *info)
 
static void d68000_abcd_rr (m68k_info *info)
 
static void d68000_abcd_mm (m68k_info *info)
 
static void d68000_add_er_8 (m68k_info *info)
 
static void d68000_add_er_16 (m68k_info *info)
 
static void d68000_add_er_32 (m68k_info *info)
 
static void d68000_add_re_8 (m68k_info *info)
 
static void d68000_add_re_16 (m68k_info *info)
 
static void d68000_add_re_32 (m68k_info *info)
 
static void d68000_adda_16 (m68k_info *info)
 
static void d68000_adda_32 (m68k_info *info)
 
static void d68000_addi_8 (m68k_info *info)
 
static void d68000_addi_16 (m68k_info *info)
 
static void d68000_addi_32 (m68k_info *info)
 
static void d68000_addq_8 (m68k_info *info)
 
static void d68000_addq_16 (m68k_info *info)
 
static void d68000_addq_32 (m68k_info *info)
 
static void d68000_addx_rr_8 (m68k_info *info)
 
static void d68000_addx_rr_16 (m68k_info *info)
 
static void d68000_addx_rr_32 (m68k_info *info)
 
static void d68000_addx_mm_8 (m68k_info *info)
 
static void d68000_addx_mm_16 (m68k_info *info)
 
static void d68000_addx_mm_32 (m68k_info *info)
 
static void d68000_and_er_8 (m68k_info *info)
 
static void d68000_and_er_16 (m68k_info *info)
 
static void d68000_and_er_32 (m68k_info *info)
 
static void d68000_and_re_8 (m68k_info *info)
 
static void d68000_and_re_16 (m68k_info *info)
 
static void d68000_and_re_32 (m68k_info *info)
 
static void d68000_andi_8 (m68k_info *info)
 
static void d68000_andi_16 (m68k_info *info)
 
static void d68000_andi_32 (m68k_info *info)
 
static void d68000_andi_to_ccr (m68k_info *info)
 
static void d68000_andi_to_sr (m68k_info *info)
 
static void d68000_asr_s_8 (m68k_info *info)
 
static void d68000_asr_s_16 (m68k_info *info)
 
static void d68000_asr_s_32 (m68k_info *info)
 
static void d68000_asr_r_8 (m68k_info *info)
 
static void d68000_asr_r_16 (m68k_info *info)
 
static void d68000_asr_r_32 (m68k_info *info)
 
static void d68000_asr_ea (m68k_info *info)
 
static void d68000_asl_s_8 (m68k_info *info)
 
static void d68000_asl_s_16 (m68k_info *info)
 
static void d68000_asl_s_32 (m68k_info *info)
 
static void d68000_asl_r_8 (m68k_info *info)
 
static void d68000_asl_r_16 (m68k_info *info)
 
static void d68000_asl_r_32 (m68k_info *info)
 
static void d68000_asl_ea (m68k_info *info)
 
static void d68000_bcc_8 (m68k_info *info)
 
static void d68000_bcc_16 (m68k_info *info)
 
static void d68020_bcc_32 (m68k_info *info)
 
static void d68000_bchg_r (m68k_info *info)
 
static void d68000_bchg_s (m68k_info *info)
 
static void d68000_bclr_r (m68k_info *info)
 
static void d68000_bclr_s (m68k_info *info)
 
static void d68010_bkpt (m68k_info *info)
 
static void d68020_bfchg (m68k_info *info)
 
static void d68020_bfclr (m68k_info *info)
 
static void d68020_bfexts (m68k_info *info)
 
static void d68020_bfextu (m68k_info *info)
 
static void d68020_bfffo (m68k_info *info)
 
static void d68020_bfins (m68k_info *info)
 
static void d68020_bfset (m68k_info *info)
 
static void d68020_bftst (m68k_info *info)
 
static void d68000_bra_8 (m68k_info *info)
 
static void d68000_bra_16 (m68k_info *info)
 
static void d68020_bra_32 (m68k_info *info)
 
static void d68000_bset_r (m68k_info *info)
 
static void d68000_bset_s (m68k_info *info)
 
static void d68000_bsr_8 (m68k_info *info)
 
static void d68000_bsr_16 (m68k_info *info)
 
static void d68020_bsr_32 (m68k_info *info)
 
static void d68000_btst_r (m68k_info *info)
 
static void d68000_btst_s (m68k_info *info)
 
static void d68020_callm (m68k_info *info)
 
static void d68020_cas_8 (m68k_info *info)
 
static void d68020_cas_16 (m68k_info *info)
 
static void d68020_cas_32 (m68k_info *info)
 
static void d68020_cas2_16 (m68k_info *info)
 
static void d68020_cas2_32 (m68k_info *info)
 
static void d68000_chk_16 (m68k_info *info)
 
static void d68020_chk_32 (m68k_info *info)
 
static void d68020_chk2_cmp2_8 (m68k_info *info)
 
static void d68020_chk2_cmp2_16 (m68k_info *info)
 
static void d68020_chk2_cmp2_32 (m68k_info *info)
 
static void d68040_cinv (m68k_info *info)
 
static void d68000_clr_8 (m68k_info *info)
 
static void d68000_clr_16 (m68k_info *info)
 
static void d68000_clr_32 (m68k_info *info)
 
static void d68000_cmp_8 (m68k_info *info)
 
static void d68000_cmp_16 (m68k_info *info)
 
static void d68000_cmp_32 (m68k_info *info)
 
static void d68000_cmpa_16 (m68k_info *info)
 
static void d68000_cmpa_32 (m68k_info *info)
 
static void d68000_cmpi_8 (m68k_info *info)
 
static void d68020_cmpi_pcdi_8 (m68k_info *info)
 
static void d68020_cmpi_pcix_8 (m68k_info *info)
 
static void d68000_cmpi_16 (m68k_info *info)
 
static void d68020_cmpi_pcdi_16 (m68k_info *info)
 
static void d68020_cmpi_pcix_16 (m68k_info *info)
 
static void d68000_cmpi_32 (m68k_info *info)
 
static void d68020_cmpi_pcdi_32 (m68k_info *info)
 
static void d68020_cmpi_pcix_32 (m68k_info *info)
 
static void d68000_cmpm_8 (m68k_info *info)
 
static void d68000_cmpm_16 (m68k_info *info)
 
static void d68000_cmpm_32 (m68k_info *info)
 
static void make_cpbcc_operand (cs_m68k_op *op, int size, int displacement)
 
static void d68020_cpbcc_16 (m68k_info *info)
 
static void d68020_cpbcc_32 (m68k_info *info)
 
static void d68020_cpdbcc (m68k_info *info)
 
static void fmove_fpcr (m68k_info *info, uint32_t extension)
 
static void fmovem (m68k_info *info, uint32_t extension)
 
static void d68020_cpgen (m68k_info *info)
 
static void d68020_cprestore (m68k_info *info)
 
static void d68020_cpsave (m68k_info *info)
 
static void d68020_cpscc (m68k_info *info)
 
static void d68020_cptrapcc_0 (m68k_info *info)
 
static void d68020_cptrapcc_16 (m68k_info *info)
 
static void d68020_cptrapcc_32 (m68k_info *info)
 
static void d68040_cpush (m68k_info *info)
 
static void d68000_dbra (m68k_info *info)
 
static void d68000_dbcc (m68k_info *info)
 
static void d68000_divs (m68k_info *info)
 
static void d68000_divu (m68k_info *info)
 
static void d68020_divl (m68k_info *info)
 
static void d68000_eor_8 (m68k_info *info)
 
static void d68000_eor_16 (m68k_info *info)
 
static void d68000_eor_32 (m68k_info *info)
 
static void d68000_eori_8 (m68k_info *info)
 
static void d68000_eori_16 (m68k_info *info)
 
static void d68000_eori_32 (m68k_info *info)
 
static void d68000_eori_to_ccr (m68k_info *info)
 
static void d68000_eori_to_sr (m68k_info *info)
 
static void d68000_exg_dd (m68k_info *info)
 
static void d68000_exg_aa (m68k_info *info)
 
static void d68000_exg_da (m68k_info *info)
 
static void d68000_ext_16 (m68k_info *info)
 
static void d68000_ext_32 (m68k_info *info)
 
static void d68020_extb_32 (m68k_info *info)
 
static void d68000_jmp (m68k_info *info)
 
static void d68000_jsr (m68k_info *info)
 
static void d68000_lea (m68k_info *info)
 
static void d68000_link_16 (m68k_info *info)
 
static void d68020_link_32 (m68k_info *info)
 
static void d68000_lsr_s_8 (m68k_info *info)
 
static void d68000_lsr_s_16 (m68k_info *info)
 
static void d68000_lsr_s_32 (m68k_info *info)
 
static void d68000_lsr_r_8 (m68k_info *info)
 
static void d68000_lsr_r_16 (m68k_info *info)
 
static void d68000_lsr_r_32 (m68k_info *info)
 
static void d68000_lsr_ea (m68k_info *info)
 
static void d68000_lsl_s_8 (m68k_info *info)
 
static void d68000_lsl_s_16 (m68k_info *info)
 
static void d68000_lsl_s_32 (m68k_info *info)
 
static void d68000_lsl_r_8 (m68k_info *info)
 
static void d68000_lsl_r_16 (m68k_info *info)
 
static void d68000_lsl_r_32 (m68k_info *info)
 
static void d68000_lsl_ea (m68k_info *info)
 
static void d68000_move_8 (m68k_info *info)
 
static void d68000_move_16 (m68k_info *info)
 
static void d68000_move_32 (m68k_info *info)
 
static void d68000_movea_16 (m68k_info *info)
 
static void d68000_movea_32 (m68k_info *info)
 
static void d68000_move_to_ccr (m68k_info *info)
 
static void d68010_move_fr_ccr (m68k_info *info)
 
static void d68000_move_fr_sr (m68k_info *info)
 
static void d68000_move_to_sr (m68k_info *info)
 
static void d68000_move_fr_usp (m68k_info *info)
 
static void d68000_move_to_usp (m68k_info *info)
 
static void d68010_movec (m68k_info *info)
 
static void d68000_movem_pd_16 (m68k_info *info)
 
static void d68000_movem_pd_32 (m68k_info *info)
 
static void d68000_movem_er_16 (m68k_info *info)
 
static void d68000_movem_er_32 (m68k_info *info)
 
static void d68000_movem_re_16 (m68k_info *info)
 
static void d68000_movem_re_32 (m68k_info *info)
 
static void d68000_movep_re_16 (m68k_info *info)
 
static void d68000_movep_re_32 (m68k_info *info)
 
static void d68000_movep_er_16 (m68k_info *info)
 
static void d68000_movep_er_32 (m68k_info *info)
 
static void d68010_moves_8 (m68k_info *info)
 
static void d68010_moves_16 (m68k_info *info)
 
static void d68010_moves_32 (m68k_info *info)
 
static void d68000_moveq (m68k_info *info)
 
static void d68040_move16_pi_pi (m68k_info *info)
 
static void d68040_move16_pi_al (m68k_info *info)
 
static void d68040_move16_al_pi (m68k_info *info)
 
static void d68040_move16_ai_al (m68k_info *info)
 
static void d68040_move16_al_ai (m68k_info *info)
 
static void d68000_muls (m68k_info *info)
 
static void d68000_mulu (m68k_info *info)
 
static void d68020_mull (m68k_info *info)
 
static void d68000_nbcd (m68k_info *info)
 
static void d68000_neg_8 (m68k_info *info)
 
static void d68000_neg_16 (m68k_info *info)
 
static void d68000_neg_32 (m68k_info *info)
 
static void d68000_negx_8 (m68k_info *info)
 
static void d68000_negx_16 (m68k_info *info)
 
static void d68000_negx_32 (m68k_info *info)
 
static void d68000_nop (m68k_info *info)
 
static void d68000_not_8 (m68k_info *info)
 
static void d68000_not_16 (m68k_info *info)
 
static void d68000_not_32 (m68k_info *info)
 
static void d68000_or_er_8 (m68k_info *info)
 
static void d68000_or_er_16 (m68k_info *info)
 
static void d68000_or_er_32 (m68k_info *info)
 
static void d68000_or_re_8 (m68k_info *info)
 
static void d68000_or_re_16 (m68k_info *info)
 
static void d68000_or_re_32 (m68k_info *info)
 
static void d68000_ori_8 (m68k_info *info)
 
static void d68000_ori_16 (m68k_info *info)
 
static void d68000_ori_32 (m68k_info *info)
 
static void d68000_ori_to_ccr (m68k_info *info)
 
static void d68000_ori_to_sr (m68k_info *info)
 
static void d68020_pack_rr (m68k_info *info)
 
static void d68020_pack_mm (m68k_info *info)
 
static void d68000_pea (m68k_info *info)
 
static void d68000_reset (m68k_info *info)
 
static void d68000_ror_s_8 (m68k_info *info)
 
static void d68000_ror_s_16 (m68k_info *info)
 
static void d68000_ror_s_32 (m68k_info *info)
 
static void d68000_ror_r_8 (m68k_info *info)
 
static void d68000_ror_r_16 (m68k_info *info)
 
static void d68000_ror_r_32 (m68k_info *info)
 
static void d68000_ror_ea (m68k_info *info)
 
static void d68000_rol_s_8 (m68k_info *info)
 
static void d68000_rol_s_16 (m68k_info *info)
 
static void d68000_rol_s_32 (m68k_info *info)
 
static void d68000_rol_r_8 (m68k_info *info)
 
static void d68000_rol_r_16 (m68k_info *info)
 
static void d68000_rol_r_32 (m68k_info *info)
 
static void d68000_rol_ea (m68k_info *info)
 
static void d68000_roxr_s_8 (m68k_info *info)
 
static void d68000_roxr_s_16 (m68k_info *info)
 
static void d68000_roxr_s_32 (m68k_info *info)
 
static void d68000_roxr_r_8 (m68k_info *info)
 
static void d68000_roxr_r_16 (m68k_info *info)
 
static void d68000_roxr_r_32 (m68k_info *info)
 
static void d68000_roxr_ea (m68k_info *info)
 
static void d68000_roxl_s_8 (m68k_info *info)
 
static void d68000_roxl_s_16 (m68k_info *info)
 
static void d68000_roxl_s_32 (m68k_info *info)
 
static void d68000_roxl_r_8 (m68k_info *info)
 
static void d68000_roxl_r_16 (m68k_info *info)
 
static void d68000_roxl_r_32 (m68k_info *info)
 
static void d68000_roxl_ea (m68k_info *info)
 
static void d68010_rtd (m68k_info *info)
 
static void d68000_rte (m68k_info *info)
 
static void d68020_rtm (m68k_info *info)
 
static void d68000_rtr (m68k_info *info)
 
static void d68000_rts (m68k_info *info)
 
static void d68000_sbcd_rr (m68k_info *info)
 
static void d68000_sbcd_mm (m68k_info *info)
 
static void d68000_scc (m68k_info *info)
 
static void d68000_stop (m68k_info *info)
 
static void d68000_sub_er_8 (m68k_info *info)
 
static void d68000_sub_er_16 (m68k_info *info)
 
static void d68000_sub_er_32 (m68k_info *info)
 
static void d68000_sub_re_8 (m68k_info *info)
 
static void d68000_sub_re_16 (m68k_info *info)
 
static void d68000_sub_re_32 (m68k_info *info)
 
static void d68000_suba_16 (m68k_info *info)
 
static void d68000_suba_32 (m68k_info *info)
 
static void d68000_subi_8 (m68k_info *info)
 
static void d68000_subi_16 (m68k_info *info)
 
static void d68000_subi_32 (m68k_info *info)
 
static void d68000_subq_8 (m68k_info *info)
 
static void d68000_subq_16 (m68k_info *info)
 
static void d68000_subq_32 (m68k_info *info)
 
static void d68000_subx_rr_8 (m68k_info *info)
 
static void d68000_subx_rr_16 (m68k_info *info)
 
static void d68000_subx_rr_32 (m68k_info *info)
 
static void d68000_subx_mm_8 (m68k_info *info)
 
static void d68000_subx_mm_16 (m68k_info *info)
 
static void d68000_subx_mm_32 (m68k_info *info)
 
static void d68000_swap (m68k_info *info)
 
static void d68000_tas (m68k_info *info)
 
static void d68000_trap (m68k_info *info)
 
static void d68020_trapcc_0 (m68k_info *info)
 
static void d68020_trapcc_16 (m68k_info *info)
 
static void d68020_trapcc_32 (m68k_info *info)
 
static void d68000_trapv (m68k_info *info)
 
static void d68000_tst_8 (m68k_info *info)
 
static void d68020_tst_pcdi_8 (m68k_info *info)
 
static void d68020_tst_pcix_8 (m68k_info *info)
 
static void d68020_tst_i_8 (m68k_info *info)
 
static void d68000_tst_16 (m68k_info *info)
 
static void d68020_tst_a_16 (m68k_info *info)
 
static void d68020_tst_pcdi_16 (m68k_info *info)
 
static void d68020_tst_pcix_16 (m68k_info *info)
 
static void d68020_tst_i_16 (m68k_info *info)
 
static void d68000_tst_32 (m68k_info *info)
 
static void d68020_tst_a_32 (m68k_info *info)
 
static void d68020_tst_pcdi_32 (m68k_info *info)
 
static void d68020_tst_pcix_32 (m68k_info *info)
 
static void d68020_tst_i_32 (m68k_info *info)
 
static void d68000_unlk (m68k_info *info)
 
static void d68020_unpk_rr (m68k_info *info)
 
static void d68020_unpk_mm (m68k_info *info)
 
static int exists_reg_list (uint16_t *regs, uint8_t count, m68k_reg reg)
 
static void add_reg_to_rw_list (m68k_info *info, m68k_reg reg, int write)
 
static void update_am_reg_list (m68k_info *info, cs_m68k_op *op, int write)
 
static void update_bits_range (m68k_info *info, m68k_reg reg_start, uint8_t bits, int write)
 
static void update_reg_list_regbits (m68k_info *info, cs_m68k_op *op, int write)
 
static void update_op_reg_list (m68k_info *info, cs_m68k_op *op, int write)
 
static void build_regs_read_write_counts (m68k_info *info)
 
static void m68k_setup_internals (m68k_info *info, MCInst *inst, unsigned int pc, unsigned int cpu_type)
 
static unsigned int m68k_disassemble (m68k_info *info, uint64_t pc)
 
bool M68K_getInstruction (csh ud, const uint8_t *code, size_t code_len, MCInst *instr, uint16_t *size, uint64_t address, void *inst_info)
 

Variables

static instruction_struct g_instruction_table [0x10000]
 
static uint32_t g_3bit_qdata_table [8] = {8, 1, 2, 3, 4, 5, 6, 7}
 
static uint32_t g_5bit_data_table [32]
 
static m68k_insn s_branch_lut []
 
static m68k_insn s_dbcc_lut []
 
static m68k_insn s_scc_lut []
 
static m68k_insn s_trap_lut []
 

Macro Definition Documentation

◆ BIT_0

#define BIT_0 (   A)    ((A) & 0x00000001)

Definition at line 55 of file M68KDisassembler.c.

◆ BIT_1

#define BIT_1 (   A)    ((A) & 0x00000002)

Definition at line 56 of file M68KDisassembler.c.

◆ BIT_10

#define BIT_10 (   A)    ((A) & 0x00010000)

Definition at line 71 of file M68KDisassembler.c.

◆ BIT_11

#define BIT_11 (   A)    ((A) & 0x00020000)

Definition at line 72 of file M68KDisassembler.c.

◆ BIT_12

#define BIT_12 (   A)    ((A) & 0x00040000)

Definition at line 73 of file M68KDisassembler.c.

◆ BIT_13

#define BIT_13 (   A)    ((A) & 0x00080000)

Definition at line 74 of file M68KDisassembler.c.

◆ BIT_14

#define BIT_14 (   A)    ((A) & 0x00100000)

Definition at line 75 of file M68KDisassembler.c.

◆ BIT_15

#define BIT_15 (   A)    ((A) & 0x00200000)

Definition at line 76 of file M68KDisassembler.c.

◆ BIT_16

#define BIT_16 (   A)    ((A) & 0x00400000)

Definition at line 77 of file M68KDisassembler.c.

◆ BIT_17

#define BIT_17 (   A)    ((A) & 0x00800000)

Definition at line 78 of file M68KDisassembler.c.

◆ BIT_18

#define BIT_18 (   A)    ((A) & 0x01000000)

Definition at line 79 of file M68KDisassembler.c.

◆ BIT_19

#define BIT_19 (   A)    ((A) & 0x02000000)

Definition at line 80 of file M68KDisassembler.c.

◆ BIT_1A

#define BIT_1A (   A)    ((A) & 0x04000000)

Definition at line 81 of file M68KDisassembler.c.

◆ BIT_1B

#define BIT_1B (   A)    ((A) & 0x08000000)

Definition at line 82 of file M68KDisassembler.c.

◆ BIT_1C

#define BIT_1C (   A)    ((A) & 0x10000000)

Definition at line 83 of file M68KDisassembler.c.

◆ BIT_1D

#define BIT_1D (   A)    ((A) & 0x20000000)

Definition at line 84 of file M68KDisassembler.c.

◆ BIT_1E

#define BIT_1E (   A)    ((A) & 0x40000000)

Definition at line 85 of file M68KDisassembler.c.

◆ BIT_1F

#define BIT_1F (   A)    ((A) & 0x80000000)

Definition at line 86 of file M68KDisassembler.c.

◆ BIT_2

#define BIT_2 (   A)    ((A) & 0x00000004)

Definition at line 57 of file M68KDisassembler.c.

◆ BIT_3

#define BIT_3 (   A)    ((A) & 0x00000008)

Definition at line 58 of file M68KDisassembler.c.

◆ BIT_4

#define BIT_4 (   A)    ((A) & 0x00000010)

Definition at line 59 of file M68KDisassembler.c.

◆ BIT_5

#define BIT_5 (   A)    ((A) & 0x00000020)

Definition at line 60 of file M68KDisassembler.c.

◆ BIT_6

#define BIT_6 (   A)    ((A) & 0x00000040)

Definition at line 61 of file M68KDisassembler.c.

◆ BIT_7

#define BIT_7 (   A)    ((A) & 0x00000080)

Definition at line 62 of file M68KDisassembler.c.

◆ BIT_8

#define BIT_8 (   A)    ((A) & 0x00000100)

Definition at line 63 of file M68KDisassembler.c.

◆ BIT_9

#define BIT_9 (   A)    ((A) & 0x00000200)

Definition at line 64 of file M68KDisassembler.c.

◆ BIT_A

#define BIT_A (   A)    ((A) & 0x00000400)

Definition at line 65 of file M68KDisassembler.c.

◆ BIT_B

#define BIT_B (   A)    ((A) & 0x00000800)

Definition at line 66 of file M68KDisassembler.c.

◆ BIT_C

#define BIT_C (   A)    ((A) & 0x00001000)

Definition at line 67 of file M68KDisassembler.c.

◆ BIT_D

#define BIT_D (   A)    ((A) & 0x00002000)

Definition at line 68 of file M68KDisassembler.c.

◆ BIT_E

#define BIT_E (   A)    ((A) & 0x00004000)

Definition at line 69 of file M68KDisassembler.c.

◆ BIT_F

#define BIT_F (   A)    ((A) & 0x00008000)

Definition at line 70 of file M68KDisassembler.c.

◆ BITFIELD

#define BITFIELD (   val,
  sb,
  eb 
)    ((BITFIELD_MASK(sb,eb) & (val)) >> (eb))

Definition at line 143 of file M68KDisassembler.c.

◆ BITFIELD_MASK

#define BITFIELD_MASK (   sb,
  eb 
)    (((1 << ((sb) + 1))-1) & (~((1 << (eb))-1)))

Definition at line 142 of file M68KDisassembler.c.

◆ EXT_8BIT_DISPLACEMENT

#define EXT_8BIT_DISPLACEMENT (   A)    ((A)&0xff)

Definition at line 122 of file M68KDisassembler.c.

◆ EXT_BASE_DISPLACEMENT_LONG

#define EXT_BASE_DISPLACEMENT_LONG (   A)    (((A)&0x30) == 0x30)

Definition at line 136 of file M68KDisassembler.c.

◆ EXT_BASE_DISPLACEMENT_PRESENT

#define EXT_BASE_DISPLACEMENT_PRESENT (   A)    (((A)&0x30) > 0x10)

Definition at line 134 of file M68KDisassembler.c.

◆ EXT_BASE_DISPLACEMENT_WORD

#define EXT_BASE_DISPLACEMENT_WORD (   A)    (((A)&0x30) == 0x20)

Definition at line 135 of file M68KDisassembler.c.

◆ EXT_BASE_REGISTER_PRESENT

#define EXT_BASE_REGISTER_PRESENT (   A)    (!BIT_7(A))

Definition at line 125 of file M68KDisassembler.c.

◆ EXT_EFFECTIVE_ZERO

#define EXT_EFFECTIVE_ZERO (   A)    (((A)&0xe4) == 0xc4 || ((A)&0xe2) == 0xc0)

Definition at line 124 of file M68KDisassembler.c.

◆ EXT_FULL

#define EXT_FULL (   A)    BIT_8(A)

Definition at line 123 of file M68KDisassembler.c.

◆ EXT_INDEX_AR

#define EXT_INDEX_AR (   A)    BIT_F(A)

Definition at line 133 of file M68KDisassembler.c.

◆ EXT_INDEX_LONG

#define EXT_INDEX_LONG (   A)    BIT_B(A)

Definition at line 132 of file M68KDisassembler.c.

◆ EXT_INDEX_POST

#define EXT_INDEX_POST (   A)    (EXT_INDEX_PRESENT(A) && ((A)&7) > 4)

Definition at line 130 of file M68KDisassembler.c.

◆ EXT_INDEX_PRE

#define EXT_INDEX_PRE (   A)    (EXT_INDEX_PRESENT(A) && ((A)&7) < 4 && ((A)&7) != 0)

Definition at line 129 of file M68KDisassembler.c.

◆ EXT_INDEX_PRE_POST

#define EXT_INDEX_PRE_POST (   A)    (EXT_INDEX_PRESENT(A) && (A)&3)

Definition at line 128 of file M68KDisassembler.c.

◆ EXT_INDEX_REGISTER

#define EXT_INDEX_REGISTER (   A)    (((A)>>12)&7)

Definition at line 127 of file M68KDisassembler.c.

◆ EXT_INDEX_REGISTER_PRESENT

#define EXT_INDEX_REGISTER_PRESENT (   A)    (!BIT_6(A))

Definition at line 126 of file M68KDisassembler.c.

◆ EXT_INDEX_SCALE

#define EXT_INDEX_SCALE (   A)    (((A)>>9)&3)

Definition at line 131 of file M68KDisassembler.c.

◆ EXT_OUTER_DISPLACEMENT_LONG

#define EXT_OUTER_DISPLACEMENT_LONG (   A)    (((A)&3) == 3 && ((A)&0x47) < 0x44)

Definition at line 139 of file M68KDisassembler.c.

◆ EXT_OUTER_DISPLACEMENT_PRESENT

#define EXT_OUTER_DISPLACEMENT_PRESENT (   A)    (((A)&3) > 1 && ((A)&0x47) < 0x44)

Definition at line 137 of file M68KDisassembler.c.

◆ EXT_OUTER_DISPLACEMENT_WORD

#define EXT_OUTER_DISPLACEMENT_WORD (   A)    (((A)&3) == 2 && ((A)&0x47) < 0x44)

Definition at line 138 of file M68KDisassembler.c.

◆ get_ea_mode_str_16

#define get_ea_mode_str_16 (   instruction)    get_ea_mode_str(instruction, 1)

Definition at line 287 of file M68KDisassembler.c.

◆ get_ea_mode_str_32

#define get_ea_mode_str_32 (   instruction)    get_ea_mode_str(instruction, 2)

Definition at line 288 of file M68KDisassembler.c.

◆ get_ea_mode_str_8

#define get_ea_mode_str_8 (   instruction)    get_ea_mode_str(instruction, 0)

Definition at line 286 of file M68KDisassembler.c.

◆ get_imm_str_s16

#define get_imm_str_s16 ( )    get_imm_str_s(1)

Definition at line 291 of file M68KDisassembler.c.

◆ get_imm_str_s32

#define get_imm_str_s32 ( )    get_imm_str_s(2)

Definition at line 292 of file M68KDisassembler.c.

◆ get_imm_str_s8

#define get_imm_str_s8 ( )    get_imm_str_s(0)

Definition at line 290 of file M68KDisassembler.c.

◆ get_imm_str_u16

#define get_imm_str_u16 ( )    get_imm_str_u(1)

Definition at line 295 of file M68KDisassembler.c.

◆ get_imm_str_u32

#define get_imm_str_u32 ( )    get_imm_str_u(2)

Definition at line 296 of file M68KDisassembler.c.

◆ get_imm_str_u8

#define get_imm_str_u8 ( )    get_imm_str_u(0)

Definition at line 294 of file M68KDisassembler.c.

◆ IS_BITSET

#define IS_BITSET (   val,
  b 
)    ((val) & (1 << (b)))

Definition at line 141 of file M68KDisassembler.c.

◆ LIMIT_CPU_TYPES

#define LIMIT_CPU_TYPES (   info,
  ALLOWED_CPU_TYPES 
)
Value:
do { \
if (!(info->type & ALLOWED_CPU_TYPES)) { \
d68000_invalid(info); \
return; \
} \
} while (0)
RzBinInfo * info(RzBinFile *bf)
Definition: bin_ne.c:86
char * type
Definition: rz_bin.h:211

Definition at line 267 of file M68KDisassembler.c.

◆ M68000_ONLY

#define M68000_ONLY   TYPE_68000

Definition at line 95 of file M68KDisassembler.c.

◆ M68010_LESS

#define M68010_LESS   (TYPE_68000 | TYPE_68010)

Definition at line 98 of file M68KDisassembler.c.

◆ M68010_ONLY

#define M68010_ONLY   TYPE_68010

Definition at line 97 of file M68KDisassembler.c.

◆ M68010_PLUS

#define M68010_PLUS   (TYPE_68010 | TYPE_68020 | TYPE_68030 | TYPE_68040)

Definition at line 99 of file M68KDisassembler.c.

◆ M68020_LESS

#define M68020_LESS   (TYPE_68010 | TYPE_68020)

Definition at line 102 of file M68KDisassembler.c.

◆ M68020_ONLY

#define M68020_ONLY   TYPE_68020

Definition at line 101 of file M68KDisassembler.c.

◆ M68020_PLUS

#define M68020_PLUS   (TYPE_68020 | TYPE_68030 | TYPE_68040)

Definition at line 103 of file M68KDisassembler.c.

◆ M68030_LESS

#define M68030_LESS   (TYPE_68010 | TYPE_68020 | TYPE_68030)

Definition at line 106 of file M68KDisassembler.c.

◆ M68030_ONLY

#define M68030_ONLY   TYPE_68030

Definition at line 105 of file M68KDisassembler.c.

◆ M68030_PLUS

#define M68030_PLUS   (TYPE_68030 | TYPE_68040)

Definition at line 107 of file M68KDisassembler.c.

◆ M68040_PLUS

#define M68040_PLUS   TYPE_68040

Definition at line 109 of file M68KDisassembler.c.

◆ TYPE_68000

#define TYPE_68000   1

Definition at line 89 of file M68KDisassembler.c.

◆ TYPE_68010

#define TYPE_68010   2

Definition at line 90 of file M68KDisassembler.c.

◆ TYPE_68020

#define TYPE_68020   4

Definition at line 91 of file M68KDisassembler.c.

◆ TYPE_68030

#define TYPE_68030   8

Definition at line 92 of file M68KDisassembler.c.

◆ TYPE_68040

#define TYPE_68040   16

Definition at line 93 of file M68KDisassembler.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
M68K_CPU_TYPE_INVALID 
M68K_CPU_TYPE_68000 
M68K_CPU_TYPE_68010 
M68K_CPU_TYPE_68EC020 
M68K_CPU_TYPE_68020 
M68K_CPU_TYPE_68030 
M68K_CPU_TYPE_68040 

Definition at line 111 of file M68KDisassembler.c.

111  {
117  M68K_CPU_TYPE_68030, /* Supported by disassembler ONLY */
118  M68K_CPU_TYPE_68040 /* Supported by disassembler ONLY */
119 };
@ M68K_CPU_TYPE_68EC020
@ M68K_CPU_TYPE_INVALID
@ M68K_CPU_TYPE_68030
@ M68K_CPU_TYPE_68010
@ M68K_CPU_TYPE_68020
@ M68K_CPU_TYPE_68000
@ M68K_CPU_TYPE_68040

Function Documentation

◆ add_reg_to_rw_list()

static void add_reg_to_rw_list ( m68k_info info,
m68k_reg  reg,
int  write 
)
static

Definition at line 3411 of file M68KDisassembler.c.

3412 {
3413  if (reg == M68K_REG_INVALID)
3414  return;
3415 
3416  if (write)
3417  {
3418  if (exists_reg_list(info->regs_write, info->regs_write_count, reg))
3419  return;
3420 
3421  info->regs_write[info->regs_write_count] = (uint16_t)reg;
3422  info->regs_write_count++;
3423  }
3424  else
3425  {
3426  if (exists_reg_list(info->regs_read, info->regs_read_count, reg))
3427  return;
3428 
3429  info->regs_read[info->regs_read_count] = (uint16_t)reg;
3430  info->regs_read_count++;
3431  }
3432 }
static int exists_reg_list(uint16_t *regs, uint8_t count, m68k_reg reg)
static static fork write
Definition: sflib.h:33
#define reg(n)
@ M68K_REG_INVALID
Definition: m68k.h:21
unsigned short uint16_t
Definition: sftypes.h:30

References exists_reg_list(), info(), M68K_REG_INVALID, reg, and write.

Referenced by update_am_reg_list(), update_bits_range(), and update_op_reg_list().

◆ build_3bit_d()

static void build_3bit_d ( m68k_info info,
int  opcode,
int  size 
)
static

Definition at line 611 of file M68KDisassembler.c.

612 {
613  cs_m68k_op* op0;
614  cs_m68k_op* op1;
615  cs_m68k* ext = build_init_op(info, opcode, 2, size);
616 
617  op0 = &ext->operands[0];
618  op1 = &ext->operands[1];
619 
620  op0->type = M68K_OP_IMM;
622  op0->imm = g_3bit_qdata_table[(info->ir >> 9) & 7];
623 
625  op1->reg = M68K_REG_D0 + (info->ir & 7);
626 }
static cs_m68k * build_init_op(m68k_info *info, int opcode, int count, int size)
static uint32_t g_3bit_qdata_table[8]
static const char ext[]
Definition: apprentice.c:1981
voidpf void uLong size
Definition: ioapi.h:138
@ M68K_AM_IMMEDIATE
Immediate value.
Definition: m68k.h:106
@ M68K_AM_REG_DIRECT_DATA
Register Direct - Data.
Definition: m68k.h:82
@ M68K_OP_IMM
= CS_OP_IMM (Immediate operand).
Definition: m68k.h:115
@ M68K_REG_D0
Definition: m68k.h:23
Instruction operand.
Definition: m68k.h:160
m68k_reg reg
register value for REG operand
Definition: m68k.h:165
m68k_op_type type
Definition: m68k.h:172
m68k_address_mode address_mode
M68K addressing mode for this op.
Definition: m68k.h:173
uint64_t imm
immediate value for IMM operand
Definition: m68k.h:162
The M68K instruction and it's operands.
Definition: m68k.h:210

References cs_m68k_op::address_mode, build_init_op(), ext, g_3bit_qdata_table, cs_m68k_op::imm, info(), M68K_AM_IMMEDIATE, M68K_AM_REG_DIRECT_DATA, M68K_OP_IMM, M68K_REG_D0, cs_m68k_op::reg, and cs_m68k_op::type.

Referenced by d68000_asl_s_16(), d68000_asl_s_32(), d68000_asl_s_8(), d68000_asr_s_16(), d68000_asr_s_32(), d68000_asr_s_8(), d68000_lsl_s_16(), d68000_lsl_s_32(), d68000_lsl_s_8(), d68000_lsr_s_16(), d68000_lsr_s_32(), d68000_lsr_s_8(), d68000_rol_s_16(), d68000_rol_s_32(), d68000_rol_s_8(), d68000_ror_s_16(), d68000_ror_s_32(), d68000_ror_s_8(), d68000_roxl_s_16(), d68000_roxl_s_32(), d68000_roxl_s_8(), d68000_roxr_r_8(), d68000_roxr_s_16(), d68000_roxr_s_32(), and d68000_roxr_s_8().

◆ build_3bit_ea()

static void build_3bit_ea ( m68k_info info,
int  opcode,
int  size 
)
static

Definition at line 628 of file M68KDisassembler.c.

629 {
630  cs_m68k_op* op0;
631  cs_m68k_op* op1;
632  cs_m68k* ext = build_init_op(info, opcode, 2, size);
633 
634  op0 = &ext->operands[0];
635  op1 = &ext->operands[1];
636 
637  op0->type = M68K_OP_IMM;
639  op0->imm = g_3bit_qdata_table[(info->ir >> 9) & 7];
640 
641  get_ea_mode_op(info, op1, info->ir, size);
642 }
static void get_ea_mode_op(m68k_info *info, cs_m68k_op *op, uint32_t instruction, uint32_t size)

References cs_m68k_op::address_mode, build_init_op(), ext, g_3bit_qdata_table, get_ea_mode_op(), cs_m68k_op::imm, info(), M68K_AM_IMMEDIATE, M68K_OP_IMM, and cs_m68k_op::type.

Referenced by d68000_addq_16(), d68000_addq_32(), d68000_addq_8(), d68000_subq_16(), d68000_subq_32(), and d68000_subq_8().

◆ build_absolute_jump_with_immediate()

static void build_absolute_jump_with_immediate ( m68k_info info,
int  opcode,
int  size,
int  immediate 
)
static

Definition at line 752 of file M68KDisassembler.c.

753 {
754  cs_m68k_op* op;
755  cs_m68k* ext = build_init_op(info, opcode, 1, size);
756 
757  op = &ext->operands[0];
758 
759  op->type = M68K_OP_IMM;
760  op->address_mode = M68K_AM_IMMEDIATE;
761  op->imm = immediate;
762 
764 }
ut8 op
Definition: 6502dis.c:13
static void set_insn_group(m68k_info *info, m68k_group_type group)
@ M68K_GRP_JUMP
= CS_GRP_JUMP
Definition: m68k.h:601
Definition: dis.c:32

References build_init_op(), ext, info(), M68K_AM_IMMEDIATE, M68K_GRP_JUMP, M68K_OP_IMM, op, and set_insn_group().

Referenced by build_trap(), d68000_stop(), d68000_trap(), d68010_bkpt(), d68010_rtd(), and d68020_rtm().

◆ build_bcc()

static void build_bcc ( m68k_info info,
int  size,
int  displacement 
)
static

Definition at line 766 of file M68KDisassembler.c.

767 {
768  build_relative_branch(info, s_branch_lut[(info->ir >> 8) & 0xf], size, displacement);
769 }
static void build_relative_branch(m68k_info *info, int opcode, int size, int displacement)
static m68k_insn s_branch_lut[]

References build_relative_branch(), info(), and s_branch_lut.

Referenced by d68000_bcc_16(), d68000_bcc_8(), and d68020_bcc_32().

◆ build_bitfield_ins()

static void build_bitfield_ins ( m68k_info info,
int  opcode,
int  has_d_arg 
)
static

Definition at line 823 of file M68KDisassembler.c.

824 {
825  uint8_t offset;
826  uint8_t width;
827  cs_m68k_op* op_ea;
828  cs_m68k_op* op1;
829  cs_m68k* ext = build_init_op(info, opcode, 1, 0);
830  uint32_t extension = read_imm_16(info);
831 
832  op_ea = &ext->operands[0];
833  op1 = &ext->operands[1];
834 
835  if (BIT_B(extension))
836  offset = (extension >> 6) & 7;
837  else
838  offset = (extension >> 6) & 31;
839 
840  if (BIT_5(extension))
841  width = extension & 7;
842  else
843  width = (uint8_t)g_5bit_data_table[extension & 31];
844 
845  if (has_d_arg) {
846  ext->op_count = 2;
848  op1->reg = M68K_REG_D0 + ((extension >> 12) & 7);
849  }
850 
851  get_ea_mode_op(info, op_ea, info->ir, 1);
852 
853  op_ea->mem.bitfield = 1;
854  op_ea->mem.width = width;
855  op_ea->mem.offset = offset;
856 }
static uint32_t g_5bit_data_table[32]
static unsigned int read_imm_16(m68k_info *info)
#define BIT_5(A)
#define BIT_B(A)
voidpf uLong offset
Definition: ioapi.h:144
unsigned int uint32_t
Definition: sftypes.h:29
unsigned char uint8_t
Definition: sftypes.h:31
m68k_op_mem mem
data when operand is targeting memory
Definition: m68k.h:169
uint8_t width
used for bf* instructions
Definition: m68k.h:135
uint8_t offset
used for bf* instructions
Definition: m68k.h:136
uint8_t bitfield
set to true if the two values below should be used
Definition: m68k.h:134
int width
Definition: main.c:10

References cs_m68k_op::address_mode, BIT_5, BIT_B, m68k_op_mem::bitfield, build_init_op(), ext, g_5bit_data_table, get_ea_mode_op(), info(), M68K_AM_REG_DIRECT_DATA, M68K_REG_D0, cs_m68k_op::mem, m68k_op_mem::offset, read_imm_16(), cs_m68k_op::reg, m68k_op_mem::width, and width.

Referenced by d68020_bfchg(), d68020_bfclr(), d68020_bfexts(), d68020_bfextu(), d68020_bfffo(), d68020_bfins(), d68020_bfset(), and d68020_bftst().

◆ build_cas2()

static void build_cas2 ( m68k_info info,
int  size 
)
static

Definition at line 955 of file M68KDisassembler.c.

956 {
957  uint32_t word3;
958  uint32_t extension;
959  cs_m68k_op* op0;
960  cs_m68k_op* op1;
961  cs_m68k_op* op2;
963  int reg_0, reg_1;
964 
965  /* cas2 is the only 3 words instruction, word2 and word3 have the same motif bits to check */
966  word3 = peek_imm_32(info) & 0xffff;
967  if (!instruction_is_valid(info, word3))
968  return;
969 
970  op0 = &ext->operands[0];
971  op1 = &ext->operands[1];
972  op2 = &ext->operands[2];
973 
974  extension = read_imm_32(info);
975 
976  op0->address_mode = M68K_AM_NONE;
977  op0->type = M68K_OP_REG_PAIR;
978  op0->reg_pair.reg_0 = ((extension >> 16) & 7) + M68K_REG_D0;
979  op0->reg_pair.reg_1 = (extension & 7) + M68K_REG_D0;
980 
981  op1->address_mode = M68K_AM_NONE;
982  op1->type = M68K_OP_REG_PAIR;
983  op1->reg_pair.reg_0 = ((extension >> 22) & 7) + M68K_REG_D0;
984  op1->reg_pair.reg_1 = ((extension >> 6) & 7) + M68K_REG_D0;
985 
986  reg_0 = (extension >> 28) & 7;
987  reg_1 = (extension >> 12) & 7;
988 
989  op2->address_mode = M68K_AM_NONE;
990  op2->type = M68K_OP_REG_PAIR;
991  op2->reg_pair.reg_0 = reg_0 + (BIT_1F(extension) ? 8 : 0) + M68K_REG_D0;
992  op2->reg_pair.reg_1 = reg_1 + (BIT_F(extension) ? 8 : 0) + M68K_REG_D0;
993 }
#define BIT_1F(A)
static int instruction_is_valid(m68k_info *info, const unsigned int word_check)
static unsigned int read_imm_32(m68k_info *info)
#define BIT_F(A)
static unsigned int peek_imm_32(const m68k_info *info)
@ M68K_AM_NONE
No address mode.
Definition: m68k.h:80
@ M68K_OP_REG_PAIR
Register pair in the same op (upper 4 bits for first reg, lower for second)
Definition: m68k.h:120
@ M68K_INS_CAS2
Definition: m68k.h:264
m68k_reg reg_1
Definition: m68k.h:156
m68k_reg reg_0
Definition: m68k.h:155
cs_m68k_op_reg_pair reg_pair
register pair in one operand
Definition: m68k.h:166

References cs_m68k_op::address_mode, BIT_1F, BIT_F, build_init_op(), ext, info(), instruction_is_valid(), M68K_AM_NONE, M68K_INS_CAS2, M68K_OP_REG_PAIR, M68K_REG_D0, peek_imm_32(), read_imm_32(), cs_m68k_op_reg_pair::reg_0, cs_m68k_op_reg_pair::reg_1, cs_m68k_op::reg_pair, and cs_m68k_op::type.

Referenced by d68020_cas2_16(), and d68020_cas2_32().

◆ build_chk2_cmp2()

static void build_chk2_cmp2 ( m68k_info info,
int  size 
)
static

Definition at line 995 of file M68KDisassembler.c.

996 {
997  cs_m68k_op* op0;
998  cs_m68k_op* op1;
1000 
1001  uint32_t extension = read_imm_16(info);
1002 
1003  if (BIT_B(extension))
1005  else
1007 
1008  op0 = &ext->operands[0];
1009  op1 = &ext->operands[1];
1010 
1011  get_ea_mode_op(info, op0, info->ir, size);
1012 
1013  op1->address_mode = M68K_AM_NONE;
1014  op1->type = M68K_OP_REG;
1015  op1->reg = (BIT_F(extension) ? M68K_REG_A0 : M68K_REG_D0) + ((extension >> 12) & 7);
1016 }
void MCInst_setOpcode(MCInst *inst, unsigned Op)
Definition: MCInst.c:58
@ M68K_OP_REG
= CS_OP_REG (Register operand).
Definition: m68k.h:114
@ M68K_INS_CMP2
Definition: m68k.h:272
@ M68K_INS_CHK2
Definition: m68k.h:266
@ M68K_REG_A0
Definition: m68k.h:32

References cs_m68k_op::address_mode, BIT_B, BIT_F, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_NONE, M68K_INS_CHK2, M68K_INS_CMP2, M68K_OP_REG, M68K_REG_A0, M68K_REG_D0, MCInst_setOpcode(), read_imm_16(), cs_m68k_op::reg, and cs_m68k_op::type.

Referenced by d68020_chk2_cmp2_16(), d68020_chk2_cmp2_32(), and d68020_chk2_cmp2_8().

◆ build_cpush_cinv()

static void build_cpush_cinv ( m68k_info info,
int  op_offset 
)
static

Definition at line 1057 of file M68KDisassembler.c.

1058 {
1059  cs_m68k_op* op0;
1060  cs_m68k_op* op1;
1062 
1063  switch ((info->ir >> 3) & 3) { // scope
1064  // Invalid
1065  case 0:
1067  return;
1068  // Line
1069  case 1:
1070  MCInst_setOpcode(info->inst, op_offset + 0);
1071  break;
1072  // Page
1073  case 2:
1074  MCInst_setOpcode(info->inst, op_offset + 1);
1075  break;
1076  // All
1077  case 3:
1078  ext->op_count = 1;
1079  MCInst_setOpcode(info->inst, op_offset + 2);
1080  break;
1081  }
1082 
1083  op0 = &ext->operands[0];
1084  op1 = &ext->operands[1];
1085 
1087  op0->type = M68K_OP_IMM;
1088  op0->imm = (info->ir >> 6) & 3;
1089 
1090  op1->type = M68K_OP_MEM;
1092  op1->imm = M68K_REG_A0 + (info->ir & 7);
1093 }
static void d68000_invalid(m68k_info *info)
@ M68K_AM_REG_DIRECT_ADDR
Register Direct - Address.
Definition: m68k.h:83
@ M68K_OP_MEM
= CS_OP_MEM (Memory operand).
Definition: m68k.h:116
@ M68K_INS_INVALID
Definition: m68k.h:219

References cs_m68k_op::address_mode, build_init_op(), d68000_invalid(), ext, cs_m68k_op::imm, info(), M68K_AM_IMMEDIATE, M68K_AM_REG_DIRECT_ADDR, M68K_INS_INVALID, M68K_OP_IMM, M68K_OP_MEM, M68K_REG_A0, MCInst_setOpcode(), and cs_m68k_op::type.

Referenced by d68040_cinv(), and d68040_cpush().

◆ build_d()

static void build_d ( m68k_info info,
int  opcode,
int  size 
)
static

Definition at line 858 of file M68KDisassembler.c.

859 {
860  cs_m68k* ext = build_init_op(info, opcode, 1, size);
861  cs_m68k_op* op;
862 
863  op = &ext->operands[0];
864 
865  op->address_mode = M68K_AM_REG_DIRECT_DATA;
866  op->reg = M68K_REG_D0 + (info->ir & 7);
867 }

References build_init_op(), ext, info(), M68K_AM_REG_DIRECT_DATA, M68K_REG_D0, and op.

Referenced by d68000_ext_16(), d68000_ext_32(), d68000_swap(), and d68020_extb_32().

◆ build_d_d_ea()

static void build_d_d_ea ( m68k_info info,
int  opcode,
int  size 
)
static

Definition at line 802 of file M68KDisassembler.c.

803 {
804  cs_m68k_op* op0;
805  cs_m68k_op* op1;
806  cs_m68k_op* op2;
807  uint32_t extension = read_imm_16(info);
808  cs_m68k* ext = build_init_op(info, opcode, 3, size);
809 
810  op0 = &ext->operands[0];
811  op1 = &ext->operands[1];
812  op2 = &ext->operands[2];
813 
815  op0->reg = M68K_REG_D0 + (extension & 7);
816 
818  op1->reg = M68K_REG_D0 + ((extension >> 6) & 7);
819 
820  get_ea_mode_op(info, op2, info->ir, size);
821 }

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_REG_DIRECT_DATA, M68K_REG_D0, read_imm_16(), and cs_m68k_op::reg.

Referenced by d68020_cas_16(), d68020_cas_32(), and d68020_cas_8().

◆ build_dbcc()

static void build_dbcc ( m68k_info info,
int  size,
int  displacement 
)
static

Definition at line 797 of file M68KDisassembler.c.

798 {
799  build_dbxx(info, s_dbcc_lut[(info->ir >> 8) & 0xf], size, displacement);
800 }
static void build_dbxx(m68k_info *info, int opcode, int size, int displacement)
static m68k_insn s_dbcc_lut[]

References build_dbxx(), info(), and s_dbcc_lut.

Referenced by d68000_dbcc().

◆ build_dbxx()

static void build_dbxx ( m68k_info info,
int  opcode,
int  size,
int  displacement 
)
static

Definition at line 776 of file M68KDisassembler.c.

777 {
778  cs_m68k_op* op0;
779  cs_m68k_op* op1;
780  cs_m68k* ext = build_init_op(info, opcode, 2, size);
781 
782  op0 = &ext->operands[0];
783  op1 = &ext->operands[1];
784 
786  op0->reg = M68K_REG_D0 + (info->ir & 7);
787 
788  op1->type = M68K_OP_BR_DISP;
790  op1->br_disp.disp = displacement;
792 
795 }
@ M68K_AM_BRANCH_DISPLACEMENT
Address as displacement from (PC+2) used by branches.
Definition: m68k.h:108
@ M68K_GRP_BRANCH_RELATIVE
= CS_GRP_BRANCH_RELATIVE
Definition: m68k.h:604
@ M68K_OP_BR_DISP
Branch displacement.
Definition: m68k.h:121
@ M68K_OP_BR_DISP_SIZE_LONG
signed 32-bit displacement
Definition: m68k.h:145
m68k_op_br_disp br_disp
data when operand is a branch displacement
Definition: m68k.h:170
int32_t disp
displacement value
Definition: m68k.h:149
uint8_t disp_size
Size from m68k_op_br_disp_size type above.
Definition: m68k.h:150

References cs_m68k_op::address_mode, cs_m68k_op::br_disp, build_init_op(), m68k_op_br_disp::disp, m68k_op_br_disp::disp_size, ext, info(), M68K_AM_BRANCH_DISPLACEMENT, M68K_AM_REG_DIRECT_DATA, M68K_GRP_BRANCH_RELATIVE, M68K_GRP_JUMP, M68K_OP_BR_DISP, M68K_OP_BR_DISP_SIZE_LONG, M68K_REG_D0, cs_m68k_op::reg, set_insn_group(), and cs_m68k_op::type.

Referenced by build_dbcc(), and d68000_dbra().

◆ build_ea()

◆ build_ea_a()

static void build_ea_a ( m68k_info info,
int  opcode,
uint8_t  size 
)
static

Definition at line 675 of file M68KDisassembler.c.

676 {
677  cs_m68k_op* op0;
678  cs_m68k_op* op1;
679  cs_m68k* ext = build_init_op(info, opcode, 2, size);
680 
681  op0 = &ext->operands[0];
682  op1 = &ext->operands[1];
683 
684  get_ea_mode_op(info, op0, info->ir, size);
685 
687  op1->reg = M68K_REG_A0 + ((info->ir >> 9) & 7);
688 }

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_REG_DIRECT_ADDR, M68K_REG_A0, and cs_m68k_op::reg.

Referenced by d68000_adda_16(), d68000_adda_32(), d68000_cmpa_16(), d68000_cmpa_32(), d68000_lea(), d68000_movea_16(), d68000_movea_32(), d68000_suba_16(), and d68000_suba_32().

◆ build_ea_ea()

static void build_ea_ea ( m68k_info info,
int  opcode,
int  size 
)
static

Definition at line 690 of file M68KDisassembler.c.

691 {
692  cs_m68k_op* op0;
693  cs_m68k_op* op1;
694  cs_m68k* ext = build_init_op(info, opcode, 2, size);
695 
696  op0 = &ext->operands[0];
697  op1 = &ext->operands[1];
698 
699  get_ea_mode_op(info, op0, info->ir, size);
700  get_ea_mode_op(info, op1, (((info->ir>>9) & 7) | ((info->ir>>3) & 0x38)), size);
701 }

References build_init_op(), ext, get_ea_mode_op(), and info().

Referenced by d68000_move_16(), d68000_move_32(), and d68000_move_8().

◆ build_er_1()

static void build_er_1 ( m68k_info info,
int  opcode,
uint8_t  size 
)
static

◆ build_er_gen_1()

static void build_er_gen_1 ( m68k_info info,
bool  isDreg,
int  opcode,
uint8_t  size 
)
static

Definition at line 534 of file M68KDisassembler.c.

535 {
536  cs_m68k_op* op0;
537  cs_m68k_op* op1;
538  cs_m68k* ext = build_init_op(info, opcode, 2, size);
539 
540  op0 = &ext->operands[0];
541  op1 = &ext->operands[1];
542 
543  get_ea_mode_op(info, op0, info->ir, size);
544 
545  if (isDreg) {
547  op1->reg = M68K_REG_D0 + ((info->ir >> 9) & 7);
548  } else {
550  op1->reg = M68K_REG_A0 + ((info->ir >> 9) & 7);
551  }
552 }

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_REG_DIRECT_ADDR, M68K_AM_REG_DIRECT_DATA, M68K_REG_A0, M68K_REG_D0, and cs_m68k_op::reg.

Referenced by build_er_1().

◆ build_illegal()

static void build_illegal ( m68k_info info,
int  data 
)
static

Definition at line 945 of file M68KDisassembler.c.

946 {
948 }
static void build_imm(m68k_info *info, int opcode, int data)
@ M68K_INS_ILLEGAL
Definition: m68k.h:493

References build_imm(), info(), and M68K_INS_ILLEGAL.

Referenced by d68000_illegal().

◆ build_imm()

static void build_imm ( m68k_info info,
int  opcode,
int  data 
)
static

Definition at line 931 of file M68KDisassembler.c.

932 {
933  cs_m68k_op* op;
934  cs_m68k* ext = build_init_op(info, opcode, 1, 0);
935 
936  MCInst_setOpcode(info->inst, opcode);
937 
938  op = &ext->operands[0];
939 
940  op->type = M68K_OP_IMM;
941  op->address_mode = M68K_AM_IMMEDIATE;
942  op->imm = data;
943 }

References build_init_op(), ext, info(), M68K_AM_IMMEDIATE, M68K_OP_IMM, MCInst_setOpcode(), and op.

Referenced by build_illegal(), and build_invalid().

◆ build_imm_ea()

◆ build_imm_special_reg()

static void build_imm_special_reg ( m68k_info info,
int  opcode,
int  imm,
int  size,
m68k_reg  reg 
)
static

Definition at line 719 of file M68KDisassembler.c.

720 {
721  cs_m68k_op* op0;
722  cs_m68k_op* op1;
723  cs_m68k* ext = build_init_op(info, opcode, 2, size);
724 
725  op0 = &ext->operands[0];
726  op1 = &ext->operands[1];
727 
728  op0->type = M68K_OP_IMM;
730  op0->imm = imm;
731 
732  op1->address_mode = M68K_AM_NONE;
733  op1->reg = reg;
734 }

References cs_m68k_op::address_mode, build_init_op(), ext, imm, cs_m68k_op::imm, info(), M68K_AM_IMMEDIATE, M68K_AM_NONE, M68K_OP_IMM, reg, cs_m68k_op::reg, and cs_m68k_op::type.

Referenced by d68000_andi_to_ccr(), d68000_andi_to_sr(), d68000_eori_to_ccr(), d68000_eori_to_sr(), d68000_ori_to_ccr(), and d68000_ori_to_sr().

◆ build_init_op()

static cs_m68k* build_init_op ( m68k_info info,
int  opcode,
int  count,
int  size 
)
static

Definition at line 494 of file M68KDisassembler.c.

495 {
496  cs_m68k* ext;
497 
498  MCInst_setOpcode(info->inst, opcode);
499 
500  ext = &info->extension;
501 
502  ext->op_count = (uint8_t)count;
503  ext->op_size.type = M68K_SIZE_TYPE_CPU;
504  ext->op_size.cpu_size = size;
505 
506  return ext;
507 }
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
Definition: sflib.h:98
@ M68K_SIZE_TYPE_CPU
Definition: m68k.h:196

References count, ext, info(), M68K_SIZE_TYPE_CPU, and MCInst_setOpcode().

Referenced by build_3bit_d(), build_3bit_ea(), build_absolute_jump_with_immediate(), build_bitfield_ins(), build_cas2(), build_chk2_cmp2(), build_cpush_cinv(), build_d(), build_d_d_ea(), build_dbxx(), build_ea(), build_ea_a(), build_ea_ea(), build_er_gen_1(), build_imm(), build_imm_ea(), build_imm_special_reg(), build_link(), build_mm(), build_move16(), build_movem_er(), build_movem_re(), build_movep_er(), build_movep_re(), build_moves(), build_pi_pi(), build_r(), build_re_gen_1(), build_relative_branch(), build_rr(), d68000_exg_aa(), d68000_exg_da(), d68000_jmp(), d68000_jsr(), d68000_move_fr_sr(), d68000_move_fr_usp(), d68000_move_to_ccr(), d68000_move_to_sr(), d68000_move_to_usp(), d68000_moveq(), d68000_scc(), d68000_unlk(), d68010_move_fr_ccr(), d68010_movec(), d68020_cpbcc_16(), d68020_cpbcc_32(), d68020_cpdbcc(), d68020_cpgen(), d68020_cprestore(), d68020_cpsave(), d68020_cpscc(), d68020_cptrapcc_0(), d68020_cptrapcc_16(), d68020_cptrapcc_32(), d68020_divl(), d68020_mull(), fmove_fpcr(), and fmovem().

◆ build_invalid()

static void build_invalid ( m68k_info info,
int  data 
)
static

Definition at line 950 of file M68KDisassembler.c.

951 {
953 }

References build_imm(), info(), and M68K_INS_INVALID.

Referenced by d68000_1010(), d68000_1111(), and d68000_invalid().

◆ build_link()

static void build_link ( m68k_info info,
int  disp,
int  size 
)
static

Definition at line 1040 of file M68KDisassembler.c.

1041 {
1042  cs_m68k_op* op0;
1043  cs_m68k_op* op1;
1045 
1046  op0 = &ext->operands[0];
1047  op1 = &ext->operands[1];
1048 
1049  op0->address_mode = M68K_AM_NONE;
1050  op0->reg = M68K_REG_A0 + (info->ir & 7);
1051 
1053  op1->type = M68K_OP_IMM;
1054  op1->imm = disp;
1055 }
@ M68K_INS_LINK
Definition: m68k.h:497

References cs_m68k_op::address_mode, build_init_op(), ext, cs_m68k_op::imm, info(), M68K_AM_IMMEDIATE, M68K_AM_NONE, M68K_INS_LINK, M68K_OP_IMM, M68K_REG_A0, cs_m68k_op::reg, and cs_m68k_op::type.

Referenced by d68000_link_16(), and d68020_link_32().

◆ build_mm()

static void build_mm ( m68k_info info,
int  opcode,
uint8_t  size,
int  imm 
)
static

Definition at line 644 of file M68KDisassembler.c.

645 {
646  cs_m68k_op* op0;
647  cs_m68k_op* op1;
648  cs_m68k_op* op2;
649  cs_m68k* ext = build_init_op(info, opcode, 2, size);
650 
651  op0 = &ext->operands[0];
652  op1 = &ext->operands[1];
653  op2 = &ext->operands[2];
654 
656  op0->reg = M68K_REG_A0 + (info->ir & 7);
657 
659  op1->reg = M68K_REG_A0 + ((info->ir >> 9) & 7);
660 
661  if (imm > 0) {
662  ext->op_count = 3;
663  op2->type = M68K_OP_IMM;
664  op2->address_mode = M68K_AM_IMMEDIATE;
665  op2->imm = imm;
666  }
667 }
@ M68K_AM_REGI_ADDR_PRE_DEC
Register Indirect - Address with Predecrement.
Definition: m68k.h:87

References cs_m68k_op::address_mode, build_init_op(), ext, imm, cs_m68k_op::imm, info(), M68K_AM_IMMEDIATE, M68K_AM_REGI_ADDR_PRE_DEC, M68K_OP_IMM, M68K_REG_A0, cs_m68k_op::reg, and cs_m68k_op::type.

Referenced by d68000_abcd_mm(), d68000_addx_mm_16(), d68000_addx_mm_32(), d68000_addx_mm_8(), d68000_sbcd_mm(), d68000_subx_mm_16(), d68000_subx_mm_32(), d68000_subx_mm_8(), d68020_pack_mm(), and d68020_unpk_mm().

◆ build_move16()

static void build_move16 ( m68k_info info,
int  data[2],
int  modes[2] 
)
static

Definition at line 1018 of file M68KDisassembler.c.

1019 {
1021  int i;
1022 
1023  for (i = 0; i < 2; ++i) {
1024  cs_m68k_op* op = &ext->operands[i];
1025  const int d = data[i];
1026  const int m = modes[i];
1027 
1028  op->type = M68K_OP_MEM;
1029 
1031  op->address_mode = m;
1032  op->reg = M68K_REG_A0 + d;
1033  } else {
1034  op->address_mode = m;
1035  op->imm = d;
1036  }
1037  }
1038 }
lzma_index ** i
Definition: index.h:629
@ M68K_AM_REGI_ADDR_POST_INC
Register Indirect - Address with Postincrement.
Definition: m68k.h:86
@ M68K_INS_MOVE16
Definition: m68k.h:508
#define d(i)
Definition: sha256.c:44

References build_init_op(), d, ext, i, info(), regress::m, M68K_AM_REG_DIRECT_ADDR, M68K_AM_REGI_ADDR_POST_INC, M68K_INS_MOVE16, M68K_OP_MEM, and M68K_REG_A0.

Referenced by d68040_move16_ai_al(), d68040_move16_al_ai(), d68040_move16_al_pi(), d68040_move16_pi_al(), and d68040_move16_pi_pi().

◆ build_movem_er()

static void build_movem_er ( m68k_info info,
int  opcode,
int  size 
)
static

Definition at line 916 of file M68KDisassembler.c.

917 {
918  cs_m68k_op* op0;
919  cs_m68k_op* op1;
920  cs_m68k* ext = build_init_op(info, opcode, 2, size);
921 
922  op0 = &ext->operands[0];
923  op1 = &ext->operands[1];
924 
925  op1->type = M68K_OP_REG_BITS;
927 
928  get_ea_mode_op(info, op0, info->ir, size);
929 }
@ M68K_OP_REG_BITS
Register bits move.
Definition: m68k.h:119
uint32_t register_bits
register bits for movem etc. (always in d0-d7, a0-a7, fp0 - fp7 order)
Definition: m68k.h:171

References build_init_op(), ext, get_ea_mode_op(), info(), M68K_OP_REG_BITS, read_imm_16(), cs_m68k_op::register_bits, and cs_m68k_op::type.

Referenced by d68000_movem_er_16(), and d68000_movem_er_32().

◆ build_movem_re()

static void build_movem_re ( m68k_info info,
int  opcode,
int  size 
)
static

Definition at line 898 of file M68KDisassembler.c.

899 {
900  cs_m68k_op* op0;
901  cs_m68k_op* op1;
902  cs_m68k* ext = build_init_op(info, opcode, 2, size);
903 
904  op0 = &ext->operands[0];
905  op1 = &ext->operands[1];
906 
907  op0->type = M68K_OP_REG_BITS;
909 
910  get_ea_mode_op(info, op1, info->ir, size);
911 
914 }
static uint16_t reverse_bits(uint32_t v)

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_REGI_ADDR_PRE_DEC, M68K_OP_REG_BITS, read_imm_16(), cs_m68k_op::register_bits, reverse_bits(), and cs_m68k_op::type.

Referenced by d68000_movem_pd_16(), d68000_movem_pd_32(), d68000_movem_re_16(), and d68000_movem_re_32().

◆ build_movep_er()

static void build_movep_er ( m68k_info info,
int  size 
)
static

Definition at line 1112 of file M68KDisassembler.c.

1113 {
1114  cs_m68k_op* op0;
1115  cs_m68k_op* op1;
1117 
1118  op0 = &ext->operands[0];
1119  op1 = &ext->operands[1];
1120 
1122  op0->type = M68K_OP_MEM;
1123  op0->mem.base_reg = M68K_REG_A0 + (info->ir & 7);
1124  op0->mem.disp = (int16_t)read_imm_16(info);
1125 
1126  op1->reg = M68K_REG_D0 + ((info->ir >> 9) & 7);
1127 }
@ M68K_AM_REGI_ADDR_DISP
Register Indirect - Address with Displacement.
Definition: m68k.h:88
@ M68K_INS_MOVEP
Definition: m68k.h:505
short int16_t
Definition: sftypes.h:34
int16_t disp
displacement value
Definition: m68k.h:132
m68k_reg base_reg
base register (or M68K_REG_INVALID if irrelevant)
Definition: m68k.h:127

References cs_m68k_op::address_mode, m68k_op_mem::base_reg, build_init_op(), m68k_op_mem::disp, ext, info(), M68K_AM_REGI_ADDR_DISP, M68K_INS_MOVEP, M68K_OP_MEM, M68K_REG_A0, M68K_REG_D0, cs_m68k_op::mem, read_imm_16(), cs_m68k_op::reg, and cs_m68k_op::type.

Referenced by d68000_movep_er_16(), and d68000_movep_er_32().

◆ build_movep_re()

static void build_movep_re ( m68k_info info,
int  size 
)
static

Definition at line 1095 of file M68KDisassembler.c.

1096 {
1097  cs_m68k_op* op0;
1098  cs_m68k_op* op1;
1100 
1101  op0 = &ext->operands[0];
1102  op1 = &ext->operands[1];
1103 
1104  op0->reg = M68K_REG_D0 + ((info->ir >> 9) & 7);
1105 
1106  op1->address_mode = M68K_AM_REGI_ADDR_DISP;
1107  op1->type = M68K_OP_MEM;
1108  op1->mem.base_reg = M68K_REG_A0 + (info->ir & 7);
1109  op1->mem.disp = (int16_t)read_imm_16(info);
1110 }

References cs_m68k_op::address_mode, m68k_op_mem::base_reg, build_init_op(), m68k_op_mem::disp, ext, info(), M68K_AM_REGI_ADDR_DISP, M68K_INS_MOVEP, M68K_OP_MEM, M68K_REG_A0, M68K_REG_D0, cs_m68k_op::mem, read_imm_16(), cs_m68k_op::reg, and cs_m68k_op::type.

Referenced by d68000_movep_re_16(), and d68000_movep_re_32().

◆ build_moves()

static void build_moves ( m68k_info info,
int  size 
)
static

Definition at line 1129 of file M68KDisassembler.c.

1130 {
1131  cs_m68k_op* op0;
1132  cs_m68k_op* op1;
1134  uint32_t extension = read_imm_16(info);
1135 
1136  op0 = &ext->operands[0];
1137  op1 = &ext->operands[1];
1138 
1139  if (BIT_B(extension)) {
1140  op0->reg = (BIT_F(extension) ? M68K_REG_A0 : M68K_REG_D0) + ((extension >> 12) & 7);
1141  get_ea_mode_op(info, op1, info->ir, size);
1142  } else {
1143  get_ea_mode_op(info, op0, info->ir, size);
1144  op1->reg = (BIT_F(extension) ? M68K_REG_A0 : M68K_REG_D0) + ((extension >> 12) & 7);
1145  }
1146 }
@ M68K_INS_MOVES
Definition: m68k.h:507

References BIT_B, BIT_F, build_init_op(), ext, get_ea_mode_op(), info(), M68K_INS_MOVES, M68K_REG_A0, M68K_REG_D0, read_imm_16(), and cs_m68k_op::reg.

Referenced by d68010_moves_16(), d68010_moves_32(), and d68010_moves_8().

◆ build_pi_pi()

static void build_pi_pi ( m68k_info info,
int  opcode,
int  size 
)
static

Definition at line 703 of file M68KDisassembler.c.

704 {
705  cs_m68k_op* op0;
706  cs_m68k_op* op1;
707  cs_m68k* ext = build_init_op(info, opcode, 2, size);
708 
709  op0 = &ext->operands[0];
710  op1 = &ext->operands[1];
711 
713  op0->reg = M68K_REG_A0 + (info->ir & 7);
714 
716  op1->reg = M68K_REG_A0 + ((info->ir >> 9) & 7);
717 }

References cs_m68k_op::address_mode, build_init_op(), ext, info(), M68K_AM_REGI_ADDR_POST_INC, M68K_REG_A0, and cs_m68k_op::reg.

Referenced by d68000_cmpm_16(), d68000_cmpm_32(), and d68000_cmpm_8().

◆ build_r()

◆ build_re_1()

static void build_re_1 ( m68k_info info,
int  opcode,
uint8_t  size 
)
static

◆ build_re_gen_1()

static void build_re_gen_1 ( m68k_info info,
bool  isDreg,
int  opcode,
uint8_t  size 
)
static

Definition at line 509 of file M68KDisassembler.c.

510 {
511  cs_m68k_op* op0;
512  cs_m68k_op* op1;
513  cs_m68k* ext = build_init_op(info, opcode, 2, size);
514 
515  op0 = &ext->operands[0];
516  op1 = &ext->operands[1];
517 
518  if (isDreg) {
520  op0->reg = M68K_REG_D0 + ((info->ir >> 9 ) & 7);
521  } else {
523  op0->reg = M68K_REG_A0 + ((info->ir >> 9 ) & 7);
524  }
525 
526  get_ea_mode_op(info, op1, info->ir, size);
527 }

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_REG_DIRECT_ADDR, M68K_AM_REG_DIRECT_DATA, M68K_REG_A0, M68K_REG_D0, and cs_m68k_op::reg.

Referenced by build_re_1().

◆ build_regs_read_write_counts()

static void build_regs_read_write_counts ( m68k_info info)
static

Definition at line 3511 of file M68KDisassembler.c.

3512 {
3513  int i;
3514 
3515  if (!info->extension.op_count)
3516  return;
3517 
3518  if (info->extension.op_count == 1) {
3519  update_op_reg_list(info, &info->extension.operands[0], 1);
3520  } else {
3521  // first operand is always read
3522  update_op_reg_list(info, &info->extension.operands[0], 0);
3523 
3524  // remaning write
3525  for (i = 1; i < info->extension.op_count; ++i)
3526  update_op_reg_list(info, &info->extension.operands[i], 1);
3527  }
3528 }
static void update_op_reg_list(m68k_info *info, cs_m68k_op *op, int write)

References i, info(), and update_op_reg_list().

Referenced by M68K_getInstruction().

◆ build_relative_branch()

static void build_relative_branch ( m68k_info info,
int  opcode,
int  size,
int  displacement 
)
static

Definition at line 736 of file M68KDisassembler.c.

737 {
738  cs_m68k_op* op;
739  cs_m68k* ext = build_init_op(info, opcode, 1, size);
740 
741  op = &ext->operands[0];
742 
743  op->type = M68K_OP_BR_DISP;
744  op->address_mode = M68K_AM_BRANCH_DISPLACEMENT;
745  op->br_disp.disp = displacement;
746  op->br_disp.disp_size = size;
747 
750 }

References build_init_op(), ext, info(), M68K_AM_BRANCH_DISPLACEMENT, M68K_GRP_BRANCH_RELATIVE, M68K_GRP_JUMP, M68K_OP_BR_DISP, op, and set_insn_group().

Referenced by build_bcc(), d68000_bra_16(), d68000_bra_8(), d68000_bsr_16(), d68000_bsr_8(), d68020_bra_32(), and d68020_bsr_32().

◆ build_rr()

static void build_rr ( m68k_info info,
int  opcode,
uint8_t  size,
int  imm 
)
static

Definition at line 554 of file M68KDisassembler.c.

555 {
556  cs_m68k_op* op0;
557  cs_m68k_op* op1;
558  cs_m68k_op* op2;
559  cs_m68k* ext = build_init_op(info, opcode, 2, size);
560 
561  op0 = &ext->operands[0];
562  op1 = &ext->operands[1];
563  op2 = &ext->operands[2];
564 
566  op0->reg = M68K_REG_D0 + (info->ir & 7);
567 
569  op1->reg = M68K_REG_D0 + ((info->ir >> 9) & 7);
570 
571  if (imm > 0) {
572  ext->op_count = 3;
573  op2->type = M68K_OP_IMM;
574  op2->address_mode = M68K_AM_IMMEDIATE;
575  op2->imm = imm;
576  }
577 }

References cs_m68k_op::address_mode, build_init_op(), ext, imm, cs_m68k_op::imm, info(), M68K_AM_IMMEDIATE, M68K_AM_REG_DIRECT_DATA, M68K_OP_IMM, M68K_REG_D0, cs_m68k_op::reg, and cs_m68k_op::type.

Referenced by d68000_abcd_rr(), d68000_addx_rr_16(), d68000_addx_rr_32(), d68000_addx_rr_8(), d68000_sbcd_rr(), d68000_subx_rr_16(), d68000_subx_rr_32(), d68000_subx_rr_8(), d68020_pack_rr(), and d68020_unpk_rr().

◆ build_trap()

static void build_trap ( m68k_info info,
int  size,
int  immediate 
)
static

Definition at line 771 of file M68KDisassembler.c.

772 {
773  build_absolute_jump_with_immediate(info, s_trap_lut[(info->ir >> 8) & 0xf], size, immediate);
774 }
static m68k_insn s_trap_lut[]
static void build_absolute_jump_with_immediate(m68k_info *info, int opcode, int size, int immediate)

References build_absolute_jump_with_immediate(), info(), and s_trap_lut.

Referenced by d68020_trapcc_0(), d68020_trapcc_16(), and d68020_trapcc_32().

◆ d68000_1010()

static void d68000_1010 ( m68k_info info)
static

Definition at line 1202 of file M68KDisassembler.c.

1203 {
1204  build_invalid(info, info->ir);
1205 }
static void build_invalid(m68k_info *info, int data)

References build_invalid(), and info().

◆ d68000_1111()

static void d68000_1111 ( m68k_info info)
static

Definition at line 1207 of file M68KDisassembler.c.

1208 {
1209  build_invalid(info, info->ir);
1210 }

References build_invalid(), and info().

◆ d68000_abcd_mm()

static void d68000_abcd_mm ( m68k_info info)
static

Definition at line 1217 of file M68KDisassembler.c.

1218 {
1219  build_mm(info, M68K_INS_ABCD, 1, 0);
1220 }
static void build_mm(m68k_info *info, int opcode, uint8_t size, int imm)
@ M68K_INS_ABCD
Definition: m68k.h:221

References build_mm(), info(), and M68K_INS_ABCD.

◆ d68000_abcd_rr()

static void d68000_abcd_rr ( m68k_info info)
static

Definition at line 1212 of file M68KDisassembler.c.

1213 {
1214  build_rr(info, M68K_INS_ABCD, 1, 0);
1215 }
static void build_rr(m68k_info *info, int opcode, uint8_t size, int imm)

References build_rr(), info(), and M68K_INS_ABCD.

◆ d68000_add_er_16()

static void d68000_add_er_16 ( m68k_info info)
static

Definition at line 1227 of file M68KDisassembler.c.

1228 {
1230 }
static void build_er_1(m68k_info *info, int opcode, uint8_t size)
@ M68K_INS_ADD
Definition: m68k.h:222

References build_er_1(), info(), and M68K_INS_ADD.

◆ d68000_add_er_32()

static void d68000_add_er_32 ( m68k_info info)
static

Definition at line 1232 of file M68KDisassembler.c.

1233 {
1235 }

References build_er_1(), info(), and M68K_INS_ADD.

◆ d68000_add_er_8()

static void d68000_add_er_8 ( m68k_info info)
static

Definition at line 1222 of file M68KDisassembler.c.

1223 {
1225 }

References build_er_1(), info(), and M68K_INS_ADD.

◆ d68000_add_re_16()

static void d68000_add_re_16 ( m68k_info info)
static

Definition at line 1242 of file M68KDisassembler.c.

1243 {
1245 }
static void build_re_1(m68k_info *info, int opcode, uint8_t size)

References build_re_1(), info(), and M68K_INS_ADD.

◆ d68000_add_re_32()

static void d68000_add_re_32 ( m68k_info info)
static

Definition at line 1247 of file M68KDisassembler.c.

1248 {
1250 }

References build_re_1(), info(), and M68K_INS_ADD.

◆ d68000_add_re_8()

static void d68000_add_re_8 ( m68k_info info)
static

Definition at line 1237 of file M68KDisassembler.c.

1238 {
1240 }

References build_re_1(), info(), and M68K_INS_ADD.

◆ d68000_adda_16()

static void d68000_adda_16 ( m68k_info info)
static

Definition at line 1252 of file M68KDisassembler.c.

1253 {
1255 }
static void build_ea_a(m68k_info *info, int opcode, uint8_t size)
@ M68K_INS_ADDA
Definition: m68k.h:223

References build_ea_a(), info(), and M68K_INS_ADDA.

◆ d68000_adda_32()

static void d68000_adda_32 ( m68k_info info)
static

Definition at line 1257 of file M68KDisassembler.c.

1258 {
1260 }

References build_ea_a(), info(), and M68K_INS_ADDA.

◆ d68000_addi_16()

static void d68000_addi_16 ( m68k_info info)
static

Definition at line 1267 of file M68KDisassembler.c.

1268 {
1270 }
static void build_imm_ea(m68k_info *info, int opcode, uint8_t size, int imm)
@ M68K_INS_ADDI
Definition: m68k.h:224

References build_imm_ea(), info(), M68K_INS_ADDI, and read_imm_16().

◆ d68000_addi_32()

static void d68000_addi_32 ( m68k_info info)
static

Definition at line 1272 of file M68KDisassembler.c.

1273 {
1275 }

References build_imm_ea(), info(), M68K_INS_ADDI, and read_imm_32().

◆ d68000_addi_8()

static void d68000_addi_8 ( m68k_info info)
static

Definition at line 1262 of file M68KDisassembler.c.

1263 {
1265 }
static unsigned int read_imm_8(m68k_info *info)

References build_imm_ea(), info(), M68K_INS_ADDI, and read_imm_8().

◆ d68000_addq_16()

static void d68000_addq_16 ( m68k_info info)
static

Definition at line 1282 of file M68KDisassembler.c.

1283 {
1285 }
static void build_3bit_ea(m68k_info *info, int opcode, int size)
@ M68K_INS_ADDQ
Definition: m68k.h:225

References build_3bit_ea(), info(), and M68K_INS_ADDQ.

◆ d68000_addq_32()

static void d68000_addq_32 ( m68k_info info)
static

Definition at line 1287 of file M68KDisassembler.c.

1288 {
1290 }

References build_3bit_ea(), info(), and M68K_INS_ADDQ.

◆ d68000_addq_8()

static void d68000_addq_8 ( m68k_info info)
static

Definition at line 1277 of file M68KDisassembler.c.

1278 {
1280 }

References build_3bit_ea(), info(), and M68K_INS_ADDQ.

◆ d68000_addx_mm_16()

static void d68000_addx_mm_16 ( m68k_info info)
static

Definition at line 1312 of file M68KDisassembler.c.

1313 {
1314  build_mm(info, M68K_INS_ADDX, 2, 0);
1315 }
@ M68K_INS_ADDX
Definition: m68k.h:226

References build_mm(), info(), and M68K_INS_ADDX.

◆ d68000_addx_mm_32()

static void d68000_addx_mm_32 ( m68k_info info)
static

Definition at line 1317 of file M68KDisassembler.c.

1318 {
1319  build_mm(info, M68K_INS_ADDX, 4, 0);
1320 }

References build_mm(), info(), and M68K_INS_ADDX.

◆ d68000_addx_mm_8()

static void d68000_addx_mm_8 ( m68k_info info)
static

Definition at line 1307 of file M68KDisassembler.c.

1308 {
1309  build_mm(info, M68K_INS_ADDX, 1, 0);
1310 }

References build_mm(), info(), and M68K_INS_ADDX.

◆ d68000_addx_rr_16()

static void d68000_addx_rr_16 ( m68k_info info)
static

Definition at line 1297 of file M68KDisassembler.c.

1298 {
1299  build_rr(info, M68K_INS_ADDX, 2, 0);
1300 }

References build_rr(), info(), and M68K_INS_ADDX.

◆ d68000_addx_rr_32()

static void d68000_addx_rr_32 ( m68k_info info)
static

Definition at line 1302 of file M68KDisassembler.c.

1303 {
1304  build_rr(info, M68K_INS_ADDX, 4, 0);
1305 }

References build_rr(), info(), and M68K_INS_ADDX.

◆ d68000_addx_rr_8()

static void d68000_addx_rr_8 ( m68k_info info)
static

Definition at line 1292 of file M68KDisassembler.c.

1293 {
1294  build_rr(info, M68K_INS_ADDX, 1, 0);
1295 }

References build_rr(), info(), and M68K_INS_ADDX.

◆ d68000_and_er_16()

static void d68000_and_er_16 ( m68k_info info)
static

Definition at line 1327 of file M68KDisassembler.c.

1328 {
1330 }
@ M68K_INS_AND
Definition: m68k.h:227

References build_er_1(), info(), and M68K_INS_AND.

◆ d68000_and_er_32()

static void d68000_and_er_32 ( m68k_info info)
static

Definition at line 1332 of file M68KDisassembler.c.

1333 {
1335 }

References build_er_1(), info(), and M68K_INS_AND.

◆ d68000_and_er_8()

static void d68000_and_er_8 ( m68k_info info)
static

Definition at line 1322 of file M68KDisassembler.c.

1323 {
1325 }

References build_er_1(), info(), and M68K_INS_AND.

◆ d68000_and_re_16()

static void d68000_and_re_16 ( m68k_info info)
static

Definition at line 1342 of file M68KDisassembler.c.

1343 {
1345 }

References build_re_1(), info(), and M68K_INS_AND.

◆ d68000_and_re_32()

static void d68000_and_re_32 ( m68k_info info)
static

Definition at line 1347 of file M68KDisassembler.c.

1348 {
1350 }

References build_re_1(), info(), and M68K_INS_AND.

◆ d68000_and_re_8()

static void d68000_and_re_8 ( m68k_info info)
static

Definition at line 1337 of file M68KDisassembler.c.

1338 {
1340 }

References build_re_1(), info(), and M68K_INS_AND.

◆ d68000_andi_16()

static void d68000_andi_16 ( m68k_info info)
static

Definition at line 1357 of file M68KDisassembler.c.

1358 {
1360 }
@ M68K_INS_ANDI
Definition: m68k.h:228

References build_imm_ea(), info(), M68K_INS_ANDI, and read_imm_16().

◆ d68000_andi_32()

static void d68000_andi_32 ( m68k_info info)
static

Definition at line 1362 of file M68KDisassembler.c.

1363 {
1365 }

References build_imm_ea(), info(), M68K_INS_ANDI, and read_imm_32().

◆ d68000_andi_8()

static void d68000_andi_8 ( m68k_info info)
static

Definition at line 1352 of file M68KDisassembler.c.

1353 {
1355 }

References build_imm_ea(), info(), M68K_INS_ANDI, and read_imm_8().

◆ d68000_andi_to_ccr()

static void d68000_andi_to_ccr ( m68k_info info)
static

Definition at line 1367 of file M68KDisassembler.c.

1368 {
1370 }
static void build_imm_special_reg(m68k_info *info, int opcode, int imm, int size, m68k_reg reg)
@ M68K_REG_CCR
Definition: m68k.h:53

References build_imm_special_reg(), info(), M68K_INS_ANDI, M68K_REG_CCR, and read_imm_8().

◆ d68000_andi_to_sr()

static void d68000_andi_to_sr ( m68k_info info)
static

Definition at line 1372 of file M68KDisassembler.c.

1373 {
1375 }
@ M68K_REG_SR
Definition: m68k.h:52

References build_imm_special_reg(), info(), M68K_INS_ANDI, M68K_REG_SR, and read_imm_16().

◆ d68000_asl_ea()

static void d68000_asl_ea ( m68k_info info)
static

Definition at line 1442 of file M68KDisassembler.c.

1443 {
1444  build_ea(info, M68K_INS_ASL, 2);
1445 }
static void build_ea(m68k_info *info, int opcode, uint8_t size)
@ M68K_INS_ASL
Definition: m68k.h:229

References build_ea(), info(), and M68K_INS_ASL.

◆ d68000_asl_r_16()

static void d68000_asl_r_16 ( m68k_info info)
static

Definition at line 1432 of file M68KDisassembler.c.

1433 {
1434  build_r(info, M68K_INS_ASL, 2);
1435 }
static void build_r(m68k_info *info, int opcode, uint8_t size)

References build_r(), info(), and M68K_INS_ASL.

◆ d68000_asl_r_32()

static void d68000_asl_r_32 ( m68k_info info)
static

Definition at line 1437 of file M68KDisassembler.c.

1438 {
1439  build_r(info, M68K_INS_ASL, 4);
1440 }

References build_r(), info(), and M68K_INS_ASL.

◆ d68000_asl_r_8()

static void d68000_asl_r_8 ( m68k_info info)
static

Definition at line 1427 of file M68KDisassembler.c.

1428 {
1429  build_r(info, M68K_INS_ASL, 1);
1430 }

References build_r(), info(), and M68K_INS_ASL.

◆ d68000_asl_s_16()

static void d68000_asl_s_16 ( m68k_info info)
static

Definition at line 1417 of file M68KDisassembler.c.

1418 {
1420 }
static void build_3bit_d(m68k_info *info, int opcode, int size)

References build_3bit_d(), info(), and M68K_INS_ASL.

◆ d68000_asl_s_32()

static void d68000_asl_s_32 ( m68k_info info)
static

Definition at line 1422 of file M68KDisassembler.c.

1423 {
1425 }

References build_3bit_d(), info(), and M68K_INS_ASL.

◆ d68000_asl_s_8()

static void d68000_asl_s_8 ( m68k_info info)
static

Definition at line 1412 of file M68KDisassembler.c.

1413 {
1415 }

References build_3bit_d(), info(), and M68K_INS_ASL.

◆ d68000_asr_ea()

static void d68000_asr_ea ( m68k_info info)
static

Definition at line 1407 of file M68KDisassembler.c.

1408 {
1409  build_ea(info, M68K_INS_ASR, 2);
1410 }
@ M68K_INS_ASR
Definition: m68k.h:230

References build_ea(), info(), and M68K_INS_ASR.

◆ d68000_asr_r_16()

static void d68000_asr_r_16 ( m68k_info info)
static

Definition at line 1397 of file M68KDisassembler.c.

1398 {
1399  build_r(info, M68K_INS_ASR, 2);
1400 }

References build_r(), info(), and M68K_INS_ASR.

◆ d68000_asr_r_32()

static void d68000_asr_r_32 ( m68k_info info)
static

Definition at line 1402 of file M68KDisassembler.c.

1403 {
1404  build_r(info, M68K_INS_ASR, 4);
1405 }

References build_r(), info(), and M68K_INS_ASR.

◆ d68000_asr_r_8()

static void d68000_asr_r_8 ( m68k_info info)
static

Definition at line 1392 of file M68KDisassembler.c.

1393 {
1394  build_r(info, M68K_INS_ASR, 1);
1395 }

References build_r(), info(), and M68K_INS_ASR.

◆ d68000_asr_s_16()

static void d68000_asr_s_16 ( m68k_info info)
static

Definition at line 1382 of file M68KDisassembler.c.

1383 {
1385 }

References build_3bit_d(), info(), and M68K_INS_ASR.

◆ d68000_asr_s_32()

static void d68000_asr_s_32 ( m68k_info info)
static

Definition at line 1387 of file M68KDisassembler.c.

1388 {
1390 }

References build_3bit_d(), info(), and M68K_INS_ASR.

◆ d68000_asr_s_8()

static void d68000_asr_s_8 ( m68k_info info)
static

Definition at line 1377 of file M68KDisassembler.c.

1378 {
1380 }

References build_3bit_d(), info(), and M68K_INS_ASR.

◆ d68000_bcc_16()

static void d68000_bcc_16 ( m68k_info info)
static

Definition at line 1452 of file M68KDisassembler.c.

1453 {
1455 }
static int make_int_16(int value)
static void build_bcc(m68k_info *info, int size, int displacement)

References build_bcc(), info(), make_int_16(), and read_imm_16().

◆ d68000_bcc_8()

static void d68000_bcc_8 ( m68k_info info)
static

Definition at line 1447 of file M68KDisassembler.c.

1448 {
1449  build_bcc(info, 1, make_int_8(info->ir));
1450 }
static int make_int_8(int value)

References build_bcc(), info(), and make_int_8().

◆ d68000_bchg_r()

static void d68000_bchg_r ( m68k_info info)
static

Definition at line 1463 of file M68KDisassembler.c.

1464 {
1466 }
@ M68K_INS_BCHG
Definition: m68k.h:249

References build_re_1(), info(), and M68K_INS_BCHG.

◆ d68000_bchg_s()

static void d68000_bchg_s ( m68k_info info)
static

Definition at line 1468 of file M68KDisassembler.c.

1469 {
1471 }

References build_imm_ea(), info(), M68K_INS_BCHG, and read_imm_8().

◆ d68000_bclr_r()

static void d68000_bclr_r ( m68k_info info)
static

Definition at line 1473 of file M68KDisassembler.c.

1474 {
1476 }
@ M68K_INS_BCLR
Definition: m68k.h:250

References build_re_1(), info(), and M68K_INS_BCLR.

◆ d68000_bclr_s()

static void d68000_bclr_s ( m68k_info info)
static

Definition at line 1478 of file M68KDisassembler.c.

1479 {
1481 }

References build_imm_ea(), info(), M68K_INS_BCLR, and read_imm_8().

◆ d68000_bra_16()

static void d68000_bra_16 ( m68k_info info)
static

Definition at line 1551 of file M68KDisassembler.c.

1552 {
1554 }
@ M68K_INS_BRA
Definition: m68k.h:247

References build_relative_branch(), info(), M68K_INS_BRA, make_int_16(), and read_imm_16().

◆ d68000_bra_8()

static void d68000_bra_8 ( m68k_info info)
static

Definition at line 1546 of file M68KDisassembler.c.

1547 {
1549 }

References build_relative_branch(), info(), M68K_INS_BRA, and make_int_8().

◆ d68000_bset_r()

static void d68000_bset_r ( m68k_info info)
static

Definition at line 1562 of file M68KDisassembler.c.

1563 {
1565 }
@ M68K_INS_BSET
Definition: m68k.h:251

References build_re_1(), info(), and M68K_INS_BSET.

◆ d68000_bset_s()

static void d68000_bset_s ( m68k_info info)
static

Definition at line 1567 of file M68KDisassembler.c.

1568 {
1570 }

References build_imm_ea(), info(), M68K_INS_BSET, and read_imm_8().

◆ d68000_bsr_16()

static void d68000_bsr_16 ( m68k_info info)
static

Definition at line 1577 of file M68KDisassembler.c.

1578 {
1580 }
@ M68K_INS_BSR
Definition: m68k.h:248

References build_relative_branch(), info(), M68K_INS_BSR, make_int_16(), and read_imm_16().

◆ d68000_bsr_8()

static void d68000_bsr_8 ( m68k_info info)
static

Definition at line 1572 of file M68KDisassembler.c.

1573 {
1575 }

References build_relative_branch(), info(), M68K_INS_BSR, and make_int_8().

◆ d68000_btst_r()

static void d68000_btst_r ( m68k_info info)
static

Definition at line 1588 of file M68KDisassembler.c.

1589 {
1591 }
@ M68K_INS_BTST
Definition: m68k.h:252

References build_re_1(), info(), and M68K_INS_BTST.

◆ d68000_btst_s()

static void d68000_btst_s ( m68k_info info)
static

Definition at line 1593 of file M68KDisassembler.c.

1594 {
1596 }

References build_imm_ea(), info(), M68K_INS_BTST, and read_imm_8().

◆ d68000_chk_16()

static void d68000_chk_16 ( m68k_info info)
static

Definition at line 1632 of file M68KDisassembler.c.

1633 {
1635 }
@ M68K_INS_CHK
Definition: m68k.h:265

References build_er_1(), info(), and M68K_INS_CHK.

◆ d68000_clr_16()

static void d68000_clr_16 ( m68k_info info)
static

Definition at line 1672 of file M68KDisassembler.c.

1673 {
1674  build_ea(info, M68K_INS_CLR, 2);
1675 }
@ M68K_INS_CLR
Definition: m68k.h:267

References build_ea(), info(), and M68K_INS_CLR.

◆ d68000_clr_32()

static void d68000_clr_32 ( m68k_info info)
static

Definition at line 1677 of file M68KDisassembler.c.

1678 {
1679  build_ea(info, M68K_INS_CLR, 4);
1680 }

References build_ea(), info(), and M68K_INS_CLR.

◆ d68000_clr_8()

static void d68000_clr_8 ( m68k_info info)
static

Definition at line 1667 of file M68KDisassembler.c.

1668 {
1669  build_ea(info, M68K_INS_CLR, 1);
1670 }

References build_ea(), info(), and M68K_INS_CLR.

◆ d68000_cmp_16()

static void d68000_cmp_16 ( m68k_info info)
static

Definition at line 1687 of file M68KDisassembler.c.

1688 {
1690 }
@ M68K_INS_CMP
Definition: m68k.h:268

References build_er_1(), info(), and M68K_INS_CMP.

◆ d68000_cmp_32()

static void d68000_cmp_32 ( m68k_info info)
static

Definition at line 1692 of file M68KDisassembler.c.

1693 {
1695 }

References build_er_1(), info(), and M68K_INS_CMP.

◆ d68000_cmp_8()

static void d68000_cmp_8 ( m68k_info info)
static

Definition at line 1682 of file M68KDisassembler.c.

1683 {
1685 }

References build_er_1(), info(), and M68K_INS_CMP.

◆ d68000_cmpa_16()

static void d68000_cmpa_16 ( m68k_info info)
static

Definition at line 1697 of file M68KDisassembler.c.

1698 {
1700 }
@ M68K_INS_CMPA
Definition: m68k.h:269

References build_ea_a(), info(), and M68K_INS_CMPA.

◆ d68000_cmpa_32()

static void d68000_cmpa_32 ( m68k_info info)
static

Definition at line 1702 of file M68KDisassembler.c.

1703 {
1705 }

References build_ea_a(), info(), and M68K_INS_CMPA.

◆ d68000_cmpi_16()

static void d68000_cmpi_16 ( m68k_info info)
static

Definition at line 1724 of file M68KDisassembler.c.

1725 {
1727 }
@ M68K_INS_CMPI
Definition: m68k.h:270

References build_imm_ea(), info(), M68K_INS_CMPI, and read_imm_16().

◆ d68000_cmpi_32()

static void d68000_cmpi_32 ( m68k_info info)
static

Definition at line 1741 of file M68KDisassembler.c.

1742 {
1744 }

References build_imm_ea(), info(), M68K_INS_CMPI, and read_imm_32().

◆ d68000_cmpi_8()

static void d68000_cmpi_8 ( m68k_info info)
static

Definition at line 1707 of file M68KDisassembler.c.

1708 {
1710 }

References build_imm_ea(), info(), M68K_INS_CMPI, and read_imm_8().

◆ d68000_cmpm_16()

static void d68000_cmpm_16 ( m68k_info info)
static

Definition at line 1763 of file M68KDisassembler.c.

1764 {
1766 }
static void build_pi_pi(m68k_info *info, int opcode, int size)
@ M68K_INS_CMPM
Definition: m68k.h:271

References build_pi_pi(), info(), and M68K_INS_CMPM.

◆ d68000_cmpm_32()

static void d68000_cmpm_32 ( m68k_info info)
static

Definition at line 1768 of file M68KDisassembler.c.

1769 {
1771 }

References build_pi_pi(), info(), and M68K_INS_CMPM.

◆ d68000_cmpm_8()

static void d68000_cmpm_8 ( m68k_info info)
static

Definition at line 1758 of file M68KDisassembler.c.

1759 {
1761 }

References build_pi_pi(), info(), and M68K_INS_CMPM.

◆ d68000_dbcc()

static void d68000_dbcc ( m68k_info info)
static

Definition at line 2199 of file M68KDisassembler.c.

2200 {
2202 }
static void build_dbcc(m68k_info *info, int size, int displacement)

References build_dbcc(), info(), make_int_16(), and read_imm_16().

◆ d68000_dbra()

static void d68000_dbra ( m68k_info info)
static

Definition at line 2194 of file M68KDisassembler.c.

2195 {
2197 }
@ M68K_INS_DBRA
Definition: m68k.h:295

References build_dbxx(), info(), M68K_INS_DBRA, make_int_16(), and read_imm_16().

◆ d68000_divs()

static void d68000_divs ( m68k_info info)
static

Definition at line 2204 of file M68KDisassembler.c.

2205 {
2207 }
@ M68K_INS_DIVS
Definition: m68k.h:296

References build_er_1(), info(), and M68K_INS_DIVS.

◆ d68000_divu()

static void d68000_divu ( m68k_info info)
static

Definition at line 2209 of file M68KDisassembler.c.

2210 {
2212 }
@ M68K_INS_DIVU
Definition: m68k.h:298

References build_er_1(), info(), and M68K_INS_DIVU.

◆ d68000_eor_16()

static void d68000_eor_16 ( m68k_info info)
static

Definition at line 2256 of file M68KDisassembler.c.

2257 {
2259 }
@ M68K_INS_EOR
Definition: m68k.h:300

References build_re_1(), info(), and M68K_INS_EOR.

◆ d68000_eor_32()

static void d68000_eor_32 ( m68k_info info)
static

Definition at line 2261 of file M68KDisassembler.c.

2262 {
2264 }

References build_re_1(), info(), and M68K_INS_EOR.

◆ d68000_eor_8()

static void d68000_eor_8 ( m68k_info info)
static

Definition at line 2251 of file M68KDisassembler.c.

2252 {
2254 }

References build_re_1(), info(), and M68K_INS_EOR.

◆ d68000_eori_16()

static void d68000_eori_16 ( m68k_info info)
static

Definition at line 2271 of file M68KDisassembler.c.

2272 {
2274 }
@ M68K_INS_EORI
Definition: m68k.h:301

References build_imm_ea(), info(), M68K_INS_EORI, and read_imm_16().

◆ d68000_eori_32()

static void d68000_eori_32 ( m68k_info info)
static

Definition at line 2276 of file M68KDisassembler.c.

2277 {
2279 }

References build_imm_ea(), info(), M68K_INS_EORI, and read_imm_32().

◆ d68000_eori_8()

static void d68000_eori_8 ( m68k_info info)
static

Definition at line 2266 of file M68KDisassembler.c.

2267 {
2269 }

References build_imm_ea(), info(), M68K_INS_EORI, and read_imm_8().

◆ d68000_eori_to_ccr()

static void d68000_eori_to_ccr ( m68k_info info)
static

◆ d68000_eori_to_sr()

static void d68000_eori_to_sr ( m68k_info info)
static

◆ d68000_exg_aa()

static void d68000_exg_aa ( m68k_info info)
static

Definition at line 2296 of file M68KDisassembler.c.

2297 {
2298  cs_m68k_op* op0;
2299  cs_m68k_op* op1;
2301 
2302  op0 = &ext->operands[0];
2303  op1 = &ext->operands[1];
2304 
2305  op0->address_mode = M68K_AM_NONE;
2306  op0->reg = M68K_REG_A0 + ((info->ir >> 9) & 7);
2307 
2308  op1->address_mode = M68K_AM_NONE;
2309  op1->reg = M68K_REG_A0 + (info->ir & 7);
2310 }
@ M68K_INS_EXG
Definition: m68k.h:302

References cs_m68k_op::address_mode, build_init_op(), ext, info(), M68K_AM_NONE, M68K_INS_EXG, M68K_REG_A0, and cs_m68k_op::reg.

◆ d68000_exg_da()

static void d68000_exg_da ( m68k_info info)
static

Definition at line 2312 of file M68KDisassembler.c.

2313 {
2314  cs_m68k_op* op0;
2315  cs_m68k_op* op1;
2317 
2318  op0 = &ext->operands[0];
2319  op1 = &ext->operands[1];
2320 
2321  op0->address_mode = M68K_AM_NONE;
2322  op0->reg = M68K_REG_D0 + ((info->ir >> 9) & 7);
2323 
2324  op1->address_mode = M68K_AM_NONE;
2325  op1->reg = M68K_REG_A0 + (info->ir & 7);
2326 }

References cs_m68k_op::address_mode, build_init_op(), ext, info(), M68K_AM_NONE, M68K_INS_EXG, M68K_REG_A0, M68K_REG_D0, and cs_m68k_op::reg.

◆ d68000_exg_dd()

static void d68000_exg_dd ( m68k_info info)
static

Definition at line 2291 of file M68KDisassembler.c.

2292 {
2293  build_r(info, M68K_INS_EXG, 4);
2294 }

References build_r(), info(), and M68K_INS_EXG.

◆ d68000_ext_16()

static void d68000_ext_16 ( m68k_info info)
static

Definition at line 2328 of file M68KDisassembler.c.

2329 {
2330  build_d(info, M68K_INS_EXT, 2);
2331 }
static void build_d(m68k_info *info, int opcode, int size)
@ M68K_INS_EXT
Definition: m68k.h:303

References build_d(), info(), and M68K_INS_EXT.

◆ d68000_ext_32()

static void d68000_ext_32 ( m68k_info info)
static

Definition at line 2333 of file M68KDisassembler.c.

2334 {
2335  build_d(info, M68K_INS_EXT, 4);
2336 }

References build_d(), info(), and M68K_INS_EXT.

◆ d68000_illegal()

static void d68000_illegal ( m68k_info info)
static

Definition at line 1197 of file M68KDisassembler.c.

1198 {
1199  build_illegal(info, info->ir);
1200 }
static void build_illegal(m68k_info *info, int data)

References build_illegal(), and info().

◆ d68000_invalid()

static void d68000_invalid ( m68k_info info)
static

Definition at line 1192 of file M68KDisassembler.c.

1193 {
1194  build_invalid(info, info->ir);
1195 }

References build_invalid(), and info().

Referenced by build_cpush_cinv(), and instruction_is_valid().

◆ d68000_jmp()

static void d68000_jmp ( m68k_info info)
static

Definition at line 2344 of file M68KDisassembler.c.

2345 {
2348  get_ea_mode_op(info, &ext->operands[0], info->ir, 4);
2349 }
@ M68K_INS_JMP
Definition: m68k.h:494

References build_init_op(), ext, get_ea_mode_op(), info(), M68K_GRP_JUMP, M68K_INS_JMP, and set_insn_group().

◆ d68000_jsr()

static void d68000_jsr ( m68k_info info)
static

Definition at line 2351 of file M68KDisassembler.c.

2352 {
2355  get_ea_mode_op(info, &ext->operands[0], info->ir, 4);
2356 }
@ M68K_INS_JSR
Definition: m68k.h:495

References build_init_op(), ext, get_ea_mode_op(), info(), M68K_GRP_JUMP, M68K_INS_JSR, and set_insn_group().

◆ d68000_lea()

static void d68000_lea ( m68k_info info)
static

Definition at line 2358 of file M68KDisassembler.c.

2359 {
2361 }
@ M68K_INS_LEA
Definition: m68k.h:496

References build_ea_a(), info(), and M68K_INS_LEA.

◆ d68000_link_16()

static void d68000_link_16 ( m68k_info info)
static

Definition at line 2363 of file M68KDisassembler.c.

2364 {
2366 }
static void build_link(m68k_info *info, int disp, int size)

References build_link(), info(), and read_imm_16().

◆ d68000_lsl_ea()

static void d68000_lsl_ea ( m68k_info info)
static

Definition at line 2439 of file M68KDisassembler.c.

2440 {
2441  build_ea(info, M68K_INS_LSL, 2);
2442 }
@ M68K_INS_LSL
Definition: m68k.h:499

References build_ea(), info(), and M68K_INS_LSL.

◆ d68000_lsl_r_16()

static void d68000_lsl_r_16 ( m68k_info info)
static

Definition at line 2429 of file M68KDisassembler.c.

2430 {
2431  build_r(info, M68K_INS_LSL, 2);
2432 }

References build_r(), info(), and M68K_INS_LSL.

◆ d68000_lsl_r_32()

static void d68000_lsl_r_32 ( m68k_info info)
static

Definition at line 2434 of file M68KDisassembler.c.

2435 {
2436  build_r(info, M68K_INS_LSL, 4);
2437 }

References build_r(), info(), and M68K_INS_LSL.

◆ d68000_lsl_r_8()

static void d68000_lsl_r_8 ( m68k_info info)
static

Definition at line 2424 of file M68KDisassembler.c.

2425 {
2426  build_r(info, M68K_INS_LSL, 1);
2427 }

References build_r(), info(), and M68K_INS_LSL.

◆ d68000_lsl_s_16()

static void d68000_lsl_s_16 ( m68k_info info)
static

Definition at line 2414 of file M68KDisassembler.c.

2415 {
2417 }

References build_3bit_d(), info(), and M68K_INS_LSL.

◆ d68000_lsl_s_32()

static void d68000_lsl_s_32 ( m68k_info info)
static

Definition at line 2419 of file M68KDisassembler.c.

2420 {
2422 }

References build_3bit_d(), info(), and M68K_INS_LSL.

◆ d68000_lsl_s_8()

static void d68000_lsl_s_8 ( m68k_info info)
static

Definition at line 2409 of file M68KDisassembler.c.

2410 {
2412 }

References build_3bit_d(), info(), and M68K_INS_LSL.

◆ d68000_lsr_ea()

static void d68000_lsr_ea ( m68k_info info)
static

Definition at line 2404 of file M68KDisassembler.c.

2405 {
2406  build_ea(info, M68K_INS_LSR, 2);
2407 }
@ M68K_INS_LSR
Definition: m68k.h:500

References build_ea(), info(), and M68K_INS_LSR.

◆ d68000_lsr_r_16()

static void d68000_lsr_r_16 ( m68k_info info)
static

Definition at line 2394 of file M68KDisassembler.c.

2395 {
2396  build_r(info, M68K_INS_LSR, 2);
2397 }

References build_r(), info(), and M68K_INS_LSR.

◆ d68000_lsr_r_32()

static void d68000_lsr_r_32 ( m68k_info info)
static

Definition at line 2399 of file M68KDisassembler.c.

2400 {
2401  build_r(info, M68K_INS_LSR, 4);
2402 }

References build_r(), info(), and M68K_INS_LSR.

◆ d68000_lsr_r_8()

static void d68000_lsr_r_8 ( m68k_info info)
static

Definition at line 2389 of file M68KDisassembler.c.

2390 {
2391  build_r(info, M68K_INS_LSR, 1);
2392 }

References build_r(), info(), and M68K_INS_LSR.

◆ d68000_lsr_s_16()

static void d68000_lsr_s_16 ( m68k_info info)
static

Definition at line 2379 of file M68KDisassembler.c.

2380 {
2382 }

References build_3bit_d(), info(), and M68K_INS_LSR.

◆ d68000_lsr_s_32()

static void d68000_lsr_s_32 ( m68k_info info)
static

Definition at line 2384 of file M68KDisassembler.c.

2385 {
2387 }

References build_3bit_d(), info(), and M68K_INS_LSR.

◆ d68000_lsr_s_8()

static void d68000_lsr_s_8 ( m68k_info info)
static

Definition at line 2374 of file M68KDisassembler.c.

2375 {
2377 }

References build_3bit_d(), info(), and M68K_INS_LSR.

◆ d68000_move_16()

static void d68000_move_16 ( m68k_info info)
static

Definition at line 2449 of file M68KDisassembler.c.

2450 {
2452 }
static void build_ea_ea(m68k_info *info, int opcode, int size)
@ M68K_INS_MOVE
Definition: m68k.h:501

References build_ea_ea(), info(), and M68K_INS_MOVE.

◆ d68000_move_32()

static void d68000_move_32 ( m68k_info info)
static

Definition at line 2454 of file M68KDisassembler.c.

2455 {
2457 }

References build_ea_ea(), info(), and M68K_INS_MOVE.

◆ d68000_move_8()

static void d68000_move_8 ( m68k_info info)
static

Definition at line 2444 of file M68KDisassembler.c.

2445 {
2447 }

References build_ea_ea(), info(), and M68K_INS_MOVE.

◆ d68000_move_fr_sr()

static void d68000_move_fr_sr ( m68k_info info)
static

Definition at line 2503 of file M68KDisassembler.c.

2504 {
2505  cs_m68k_op* op0;
2506  cs_m68k_op* op1;
2508 
2509  op0 = &ext->operands[0];
2510  op1 = &ext->operands[1];
2511 
2512  op0->address_mode = M68K_AM_NONE;
2513  op0->reg = M68K_REG_SR;
2514 
2515  get_ea_mode_op(info, op1, info->ir, 2);
2516 }

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_NONE, M68K_INS_MOVE, M68K_REG_SR, and cs_m68k_op::reg.

◆ d68000_move_fr_usp()

static void d68000_move_fr_usp ( m68k_info info)
static

Definition at line 2533 of file M68KDisassembler.c.

2534 {
2535  cs_m68k_op* op0;
2536  cs_m68k_op* op1;
2538 
2539  op0 = &ext->operands[0];
2540  op1 = &ext->operands[1];
2541 
2542  op0->address_mode = M68K_AM_NONE;
2543  op0->reg = M68K_REG_USP;
2544 
2545  op1->address_mode = M68K_AM_NONE;
2546  op1->reg = M68K_REG_A0 + (info->ir & 7);
2547 }
@ M68K_REG_USP
Definition: m68k.h:56

References cs_m68k_op::address_mode, build_init_op(), ext, info(), M68K_AM_NONE, M68K_INS_MOVE, M68K_REG_A0, M68K_REG_USP, and cs_m68k_op::reg.

◆ d68000_move_to_ccr()

static void d68000_move_to_ccr ( m68k_info info)
static

Definition at line 2469 of file M68KDisassembler.c.

2470 {
2471  cs_m68k_op* op0;
2472  cs_m68k_op* op1;
2474 
2475  op0 = &ext->operands[0];
2476  op1 = &ext->operands[1];
2477 
2478  get_ea_mode_op(info, op0, info->ir, 1);
2479 
2480  op1->address_mode = M68K_AM_NONE;
2481  op1->reg = M68K_REG_CCR;
2482 }

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_NONE, M68K_INS_MOVE, M68K_REG_CCR, and cs_m68k_op::reg.

◆ d68000_move_to_sr()

static void d68000_move_to_sr ( m68k_info info)
static

Definition at line 2518 of file M68KDisassembler.c.

2519 {
2520  cs_m68k_op* op0;
2521  cs_m68k_op* op1;
2523 
2524  op0 = &ext->operands[0];
2525  op1 = &ext->operands[1];
2526 
2527  get_ea_mode_op(info, op0, info->ir, 2);
2528 
2529  op1->address_mode = M68K_AM_NONE;
2530  op1->reg = M68K_REG_SR;
2531 }

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_NONE, M68K_INS_MOVE, M68K_REG_SR, and cs_m68k_op::reg.

◆ d68000_move_to_usp()

static void d68000_move_to_usp ( m68k_info info)
static

Definition at line 2549 of file M68KDisassembler.c.

2550 {
2551  cs_m68k_op* op0;
2552  cs_m68k_op* op1;
2554 
2555  op0 = &ext->operands[0];
2556  op1 = &ext->operands[1];
2557 
2558  op0->address_mode = M68K_AM_NONE;
2559  op0->reg = M68K_REG_A0 + (info->ir & 7);
2560 
2561  op1->address_mode = M68K_AM_NONE;
2562  op1->reg = M68K_REG_USP;
2563 }

References cs_m68k_op::address_mode, build_init_op(), ext, info(), M68K_AM_NONE, M68K_INS_MOVE, M68K_REG_A0, M68K_REG_USP, and cs_m68k_op::reg.

◆ d68000_movea_16()

static void d68000_movea_16 ( m68k_info info)
static

Definition at line 2459 of file M68KDisassembler.c.

2460 {
2462 }
@ M68K_INS_MOVEA
Definition: m68k.h:502

References build_ea_a(), info(), and M68K_INS_MOVEA.

◆ d68000_movea_32()

static void d68000_movea_32 ( m68k_info info)
static

Definition at line 2464 of file M68KDisassembler.c.

2465 {
2467 }

References build_ea_a(), info(), and M68K_INS_MOVEA.

◆ d68000_movem_er_16()

static void d68000_movem_er_16 ( m68k_info info)
static

Definition at line 2622 of file M68KDisassembler.c.

2623 {
2625 }
static void build_movem_er(m68k_info *info, int opcode, int size)
@ M68K_INS_MOVEM
Definition: m68k.h:504

References build_movem_er(), info(), and M68K_INS_MOVEM.

◆ d68000_movem_er_32()

static void d68000_movem_er_32 ( m68k_info info)
static

Definition at line 2627 of file M68KDisassembler.c.

2628 {
2630 }

References build_movem_er(), info(), and M68K_INS_MOVEM.

◆ d68000_movem_pd_16()

static void d68000_movem_pd_16 ( m68k_info info)
static

Definition at line 2612 of file M68KDisassembler.c.

2613 {
2615 }
static void build_movem_re(m68k_info *info, int opcode, int size)

References build_movem_re(), info(), and M68K_INS_MOVEM.

◆ d68000_movem_pd_32()

static void d68000_movem_pd_32 ( m68k_info info)
static

Definition at line 2617 of file M68KDisassembler.c.

2618 {
2620 }

References build_movem_re(), info(), and M68K_INS_MOVEM.

◆ d68000_movem_re_16()

static void d68000_movem_re_16 ( m68k_info info)
static

Definition at line 2632 of file M68KDisassembler.c.

2633 {
2635 }

References build_movem_re(), info(), and M68K_INS_MOVEM.

◆ d68000_movem_re_32()

static void d68000_movem_re_32 ( m68k_info info)
static

Definition at line 2637 of file M68KDisassembler.c.

2638 {
2640 }

References build_movem_re(), info(), and M68K_INS_MOVEM.

◆ d68000_movep_er_16()

static void d68000_movep_er_16 ( m68k_info info)
static

Definition at line 2652 of file M68KDisassembler.c.

2653 {
2654  build_movep_er(info, 2);
2655 }
static void build_movep_er(m68k_info *info, int size)

References build_movep_er(), and info().

◆ d68000_movep_er_32()

static void d68000_movep_er_32 ( m68k_info info)
static

Definition at line 2657 of file M68KDisassembler.c.

2658 {
2659  build_movep_er(info, 4);
2660 }

References build_movep_er(), and info().

◆ d68000_movep_re_16()

static void d68000_movep_re_16 ( m68k_info info)
static

Definition at line 2642 of file M68KDisassembler.c.

2643 {
2644  build_movep_re(info, 2);
2645 }
static void build_movep_re(m68k_info *info, int size)

References build_movep_re(), and info().

◆ d68000_movep_re_32()

static void d68000_movep_re_32 ( m68k_info info)
static

Definition at line 2647 of file M68KDisassembler.c.

2648 {
2649  build_movep_re(info, 4);
2650 }

References build_movep_re(), and info().

◆ d68000_moveq()

static void d68000_moveq ( m68k_info info)
static

Definition at line 2681 of file M68KDisassembler.c.

2682 {
2683  cs_m68k_op* op0;
2684  cs_m68k_op* op1;
2685 
2687 
2688  op0 = &ext->operands[0];
2689  op1 = &ext->operands[1];
2690 
2691  op0->type = M68K_OP_IMM;
2693  op0->imm = (info->ir & 0xff);
2694 
2696  op1->reg = M68K_REG_D0 + ((info->ir >> 9) & 7);
2697 }
@ M68K_INS_MOVEQ
Definition: m68k.h:506

References cs_m68k_op::address_mode, build_init_op(), ext, cs_m68k_op::imm, info(), M68K_AM_IMMEDIATE, M68K_AM_REG_DIRECT_DATA, M68K_INS_MOVEQ, M68K_OP_IMM, M68K_REG_D0, cs_m68k_op::reg, and cs_m68k_op::type.

◆ d68000_muls()

static void d68000_muls ( m68k_info info)
static

Definition at line 2749 of file M68KDisassembler.c.

2750 {
2752 }
@ M68K_INS_MULS
Definition: m68k.h:509

References build_er_1(), info(), and M68K_INS_MULS.

◆ d68000_mulu()

static void d68000_mulu ( m68k_info info)
static

Definition at line 2754 of file M68KDisassembler.c.

2755 {
2757 }
@ M68K_INS_MULU
Definition: m68k.h:510

References build_er_1(), info(), and M68K_INS_MULU.

◆ d68000_nbcd()

static void d68000_nbcd ( m68k_info info)
static

Definition at line 2796 of file M68KDisassembler.c.

2797 {
2799 }
@ M68K_INS_NBCD
Definition: m68k.h:511

References build_ea(), info(), and M68K_INS_NBCD.

◆ d68000_neg_16()

static void d68000_neg_16 ( m68k_info info)
static

Definition at line 2806 of file M68KDisassembler.c.

2807 {
2808  build_ea(info, M68K_INS_NEG, 2);
2809 }
@ M68K_INS_NEG
Definition: m68k.h:512

References build_ea(), info(), and M68K_INS_NEG.

◆ d68000_neg_32()

static void d68000_neg_32 ( m68k_info info)
static

Definition at line 2811 of file M68KDisassembler.c.

2812 {
2813  build_ea(info, M68K_INS_NEG, 4);
2814 }

References build_ea(), info(), and M68K_INS_NEG.

◆ d68000_neg_8()

static void d68000_neg_8 ( m68k_info info)
static

Definition at line 2801 of file M68KDisassembler.c.

2802 {
2803  build_ea(info, M68K_INS_NEG, 1);
2804 }

References build_ea(), info(), and M68K_INS_NEG.

◆ d68000_negx_16()

static void d68000_negx_16 ( m68k_info info)
static

Definition at line 2821 of file M68KDisassembler.c.

2822 {
2824 }
@ M68K_INS_NEGX
Definition: m68k.h:513

References build_ea(), info(), and M68K_INS_NEGX.

◆ d68000_negx_32()

static void d68000_negx_32 ( m68k_info info)
static

Definition at line 2826 of file M68KDisassembler.c.

2827 {
2829 }

References build_ea(), info(), and M68K_INS_NEGX.

◆ d68000_negx_8()

static void d68000_negx_8 ( m68k_info info)
static

Definition at line 2816 of file M68KDisassembler.c.

2817 {
2819 }

References build_ea(), info(), and M68K_INS_NEGX.

◆ d68000_nop()

static void d68000_nop ( m68k_info info)
static

Definition at line 2831 of file M68KDisassembler.c.

2832 {
2834 }
@ M68K_INS_NOP
Definition: m68k.h:514

References info(), M68K_INS_NOP, and MCInst_setOpcode().

◆ d68000_not_16()

static void d68000_not_16 ( m68k_info info)
static

Definition at line 2841 of file M68KDisassembler.c.

2842 {
2843  build_ea(info, M68K_INS_NOT, 2);
2844 }
@ M68K_INS_NOT
Definition: m68k.h:515

References build_ea(), info(), and M68K_INS_NOT.

◆ d68000_not_32()

static void d68000_not_32 ( m68k_info info)
static

Definition at line 2846 of file M68KDisassembler.c.

2847 {
2848  build_ea(info, M68K_INS_NOT, 4);
2849 }

References build_ea(), info(), and M68K_INS_NOT.

◆ d68000_not_8()

static void d68000_not_8 ( m68k_info info)
static

Definition at line 2836 of file M68KDisassembler.c.

2837 {
2838  build_ea(info, M68K_INS_NOT, 1);
2839 }

References build_ea(), info(), and M68K_INS_NOT.

◆ d68000_or_er_16()

static void d68000_or_er_16 ( m68k_info info)
static

Definition at line 2856 of file M68KDisassembler.c.

2857 {
2859 }
@ M68K_INS_OR
Definition: m68k.h:516

References build_er_1(), info(), and M68K_INS_OR.

◆ d68000_or_er_32()

static void d68000_or_er_32 ( m68k_info info)
static

Definition at line 2861 of file M68KDisassembler.c.

2862 {
2864 }

References build_er_1(), info(), and M68K_INS_OR.

◆ d68000_or_er_8()

static void d68000_or_er_8 ( m68k_info info)
static

Definition at line 2851 of file M68KDisassembler.c.

2852 {
2854 }

References build_er_1(), info(), and M68K_INS_OR.

◆ d68000_or_re_16()

static void d68000_or_re_16 ( m68k_info info)
static

Definition at line 2871 of file M68KDisassembler.c.

2872 {
2874 }

References build_re_1(), info(), and M68K_INS_OR.

◆ d68000_or_re_32()

static void d68000_or_re_32 ( m68k_info info)
static

Definition at line 2876 of file M68KDisassembler.c.

2877 {
2879 }

References build_re_1(), info(), and M68K_INS_OR.

◆ d68000_or_re_8()

static void d68000_or_re_8 ( m68k_info info)
static

Definition at line 2866 of file M68KDisassembler.c.

2867 {
2869 }

References build_re_1(), info(), and M68K_INS_OR.

◆ d68000_ori_16()

static void d68000_ori_16 ( m68k_info info)
static

Definition at line 2886 of file M68KDisassembler.c.

2887 {
2889 }
@ M68K_INS_ORI
Definition: m68k.h:517

References build_imm_ea(), info(), M68K_INS_ORI, and read_imm_16().

◆ d68000_ori_32()

static void d68000_ori_32 ( m68k_info info)
static

Definition at line 2891 of file M68KDisassembler.c.

2892 {
2894 }

References build_imm_ea(), info(), M68K_INS_ORI, and read_imm_32().

◆ d68000_ori_8()

static void d68000_ori_8 ( m68k_info info)
static

Definition at line 2881 of file M68KDisassembler.c.

2882 {
2884 }

References build_imm_ea(), info(), M68K_INS_ORI, and read_imm_8().

◆ d68000_ori_to_ccr()

static void d68000_ori_to_ccr ( m68k_info info)
static

◆ d68000_ori_to_sr()

static void d68000_ori_to_sr ( m68k_info info)
static

◆ d68000_pea()

static void d68000_pea ( m68k_info info)
static

Definition at line 2918 of file M68KDisassembler.c.

2919 {
2920  build_ea(info, M68K_INS_PEA, 4);
2921 }
@ M68K_INS_PEA
Definition: m68k.h:519

References build_ea(), info(), and M68K_INS_PEA.

◆ d68000_reset()

static void d68000_reset ( m68k_info info)
static

Definition at line 2923 of file M68KDisassembler.c.

2924 {
2926 }
@ M68K_INS_RESET
Definition: m68k.h:535

References info(), M68K_INS_RESET, and MCInst_setOpcode().

◆ d68000_rol_ea()

static void d68000_rol_ea ( m68k_info info)
static

Definition at line 2993 of file M68KDisassembler.c.

2994 {
2995  build_ea(info, M68K_INS_ROL, 2);
2996 }
@ M68K_INS_ROL
Definition: m68k.h:536

References build_ea(), info(), and M68K_INS_ROL.

◆ d68000_rol_r_16()

static void d68000_rol_r_16 ( m68k_info info)
static

Definition at line 2983 of file M68KDisassembler.c.

2984 {
2985  build_r(info, M68K_INS_ROL, 2);
2986 }

References build_r(), info(), and M68K_INS_ROL.

◆ d68000_rol_r_32()

static void d68000_rol_r_32 ( m68k_info info)
static

Definition at line 2988 of file M68KDisassembler.c.

2989 {
2990  build_r(info, M68K_INS_ROL, 4);
2991 }

References build_r(), info(), and M68K_INS_ROL.

◆ d68000_rol_r_8()

static void d68000_rol_r_8 ( m68k_info info)
static

Definition at line 2978 of file M68KDisassembler.c.

2979 {
2980  build_r(info, M68K_INS_ROL, 1);
2981 }

References build_r(), info(), and M68K_INS_ROL.

◆ d68000_rol_s_16()

static void d68000_rol_s_16 ( m68k_info info)
static

Definition at line 2968 of file M68KDisassembler.c.

2969 {
2971 }

References build_3bit_d(), info(), and M68K_INS_ROL.

◆ d68000_rol_s_32()

static void d68000_rol_s_32 ( m68k_info info)
static

Definition at line 2973 of file M68KDisassembler.c.

2974 {
2976 }

References build_3bit_d(), info(), and M68K_INS_ROL.

◆ d68000_rol_s_8()

static void d68000_rol_s_8 ( m68k_info info)
static

Definition at line 2963 of file M68KDisassembler.c.

2964 {
2966 }

References build_3bit_d(), info(), and M68K_INS_ROL.

◆ d68000_ror_ea()

static void d68000_ror_ea ( m68k_info info)
static

Definition at line 2958 of file M68KDisassembler.c.

2959 {
2960  build_ea(info, M68K_INS_ROR, 2);
2961 }
@ M68K_INS_ROR
Definition: m68k.h:537

References build_ea(), info(), and M68K_INS_ROR.

◆ d68000_ror_r_16()

static void d68000_ror_r_16 ( m68k_info info)
static

Definition at line 2948 of file M68KDisassembler.c.

2949 {
2950  build_r(info, M68K_INS_ROR, 2);
2951 }

References build_r(), info(), and M68K_INS_ROR.

◆ d68000_ror_r_32()

static void d68000_ror_r_32 ( m68k_info info)
static

Definition at line 2953 of file M68KDisassembler.c.

2954 {
2955  build_r(info, M68K_INS_ROR, 4);
2956 }

References build_r(), info(), and M68K_INS_ROR.

◆ d68000_ror_r_8()

static void d68000_ror_r_8 ( m68k_info info)
static

Definition at line 2943 of file M68KDisassembler.c.

2944 {
2945  build_r(info, M68K_INS_ROR, 1);
2946 }

References build_r(), info(), and M68K_INS_ROR.

◆ d68000_ror_s_16()

static void d68000_ror_s_16 ( m68k_info info)
static

Definition at line 2933 of file M68KDisassembler.c.

2934 {
2936 }

References build_3bit_d(), info(), and M68K_INS_ROR.

◆ d68000_ror_s_32()

static void d68000_ror_s_32 ( m68k_info info)
static

Definition at line 2938 of file M68KDisassembler.c.

2939 {
2941 }

References build_3bit_d(), info(), and M68K_INS_ROR.

◆ d68000_ror_s_8()

static void d68000_ror_s_8 ( m68k_info info)
static

Definition at line 2928 of file M68KDisassembler.c.

2929 {
2931 }

References build_3bit_d(), info(), and M68K_INS_ROR.

◆ d68000_roxl_ea()

static void d68000_roxl_ea ( m68k_info info)
static

Definition at line 3063 of file M68KDisassembler.c.

3064 {
3066 }
@ M68K_INS_ROXL
Definition: m68k.h:538

References build_ea(), info(), and M68K_INS_ROXL.

◆ d68000_roxl_r_16()

static void d68000_roxl_r_16 ( m68k_info info)
static

Definition at line 3053 of file M68KDisassembler.c.

3054 {
3055  build_r(info, M68K_INS_ROXL, 2);
3056 }

References build_r(), info(), and M68K_INS_ROXL.

◆ d68000_roxl_r_32()

static void d68000_roxl_r_32 ( m68k_info info)
static

Definition at line 3058 of file M68KDisassembler.c.

3059 {
3060  build_r(info, M68K_INS_ROXL, 4);
3061 }

References build_r(), info(), and M68K_INS_ROXL.

◆ d68000_roxl_r_8()

static void d68000_roxl_r_8 ( m68k_info info)
static

Definition at line 3048 of file M68KDisassembler.c.

3049 {
3050  build_r(info, M68K_INS_ROXL, 1);
3051 }

References build_r(), info(), and M68K_INS_ROXL.

◆ d68000_roxl_s_16()

static void d68000_roxl_s_16 ( m68k_info info)
static

Definition at line 3038 of file M68KDisassembler.c.

3039 {
3041 }

References build_3bit_d(), info(), and M68K_INS_ROXL.

◆ d68000_roxl_s_32()

static void d68000_roxl_s_32 ( m68k_info info)
static

Definition at line 3043 of file M68KDisassembler.c.

3044 {
3046 }

References build_3bit_d(), info(), and M68K_INS_ROXL.

◆ d68000_roxl_s_8()

static void d68000_roxl_s_8 ( m68k_info info)
static

Definition at line 3033 of file M68KDisassembler.c.

3034 {
3036 }

References build_3bit_d(), info(), and M68K_INS_ROXL.

◆ d68000_roxr_ea()

static void d68000_roxr_ea ( m68k_info info)
static

Definition at line 3028 of file M68KDisassembler.c.

3029 {
3031 }
@ M68K_INS_ROXR
Definition: m68k.h:539

References build_ea(), info(), and M68K_INS_ROXR.

◆ d68000_roxr_r_16()

static void d68000_roxr_r_16 ( m68k_info info)
static

Definition at line 3018 of file M68KDisassembler.c.

3019 {
3020  build_r(info, M68K_INS_ROXR, 2);
3021 }

References build_r(), info(), and M68K_INS_ROXR.

◆ d68000_roxr_r_32()

static void d68000_roxr_r_32 ( m68k_info info)
static

Definition at line 3023 of file M68KDisassembler.c.

3024 {
3025  build_r(info, M68K_INS_ROXR, 4);
3026 }

References build_r(), info(), and M68K_INS_ROXR.

◆ d68000_roxr_r_8()

static void d68000_roxr_r_8 ( m68k_info info)
static

Definition at line 3013 of file M68KDisassembler.c.

3014 {
3016 }

References build_3bit_d(), info(), and M68K_INS_ROXR.

◆ d68000_roxr_s_16()

static void d68000_roxr_s_16 ( m68k_info info)
static

Definition at line 3003 of file M68KDisassembler.c.

3004 {
3006 }

References build_3bit_d(), info(), and M68K_INS_ROXR.

◆ d68000_roxr_s_32()

static void d68000_roxr_s_32 ( m68k_info info)
static

Definition at line 3008 of file M68KDisassembler.c.

3009 {
3011 }

References build_3bit_d(), info(), and M68K_INS_ROXR.

◆ d68000_roxr_s_8()

static void d68000_roxr_s_8 ( m68k_info info)
static

Definition at line 2998 of file M68KDisassembler.c.

2999 {
3001 }

References build_3bit_d(), info(), and M68K_INS_ROXR.

◆ d68000_rte()

static void d68000_rte ( m68k_info info)
static

Definition at line 3075 of file M68KDisassembler.c.

3076 {
3079 }
@ M68K_GRP_IRET
= CS_GRP_IRET
Definition: m68k.h:603
@ M68K_INS_RTE
Definition: m68k.h:541

References info(), M68K_GRP_IRET, M68K_INS_RTE, MCInst_setOpcode(), and set_insn_group().

◆ d68000_rtr()

static void d68000_rtr ( m68k_info info)
static

Definition at line 3105 of file M68KDisassembler.c.

3106 {
3109 }
@ M68K_GRP_RET
= CS_GRP_RET
Definition: m68k.h:602
@ M68K_INS_RTR
Definition: m68k.h:543

References info(), M68K_GRP_RET, M68K_INS_RTR, MCInst_setOpcode(), and set_insn_group().

◆ d68000_rts()

static void d68000_rts ( m68k_info info)
static

Definition at line 3111 of file M68KDisassembler.c.

3112 {
3115 }
@ M68K_INS_RTS
Definition: m68k.h:544

References info(), M68K_GRP_RET, M68K_INS_RTS, MCInst_setOpcode(), and set_insn_group().

◆ d68000_sbcd_mm()

static void d68000_sbcd_mm ( m68k_info info)
static

Definition at line 3122 of file M68KDisassembler.c.

3123 {
3125 }
@ M68K_INS_SBCD
Definition: m68k.h:545

References build_mm(), info(), M68K_INS_SBCD, and read_imm_16().

◆ d68000_sbcd_rr()

static void d68000_sbcd_rr ( m68k_info info)
static

Definition at line 3117 of file M68KDisassembler.c.

3118 {
3119  build_rr(info, M68K_INS_SBCD, 1, 0);
3120 }

References build_rr(), info(), and M68K_INS_SBCD.

◆ d68000_scc()

static void d68000_scc ( m68k_info info)
static

Definition at line 3127 of file M68KDisassembler.c.

3128 {
3129  cs_m68k* ext = build_init_op(info, s_scc_lut[(info->ir >> 8) & 0xf], 1, 1);
3130  get_ea_mode_op(info, &ext->operands[0], info->ir, 1);
3131 }
static m68k_insn s_scc_lut[]

References build_init_op(), ext, get_ea_mode_op(), info(), and s_scc_lut.

◆ d68000_stop()

static void d68000_stop ( m68k_info info)
static

◆ d68000_sub_er_16()

static void d68000_sub_er_16 ( m68k_info info)
static

Definition at line 3143 of file M68KDisassembler.c.

3144 {
3146 }
@ M68K_INS_SUB
Definition: m68k.h:565

References build_er_1(), info(), and M68K_INS_SUB.

◆ d68000_sub_er_32()

static void d68000_sub_er_32 ( m68k_info info)
static

Definition at line 3148 of file M68KDisassembler.c.

3149 {
3151 }

References build_er_1(), info(), and M68K_INS_SUB.

◆ d68000_sub_er_8()

static void d68000_sub_er_8 ( m68k_info info)
static

Definition at line 3138 of file M68KDisassembler.c.

3139 {
3141 }

References build_er_1(), info(), and M68K_INS_SUB.

◆ d68000_sub_re_16()

static void d68000_sub_re_16 ( m68k_info info)
static

Definition at line 3158 of file M68KDisassembler.c.

3159 {
3161 }

References build_re_1(), info(), and M68K_INS_SUB.

◆ d68000_sub_re_32()

static void d68000_sub_re_32 ( m68k_info info)
static

Definition at line 3163 of file M68KDisassembler.c.

3164 {
3166 }

References build_re_1(), info(), and M68K_INS_SUB.

◆ d68000_sub_re_8()

static void d68000_sub_re_8 ( m68k_info info)
static

Definition at line 3153 of file M68KDisassembler.c.

3154 {
3156 }

References build_re_1(), info(), and M68K_INS_SUB.

◆ d68000_suba_16()

static void d68000_suba_16 ( m68k_info info)
static

Definition at line 3168 of file M68KDisassembler.c.

3169 {
3171 }
@ M68K_INS_SUBA
Definition: m68k.h:566

References build_ea_a(), info(), and M68K_INS_SUBA.

◆ d68000_suba_32()

static void d68000_suba_32 ( m68k_info info)
static

Definition at line 3173 of file M68KDisassembler.c.

3174 {
3176 }

References build_ea_a(), info(), and M68K_INS_SUBA.

◆ d68000_subi_16()

static void d68000_subi_16 ( m68k_info info)
static

Definition at line 3183 of file M68KDisassembler.c.

3184 {
3186 }
@ M68K_INS_SUBI
Definition: m68k.h:567

References build_imm_ea(), info(), M68K_INS_SUBI, and read_imm_16().

◆ d68000_subi_32()

static void d68000_subi_32 ( m68k_info info)
static

Definition at line 3188 of file M68KDisassembler.c.

3189 {
3191 }

References build_imm_ea(), info(), M68K_INS_SUBI, and read_imm_32().

◆ d68000_subi_8()

static void d68000_subi_8 ( m68k_info info)
static

Definition at line 3178 of file M68KDisassembler.c.

3179 {
3181 }

References build_imm_ea(), info(), M68K_INS_SUBI, and read_imm_8().

◆ d68000_subq_16()

static void d68000_subq_16 ( m68k_info info)
static

Definition at line 3198 of file M68KDisassembler.c.

3199 {
3201 }
@ M68K_INS_SUBQ
Definition: m68k.h:568

References build_3bit_ea(), info(), and M68K_INS_SUBQ.

◆ d68000_subq_32()

static void d68000_subq_32 ( m68k_info info)
static

Definition at line 3203 of file M68KDisassembler.c.

3204 {
3206 }

References build_3bit_ea(), info(), and M68K_INS_SUBQ.

◆ d68000_subq_8()

static void d68000_subq_8 ( m68k_info info)
static

Definition at line 3193 of file M68KDisassembler.c.

3194 {
3196 }

References build_3bit_ea(), info(), and M68K_INS_SUBQ.

◆ d68000_subx_mm_16()

static void d68000_subx_mm_16 ( m68k_info info)
static

Definition at line 3228 of file M68KDisassembler.c.

3229 {
3230  build_mm(info, M68K_INS_SUBX, 2, 0);
3231 }
@ M68K_INS_SUBX
Definition: m68k.h:569

References build_mm(), info(), and M68K_INS_SUBX.

◆ d68000_subx_mm_32()

static void d68000_subx_mm_32 ( m68k_info info)
static

Definition at line 3233 of file M68KDisassembler.c.

3234 {
3235  build_mm(info, M68K_INS_SUBX, 4, 0);
3236 }

References build_mm(), info(), and M68K_INS_SUBX.

◆ d68000_subx_mm_8()

static void d68000_subx_mm_8 ( m68k_info info)
static

Definition at line 3223 of file M68KDisassembler.c.

3224 {
3225  build_mm(info, M68K_INS_SUBX, 1, 0);
3226 }

References build_mm(), info(), and M68K_INS_SUBX.

◆ d68000_subx_rr_16()

static void d68000_subx_rr_16 ( m68k_info info)
static

Definition at line 3213 of file M68KDisassembler.c.

3214 {
3215  build_rr(info, M68K_INS_SUBX, 2, 0);
3216 }

References build_rr(), info(), and M68K_INS_SUBX.

◆ d68000_subx_rr_32()

static void d68000_subx_rr_32 ( m68k_info info)
static

Definition at line 3218 of file M68KDisassembler.c.

3219 {
3220  build_rr(info, M68K_INS_SUBX, 4, 0);
3221 }

References build_rr(), info(), and M68K_INS_SUBX.

◆ d68000_subx_rr_8()

static void d68000_subx_rr_8 ( m68k_info info)
static

Definition at line 3208 of file M68KDisassembler.c.

3209 {
3210  build_rr(info, M68K_INS_SUBX, 1, 0);
3211 }

References build_rr(), info(), and M68K_INS_SUBX.

◆ d68000_swap()

static void d68000_swap ( m68k_info info)
static

Definition at line 3238 of file M68KDisassembler.c.

3239 {
3240  build_d(info, M68K_INS_SWAP, 0);
3241 }
@ M68K_INS_SWAP
Definition: m68k.h:570

References build_d(), info(), and M68K_INS_SWAP.

◆ d68000_tas()

static void d68000_tas ( m68k_info info)
static

Definition at line 3243 of file M68KDisassembler.c.

3244 {
3245  build_ea(info, M68K_INS_TAS, 1);
3246 }
@ M68K_INS_TAS
Definition: m68k.h:571

References build_ea(), info(), and M68K_INS_TAS.

◆ d68000_trap()

static void d68000_trap ( m68k_info info)
static

Definition at line 3248 of file M68KDisassembler.c.

3249 {
3251 }
@ M68K_INS_TRAP
Definition: m68k.h:572

References build_absolute_jump_with_immediate(), info(), and M68K_INS_TRAP.

◆ d68000_trapv()

static void d68000_trapv ( m68k_info info)
static

Definition at line 3273 of file M68KDisassembler.c.

3274 {
3276 }
@ M68K_INS_TRAPV
Definition: m68k.h:573

References info(), M68K_INS_TRAPV, and MCInst_setOpcode().

◆ d68000_tst_16()

static void d68000_tst_16 ( m68k_info info)
static

Definition at line 3301 of file M68KDisassembler.c.

3302 {
3303  build_ea(info, M68K_INS_TST, 2);
3304 }
@ M68K_INS_TST
Definition: m68k.h:592

References build_ea(), info(), and M68K_INS_TST.

◆ d68000_tst_32()

static void d68000_tst_32 ( m68k_info info)
static

Definition at line 3330 of file M68KDisassembler.c.

3331 {
3332  build_ea(info, M68K_INS_TST, 4);
3333 }

References build_ea(), info(), and M68K_INS_TST.

◆ d68000_tst_8()

static void d68000_tst_8 ( m68k_info info)
static

Definition at line 3278 of file M68KDisassembler.c.

3279 {
3280  build_ea(info, M68K_INS_TST, 1);
3281 }

References build_ea(), info(), and M68K_INS_TST.

◆ d68000_unlk()

static void d68000_unlk ( m68k_info info)
static

Definition at line 3359 of file M68KDisassembler.c.

3360 {
3361  cs_m68k_op* op;
3363 
3364  op = &ext->operands[0];
3365 
3366  op->address_mode = M68K_AM_REG_DIRECT_ADDR;
3367  op->reg = M68K_REG_A0 + (info->ir & 7);
3368 }
@ M68K_INS_UNLK
Definition: m68k.h:593

References build_init_op(), ext, info(), M68K_AM_REG_DIRECT_ADDR, M68K_INS_UNLK, M68K_REG_A0, and op.

◆ d68010_bkpt()

static void d68010_bkpt ( m68k_info info)
static

Definition at line 1483 of file M68KDisassembler.c.

1484 {
1487 }
#define M68010_PLUS
#define LIMIT_CPU_TYPES(info, ALLOWED_CPU_TYPES)
@ M68K_INS_BKPT
Definition: m68k.h:261

References build_absolute_jump_with_immediate(), info(), LIMIT_CPU_TYPES, M68010_PLUS, and M68K_INS_BKPT.

◆ d68010_move_fr_ccr()

static void d68010_move_fr_ccr ( m68k_info info)
static

Definition at line 2484 of file M68KDisassembler.c.

2485 {
2486  cs_m68k_op* op0;
2487  cs_m68k_op* op1;
2488  cs_m68k* ext;
2489 
2491 
2492  ext = build_init_op(info, M68K_INS_MOVE, 2, 2);
2493 
2494  op0 = &ext->operands[0];
2495  op1 = &ext->operands[1];
2496 
2497  op0->address_mode = M68K_AM_NONE;
2498  op0->reg = M68K_REG_CCR;
2499 
2500  get_ea_mode_op(info, op1, info->ir, 1);
2501 }

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), LIMIT_CPU_TYPES, M68010_PLUS, M68K_AM_NONE, M68K_INS_MOVE, M68K_REG_CCR, and cs_m68k_op::reg.

◆ d68010_movec()

static void d68010_movec ( m68k_info info)
static

Definition at line 2565 of file M68KDisassembler.c.

2566 {
2567  uint32_t extension;
2568  m68k_reg reg;
2569  cs_m68k* ext;
2570  cs_m68k_op* op0;
2571  cs_m68k_op* op1;
2572 
2573 
2575 
2576  extension = read_imm_16(info);
2578 
2580 
2581  op0 = &ext->operands[0];
2582  op1 = &ext->operands[1];
2583 
2584  switch (extension & 0xfff) {
2585  case 0x000: reg = M68K_REG_SFC; break;
2586  case 0x001: reg = M68K_REG_DFC; break;
2587  case 0x800: reg = M68K_REG_USP; break;
2588  case 0x801: reg = M68K_REG_VBR; break;
2589  case 0x002: reg = M68K_REG_CACR; break;
2590  case 0x802: reg = M68K_REG_CAAR; break;
2591  case 0x803: reg = M68K_REG_MSP; break;
2592  case 0x804: reg = M68K_REG_ISP; break;
2593  case 0x003: reg = M68K_REG_TC; break;
2594  case 0x004: reg = M68K_REG_ITT0; break;
2595  case 0x005: reg = M68K_REG_ITT1; break;
2596  case 0x006: reg = M68K_REG_DTT0; break;
2597  case 0x007: reg = M68K_REG_DTT1; break;
2598  case 0x805: reg = M68K_REG_MMUSR; break;
2599  case 0x806: reg = M68K_REG_URP; break;
2600  case 0x807: reg = M68K_REG_SRP; break;
2601  }
2602 
2603  if (BIT_1(info->ir)) {
2604  op0->reg = (BIT_F(extension) ? M68K_REG_A0 : M68K_REG_D0) + ((extension >> 12) & 7);
2605  op1->reg = reg;
2606  } else {
2607  op0->reg = reg;
2608  op1->reg = (BIT_F(extension) ? M68K_REG_A0 : M68K_REG_D0) + ((extension >> 12) & 7);
2609  }
2610 }
#define BIT_1(A)
@ M68K_INS_MOVEC
Definition: m68k.h:503
m68k_reg
M68K registers and special registers.
Definition: m68k.h:20
@ M68K_REG_ITT1
Definition: m68k.h:64
@ M68K_REG_URP
Definition: m68k.h:68
@ M68K_REG_MMUSR
Definition: m68k.h:67
@ M68K_REG_CAAR
Definition: m68k.h:59
@ M68K_REG_ITT0
Definition: m68k.h:63
@ M68K_REG_DTT1
Definition: m68k.h:66
@ M68K_REG_SFC
Definition: m68k.h:54
@ M68K_REG_DFC
Definition: m68k.h:55
@ M68K_REG_DTT0
Definition: m68k.h:65
@ M68K_REG_VBR
Definition: m68k.h:57
@ M68K_REG_TC
Definition: m68k.h:62
@ M68K_REG_MSP
Definition: m68k.h:60
@ M68K_REG_ISP
Definition: m68k.h:61
@ M68K_REG_SRP
Definition: m68k.h:69
@ M68K_REG_CACR
Definition: m68k.h:58

References BIT_1, BIT_F, build_init_op(), ext, info(), LIMIT_CPU_TYPES, M68010_PLUS, M68K_INS_MOVEC, M68K_REG_A0, M68K_REG_CAAR, M68K_REG_CACR, M68K_REG_D0, M68K_REG_DFC, M68K_REG_DTT0, M68K_REG_DTT1, M68K_REG_INVALID, M68K_REG_ISP, M68K_REG_ITT0, M68K_REG_ITT1, M68K_REG_MMUSR, M68K_REG_MSP, M68K_REG_SFC, M68K_REG_SRP, M68K_REG_TC, M68K_REG_URP, M68K_REG_USP, M68K_REG_VBR, read_imm_16(), reg, and cs_m68k_op::reg.

◆ d68010_moves_16()

static void d68010_moves_16 ( m68k_info info)
static

Definition at line 2668 of file M68KDisassembler.c.

2669 {
2670  //uint32_t extension;
2672  build_moves(info, 2);
2673 }
static void build_moves(m68k_info *info, int size)

References build_moves(), info(), LIMIT_CPU_TYPES, and M68010_PLUS.

◆ d68010_moves_32()

static void d68010_moves_32 ( m68k_info info)
static

Definition at line 2675 of file M68KDisassembler.c.

2676 {
2678  build_moves(info, 4);
2679 }

References build_moves(), info(), LIMIT_CPU_TYPES, and M68010_PLUS.

◆ d68010_moves_8()

static void d68010_moves_8 ( m68k_info info)
static

Definition at line 2662 of file M68KDisassembler.c.

2663 {
2665  build_moves(info, 1);
2666 }

References build_moves(), info(), LIMIT_CPU_TYPES, and M68010_PLUS.

◆ d68010_rtd()

◆ d68020_bcc_32()

static void d68020_bcc_32 ( m68k_info info)
static

Definition at line 1457 of file M68KDisassembler.c.

1458 {
1461 }
#define M68020_PLUS

References build_bcc(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and read_imm_32().

◆ d68020_bfchg()

static void d68020_bfchg ( m68k_info info)
static

Definition at line 1489 of file M68KDisassembler.c.

1490 {
1493 }
static void build_bitfield_ins(m68k_info *info, int opcode, int has_d_arg)
@ M68K_INS_BFCHG
Definition: m68k.h:253

References build_bitfield_ins(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_BFCHG.

◆ d68020_bfclr()

static void d68020_bfclr ( m68k_info info)
static

Definition at line 1496 of file M68KDisassembler.c.

1497 {
1500 }
@ M68K_INS_BFCLR
Definition: m68k.h:254

References build_bitfield_ins(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_BFCLR.

◆ d68020_bfexts()

static void d68020_bfexts ( m68k_info info)
static

Definition at line 1502 of file M68KDisassembler.c.

1503 {
1506 }
@ M68K_INS_BFEXTS
Definition: m68k.h:255

References build_bitfield_ins(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_BFEXTS.

◆ d68020_bfextu()

static void d68020_bfextu ( m68k_info info)
static

Definition at line 1508 of file M68KDisassembler.c.

1509 {
1512 }
@ M68K_INS_BFEXTU
Definition: m68k.h:256

References build_bitfield_ins(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_BFEXTU.

◆ d68020_bfffo()

static void d68020_bfffo ( m68k_info info)
static

Definition at line 1514 of file M68KDisassembler.c.

1515 {
1518 }
@ M68K_INS_BFFFO
Definition: m68k.h:257

References build_bitfield_ins(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_BFFFO.

◆ d68020_bfins()

static void d68020_bfins ( m68k_info info)
static

Definition at line 1520 of file M68KDisassembler.c.

1521 {
1522  cs_m68k* ext = &info->extension;
1523  cs_m68k_op temp;
1524 
1527 
1528  // a bit hacky but we need to flip the args on only this instruction
1529 
1530  temp = ext->operands[0];
1531  ext->operands[0] = ext->operands[1];
1532  ext->operands[1] = temp;
1533 }
@ M68K_INS_BFINS
Definition: m68k.h:258

References build_bitfield_ins(), ext, info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_BFINS.

◆ d68020_bfset()

static void d68020_bfset ( m68k_info info)
static

Definition at line 1535 of file M68KDisassembler.c.

1536 {
1539 }
@ M68K_INS_BFSET
Definition: m68k.h:259

References build_bitfield_ins(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_BFSET.

◆ d68020_bftst()

static void d68020_bftst ( m68k_info info)
static

Definition at line 1541 of file M68KDisassembler.c.

1542 {
1544 }
@ M68K_INS_BFTST
Definition: m68k.h:260

References build_bitfield_ins(), info(), and M68K_INS_BFTST.

◆ d68020_bra_32()

static void d68020_bra_32 ( m68k_info info)
static

◆ d68020_bsr_32()

static void d68020_bsr_32 ( m68k_info info)
static

◆ d68020_callm()

static void d68020_callm ( m68k_info info)
static

Definition at line 1598 of file M68KDisassembler.c.

1599 {
1602 }
#define M68020_ONLY
@ M68K_INS_CALLM
Definition: m68k.h:262

References build_imm_ea(), info(), LIMIT_CPU_TYPES, M68020_ONLY, M68K_INS_CALLM, and read_imm_8().

◆ d68020_cas2_16()

static void d68020_cas2_16 ( m68k_info info)
static

Definition at line 1622 of file M68KDisassembler.c.

1623 {
1624  build_cas2(info, 2);
1625 }
static void build_cas2(m68k_info *info, int size)

References build_cas2(), and info().

◆ d68020_cas2_32()

static void d68020_cas2_32 ( m68k_info info)
static

Definition at line 1627 of file M68KDisassembler.c.

1628 {
1629  build_cas2(info, 4);
1630 }

References build_cas2(), and info().

◆ d68020_cas_16()

static void d68020_cas_16 ( m68k_info info)
static

Definition at line 1610 of file M68KDisassembler.c.

1611 {
1614 }
static void build_d_d_ea(m68k_info *info, int opcode, int size)
@ M68K_INS_CAS
Definition: m68k.h:263

References build_d_d_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_CAS.

◆ d68020_cas_32()

static void d68020_cas_32 ( m68k_info info)
static

Definition at line 1616 of file M68KDisassembler.c.

1617 {
1620 }

References build_d_d_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_CAS.

◆ d68020_cas_8()

static void d68020_cas_8 ( m68k_info info)
static

Definition at line 1604 of file M68KDisassembler.c.

1605 {
1608 }

References build_d_d_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_CAS.

◆ d68020_chk2_cmp2_16()

static void d68020_chk2_cmp2_16 ( m68k_info info)
static

Definition at line 1649 of file M68KDisassembler.c.

1650 {
1652  build_chk2_cmp2(info, 2);
1653 }
static void build_chk2_cmp2(m68k_info *info, int size)

References build_chk2_cmp2(), info(), LIMIT_CPU_TYPES, and M68020_PLUS.

◆ d68020_chk2_cmp2_32()

static void d68020_chk2_cmp2_32 ( m68k_info info)
static

Definition at line 1655 of file M68KDisassembler.c.

1656 {
1658  build_chk2_cmp2(info, 4);
1659 }

References build_chk2_cmp2(), info(), LIMIT_CPU_TYPES, and M68020_PLUS.

◆ d68020_chk2_cmp2_8()

static void d68020_chk2_cmp2_8 ( m68k_info info)
static

Definition at line 1643 of file M68KDisassembler.c.

1644 {
1646  build_chk2_cmp2(info, 1);
1647 }

References build_chk2_cmp2(), info(), LIMIT_CPU_TYPES, and M68020_PLUS.

◆ d68020_chk_32()

static void d68020_chk_32 ( m68k_info info)
static

Definition at line 1637 of file M68KDisassembler.c.

1638 {
1641 }

References build_er_1(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_CHK.

◆ d68020_cmpi_pcdi_16()

static void d68020_cmpi_pcdi_16 ( m68k_info info)
static

◆ d68020_cmpi_pcdi_32()

static void d68020_cmpi_pcdi_32 ( m68k_info info)
static

◆ d68020_cmpi_pcdi_8()

static void d68020_cmpi_pcdi_8 ( m68k_info info)
static

◆ d68020_cmpi_pcix_16()

static void d68020_cmpi_pcix_16 ( m68k_info info)
static

◆ d68020_cmpi_pcix_32()

static void d68020_cmpi_pcix_32 ( m68k_info info)
static

◆ d68020_cmpi_pcix_8()

static void d68020_cmpi_pcix_8 ( m68k_info info)
static

◆ d68020_cpbcc_16()

static void d68020_cpbcc_16 ( m68k_info info)
static

Definition at line 1781 of file M68KDisassembler.c.

1782 {
1783  cs_m68k_op* op0;
1784  cs_m68k* ext;
1786 
1787  // these are all in row with the extension so just doing a add here is fine
1788  info->inst->Opcode += (info->ir & 0x2f);
1789 
1790  ext = build_init_op(info, M68K_INS_FBF, 1, 2);
1791  op0 = &ext->operands[0];
1792 
1794 
1797 }
static void make_cpbcc_operand(cs_m68k_op *op, int size, int displacement)
@ M68K_INS_FBF
Definition: m68k.h:315
@ M68K_OP_BR_DISP_SIZE_WORD
signed 16-bit displacement
Definition: m68k.h:144

References build_init_op(), ext, info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_GRP_BRANCH_RELATIVE, M68K_GRP_JUMP, M68K_INS_FBF, M68K_OP_BR_DISP_SIZE_WORD, make_cpbcc_operand(), make_int_16(), read_imm_16(), and set_insn_group().

◆ d68020_cpbcc_32()

static void d68020_cpbcc_32 ( m68k_info info)
static

Definition at line 1799 of file M68KDisassembler.c.

1800 {
1801  cs_m68k* ext;
1802  cs_m68k_op* op0;
1803 
1805 
1807 
1808  // these are all in row with the extension so just doing a add here is fine
1809  info->inst->Opcode += (info->ir & 0x2f);
1810 
1811  ext = build_init_op(info, M68K_INS_FBF, 1, 4);
1812  op0 = &ext->operands[0];
1813 
1815 
1818 }

References build_init_op(), ext, info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_GRP_BRANCH_RELATIVE, M68K_GRP_JUMP, M68K_INS_FBF, M68K_OP_BR_DISP_SIZE_LONG, make_cpbcc_operand(), read_imm_32(), and set_insn_group().

◆ d68020_cpdbcc()

static void d68020_cpdbcc ( m68k_info info)
static

Definition at line 1820 of file M68KDisassembler.c.

1821 {
1822  cs_m68k* ext;
1823  cs_m68k_op* op0;
1824  cs_m68k_op* op1;
1825  uint32_t ext1, ext2;
1826 
1828 
1829  ext1 = read_imm_16(info);
1830  ext2 = read_imm_16(info);
1831 
1832  // these are all in row with the extension so just doing a add here is fine
1833  info->inst->Opcode += (ext1 & 0x2f);
1834 
1835  ext = build_init_op(info, M68K_INS_FDBF, 2, 0);
1836  op0 = &ext->operands[0];
1837  op1 = &ext->operands[1];
1838 
1839  op0->reg = M68K_REG_D0 + (info->ir & 7);
1840 
1842 
1845 }
@ M68K_INS_FDBF
Definition: m68k.h:350

References build_init_op(), ext, info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_GRP_BRANCH_RELATIVE, M68K_GRP_JUMP, M68K_INS_FDBF, M68K_OP_BR_DISP_SIZE_WORD, M68K_REG_D0, make_cpbcc_operand(), make_int_16(), read_imm_16(), cs_m68k_op::reg, and set_insn_group().

◆ d68020_cpgen()

static void d68020_cpgen ( m68k_info info)
static

Definition at line 1917 of file M68KDisassembler.c.

1918 {
1919  cs_m68k *ext;
1920  cs_m68k_op* op0;
1921  cs_m68k_op* op1;
1922  bool supports_single_op;
1923  uint32_t next;
1924  int rm, src, dst, opmode;
1925 
1926 
1928 
1929  supports_single_op = true;
1930 
1931  next = read_imm_16(info);
1932 
1933  rm = (next >> 14) & 0x1;
1934  src = (next >> 10) & 0x7;
1935  dst = (next >> 7) & 0x7;
1936  opmode = next & 0x3f;
1937 
1938  // special handling for fmovecr
1939 
1940  if (BITFIELD(info->ir, 5, 0) == 0 && BITFIELD(next, 15, 10) == 0x17) {
1941  cs_m68k_op* op0;
1942  cs_m68k_op* op1;
1944 
1945  op0 = &ext->operands[0];
1946  op1 = &ext->operands[1];
1947 
1949  op0->type = M68K_OP_IMM;
1950  op0->imm = next & 0x3f;
1951 
1952  op1->reg = M68K_REG_FP0 + ((next >> 7) & 7);
1953 
1954  return;
1955  }
1956 
1957  // deal with extended move stuff
1958 
1959  switch ((next >> 13) & 0x7) {
1960  // fmovem fpcr
1961  case 0x4: // FMOVEM ea, FPCR
1962  case 0x5: // FMOVEM FPCR, ea
1963  fmove_fpcr(info, next);
1964  return;
1965 
1966  // fmovem list
1967  case 0x6:
1968  case 0x7:
1969  fmovem(info, next);
1970  return;
1971  }
1972 
1973  // See comment bellow on why this is being done
1974 
1975  if ((next >> 6) & 1)
1976  opmode &= ~4;
1977 
1978  // special handling of some instructions here
1979 
1980  switch (opmode) {
1981  case 0x00: MCInst_setOpcode(info->inst, M68K_INS_FMOVE); supports_single_op = false; break;
1982  case 0x01: MCInst_setOpcode(info->inst, M68K_INS_FINT); break;
1983  case 0x02: MCInst_setOpcode(info->inst, M68K_INS_FSINH); break;
1984  case 0x03: MCInst_setOpcode(info->inst, M68K_INS_FINTRZ); break;
1985  case 0x04: MCInst_setOpcode(info->inst, M68K_INS_FSQRT); break;
1986  case 0x06: MCInst_setOpcode(info->inst, M68K_INS_FLOGNP1); break;
1987  case 0x08: MCInst_setOpcode(info->inst, M68K_INS_FETOXM1); break;
1988  case 0x09: MCInst_setOpcode(info->inst, M68K_INS_FATANH); break;
1989  case 0x0a: MCInst_setOpcode(info->inst, M68K_INS_FATAN); break;
1990  case 0x0c: MCInst_setOpcode(info->inst, M68K_INS_FASIN); break;
1991  case 0x0d: MCInst_setOpcode(info->inst, M68K_INS_FATANH); break;
1992  case 0x0e: MCInst_setOpcode(info->inst, M68K_INS_FSIN); break;
1993  case 0x0f: MCInst_setOpcode(info->inst, M68K_INS_FTAN); break;
1994  case 0x10: MCInst_setOpcode(info->inst, M68K_INS_FETOX); break;
1995  case 0x11: MCInst_setOpcode(info->inst, M68K_INS_FTWOTOX); break;
1996  case 0x12: MCInst_setOpcode(info->inst, M68K_INS_FTENTOX); break;
1997  case 0x14: MCInst_setOpcode(info->inst, M68K_INS_FLOGN); break;
1998  case 0x15: MCInst_setOpcode(info->inst, M68K_INS_FLOG10); break;
1999  case 0x16: MCInst_setOpcode(info->inst, M68K_INS_FLOG2); break;
2000  case 0x18: MCInst_setOpcode(info->inst, M68K_INS_FABS); break;
2001  case 0x19: MCInst_setOpcode(info->inst, M68K_INS_FCOSH); break;
2002  case 0x1a: MCInst_setOpcode(info->inst, M68K_INS_FNEG); break;
2003  case 0x1c: MCInst_setOpcode(info->inst, M68K_INS_FACOS); break;
2004  case 0x1d: MCInst_setOpcode(info->inst, M68K_INS_FCOS); break;
2005  case 0x1e: MCInst_setOpcode(info->inst, M68K_INS_FGETEXP); break;
2006  case 0x1f: MCInst_setOpcode(info->inst, M68K_INS_FGETMAN); break;
2007  case 0x20: MCInst_setOpcode(info->inst, M68K_INS_FDIV); supports_single_op = false; break;
2008  case 0x21: MCInst_setOpcode(info->inst, M68K_INS_FMOD); supports_single_op = false; break;
2009  case 0x22: MCInst_setOpcode(info->inst, M68K_INS_FADD); supports_single_op = false; break;
2010  case 0x23: MCInst_setOpcode(info->inst, M68K_INS_FMUL); supports_single_op = false; break;
2011  case 0x24: MCInst_setOpcode(info->inst, M68K_INS_FSGLDIV); supports_single_op = false; break;
2012  case 0x25: MCInst_setOpcode(info->inst, M68K_INS_FREM); break;
2013  case 0x26: MCInst_setOpcode(info->inst, M68K_INS_FSCALE); break;
2014  case 0x27: MCInst_setOpcode(info->inst, M68K_INS_FSGLMUL); break;
2015  case 0x28: MCInst_setOpcode(info->inst, M68K_INS_FSUB); supports_single_op = false; break;
2016  case 0x38: MCInst_setOpcode(info->inst, M68K_INS_FCMP); supports_single_op = false; break;
2017  case 0x3a: MCInst_setOpcode(info->inst, M68K_INS_FTST); break;
2018  default:
2019  break;
2020  }
2021 
2022  // Some trickery here! It's not documented but if bit 6 is set this is a s/d opcode and then
2023  // if bit 2 is set it's a d. As we already have set our opcode in the code above we can just
2024  // offset it as the following 2 op codes (if s/d is supported) will always be directly after it
2025 
2026  if ((next >> 6) & 1) {
2027  if ((next >> 2) & 1)
2028  info->inst->Opcode += 2;
2029  else
2030  info->inst->Opcode += 1;
2031  }
2032 
2033  ext = &info->extension;
2034 
2035  ext->op_count = 2;
2036  ext->op_size.type = M68K_SIZE_TYPE_CPU;
2037  ext->op_size.cpu_size = 0;
2038 
2039  // Special case - adjust direction of fmove
2040  if ((opmode == 0x00) && ((next >> 13) & 0x1) != 0) {
2041  op0 = &ext->operands[1];
2042  op1 = &ext->operands[0];
2043  } else {
2044  op0 = &ext->operands[0];
2045  op1 = &ext->operands[1];
2046  }
2047 
2048  if (rm == 0 && supports_single_op && src == dst) {
2049  ext->op_count = 1;
2050  op0->reg = M68K_REG_FP0 + dst;
2051  return;
2052  }
2053 
2054  if (rm == 1) {
2055  switch (src) {
2056  case 0x00 :
2057  ext->op_size.cpu_size = M68K_CPU_SIZE_LONG;
2058  get_ea_mode_op(info, op0, info->ir, 4);
2059  break;
2060 
2061  case 0x06 :
2062  ext->op_size.cpu_size = M68K_CPU_SIZE_BYTE;
2063  get_ea_mode_op(info, op0, info->ir, 1);
2064  break;
2065 
2066  case 0x04 :
2067  ext->op_size.cpu_size = M68K_CPU_SIZE_WORD;
2068  get_ea_mode_op(info, op0, info->ir, 2);
2069  break;
2070 
2071  case 0x01 :
2072  ext->op_size.type = M68K_SIZE_TYPE_FPU;
2073  ext->op_size.fpu_size = M68K_FPU_SIZE_SINGLE;
2074  get_ea_mode_op(info, op0, info->ir, 4);
2075  op0->type = M68K_OP_FP_SINGLE;
2076  break;
2077 
2078  case 0x05:
2079  ext->op_size.type = M68K_SIZE_TYPE_FPU;
2080  ext->op_size.fpu_size = M68K_FPU_SIZE_DOUBLE;
2081  get_ea_mode_op(info, op0, info->ir, 8);
2082  op0->type = M68K_OP_FP_DOUBLE;
2083  break;
2084 
2085  default :
2086  ext->op_size.type = M68K_SIZE_TYPE_FPU;
2087  ext->op_size.fpu_size = M68K_FPU_SIZE_EXTENDED;
2088  break;
2089  }
2090  } else {
2091  op0->reg = M68K_REG_FP0 + src;
2092  }
2093 
2094  op1->reg = M68K_REG_FP0 + dst;
2095 }
static void fmove_fpcr(m68k_info *info, uint32_t extension)
static void fmovem(m68k_info *info, uint32_t extension)
#define BITFIELD(val, sb, eb)
lzma_index * src
Definition: index.h:567
char * dst
Definition: lz4.h:724
@ M68K_CPU_SIZE_LONG
4 bytes in size
Definition: m68k.h:181
@ M68K_CPU_SIZE_WORD
2 bytes in size
Definition: m68k.h:180
@ M68K_CPU_SIZE_BYTE
1 byte in size
Definition: m68k.h:179
@ M68K_SIZE_TYPE_FPU
Definition: m68k.h:197
@ M68K_OP_FP_SINGLE
single precision Floating-Point operand
Definition: m68k.h:117
@ M68K_OP_FP_DOUBLE
double precision Floating-Point operand
Definition: m68k.h:118
@ M68K_FPU_SIZE_SINGLE
4 byte in size (single float)
Definition: m68k.h:187
@ M68K_FPU_SIZE_DOUBLE
8 byte in size (double)
Definition: m68k.h:188
@ M68K_FPU_SIZE_EXTENDED
12 byte in size (extended real format)
Definition: m68k.h:189
@ M68K_INS_FGETMAN
Definition: m68k.h:388
@ M68K_INS_FCOS
Definition: m68k.h:348
@ M68K_INS_FLOGN
Definition: m68k.h:393
@ M68K_INS_FATAN
Definition: m68k.h:313
@ M68K_INS_FINTRZ
Definition: m68k.h:390
@ M68K_INS_FETOX
Definition: m68k.h:385
@ M68K_INS_FTAN
Definition: m68k.h:455
@ M68K_INS_FLOGNP1
Definition: m68k.h:394
@ M68K_INS_FINT
Definition: m68k.h:389
@ M68K_INS_FMOD
Definition: m68k.h:395
@ M68K_INS_FCOSH
Definition: m68k.h:349
@ M68K_INS_FCMP
Definition: m68k.h:347
@ M68K_INS_FTST
Definition: m68k.h:490
@ M68K_INS_FSUB
Definition: m68k.h:452
@ M68K_INS_FSINH
Definition: m68k.h:416
@ M68K_INS_FABS
Definition: m68k.h:305
@ M68K_INS_FADD
Definition: m68k.h:309
@ M68K_INS_FETOXM1
Definition: m68k.h:386
@ M68K_INS_FMOVECR
Definition: m68k.h:399
@ M68K_INS_FMUL
Definition: m68k.h:401
@ M68K_INS_FSCALE
Definition: m68k.h:411
@ M68K_INS_FSQRT
Definition: m68k.h:417
@ M68K_INS_FMOVE
Definition: m68k.h:396
@ M68K_INS_FLOG10
Definition: m68k.h:391
@ M68K_INS_FSGLMUL
Definition: m68k.h:413
@ M68K_INS_FREM
Definition: m68k.h:408
@ M68K_INS_FATANH
Definition: m68k.h:314
@ M68K_INS_FGETEXP
Definition: m68k.h:387
@ M68K_INS_FTENTOX
Definition: m68k.h:457
@ M68K_INS_FACOS
Definition: m68k.h:308
@ M68K_INS_FLOG2
Definition: m68k.h:392
@ M68K_INS_FSGLDIV
Definition: m68k.h:412
@ M68K_INS_FSIN
Definition: m68k.h:414
@ M68K_INS_FDIV
Definition: m68k.h:382
@ M68K_INS_FNEG
Definition: m68k.h:404
@ M68K_INS_FTWOTOX
Definition: m68k.h:491
@ M68K_INS_FASIN
Definition: m68k.h:312
@ M68K_REG_FP0
Definition: m68k.h:41

References cs_m68k_op::address_mode, BITFIELD, build_init_op(), test-lz4-speed::default, dst, ext, fmove_fpcr(), fmovem(), get_ea_mode_op(), cs_m68k_op::imm, info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_AM_IMMEDIATE, M68K_CPU_SIZE_BYTE, M68K_CPU_SIZE_LONG, M68K_CPU_SIZE_WORD, M68K_FPU_SIZE_DOUBLE, M68K_FPU_SIZE_EXTENDED, M68K_FPU_SIZE_SINGLE, M68K_INS_FABS, M68K_INS_FACOS, M68K_INS_FADD, M68K_INS_FASIN, M68K_INS_FATAN, M68K_INS_FATANH, M68K_INS_FCMP, M68K_INS_FCOS, M68K_INS_FCOSH, M68K_INS_FDIV, M68K_INS_FETOX, M68K_INS_FETOXM1, M68K_INS_FGETEXP, M68K_INS_FGETMAN, M68K_INS_FINT, M68K_INS_FINTRZ, M68K_INS_FLOG10, M68K_INS_FLOG2, M68K_INS_FLOGN, M68K_INS_FLOGNP1, M68K_INS_FMOD, M68K_INS_FMOVE, M68K_INS_FMOVECR, M68K_INS_FMUL, M68K_INS_FNEG, M68K_INS_FREM, M68K_INS_FSCALE, M68K_INS_FSGLDIV, M68K_INS_FSGLMUL, M68K_INS_FSIN, M68K_INS_FSINH, M68K_INS_FSQRT, M68K_INS_FSUB, M68K_INS_FTAN, M68K_INS_FTENTOX, M68K_INS_FTST, M68K_INS_FTWOTOX, M68K_OP_FP_DOUBLE, M68K_OP_FP_SINGLE, M68K_OP_IMM, M68K_REG_FP0, M68K_SIZE_TYPE_CPU, M68K_SIZE_TYPE_FPU, MCInst_setOpcode(), read_imm_16(), cs_m68k_op::reg, src, and cs_m68k_op::type.

◆ d68020_cprestore()

static void d68020_cprestore ( m68k_info info)
static

Definition at line 2097 of file M68KDisassembler.c.

2098 {
2099  cs_m68k* ext;
2101 
2103  get_ea_mode_op(info, &ext->operands[0], info->ir, 1);
2104 }
@ M68K_INS_FRESTORE
Definition: m68k.h:409

References build_init_op(), ext, get_ea_mode_op(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_FRESTORE.

◆ d68020_cpsave()

static void d68020_cpsave ( m68k_info info)
static

Definition at line 2106 of file M68KDisassembler.c.

2107 {
2108  cs_m68k* ext;
2109 
2111 
2113  get_ea_mode_op(info, &ext->operands[0], info->ir, 1);
2114 }
@ M68K_INS_FSAVE
Definition: m68k.h:410

References build_init_op(), ext, get_ea_mode_op(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_FSAVE.

◆ d68020_cpscc()

static void d68020_cpscc ( m68k_info info)
static

Definition at line 2116 of file M68KDisassembler.c.

2117 {
2118  cs_m68k* ext;
2119 
2121  ext = build_init_op(info, M68K_INS_FSF, 1, 1);
2122 
2123  // these are all in row with the extension so just doing a add here is fine
2124  info->inst->Opcode += (read_imm_16(info) & 0x2f);
2125 
2126  get_ea_mode_op(info, &ext->operands[0], info->ir, 1);
2127 }
@ M68K_INS_FSF
Definition: m68k.h:420

References build_init_op(), ext, get_ea_mode_op(), info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_INS_FSF, and read_imm_16().

◆ d68020_cptrapcc_0()

static void d68020_cptrapcc_0 ( m68k_info info)
static

Definition at line 2129 of file M68KDisassembler.c.

2130 {
2131  uint32_t extension1;
2133 
2134  extension1 = read_imm_16(info);
2135 
2137 
2138  // these are all in row with the extension so just doing a add here is fine
2139  info->inst->Opcode += (extension1 & 0x2f);
2140 }
@ M68K_INS_FTRAPF
Definition: m68k.h:458

References build_init_op(), info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_INS_FTRAPF, and read_imm_16().

◆ d68020_cptrapcc_16()

static void d68020_cptrapcc_16 ( m68k_info info)
static

Definition at line 2142 of file M68KDisassembler.c.

2143 {
2144  uint32_t extension1, extension2;
2145  cs_m68k_op* op0;
2146  cs_m68k* ext;
2147 
2149 
2150  extension1 = read_imm_16(info);
2151  extension2 = read_imm_16(info);
2152 
2154 
2155  // these are all in row with the extension so just doing a add here is fine
2156  info->inst->Opcode += (extension1 & 0x2f);
2157 
2158  op0 = &ext->operands[0];
2159 
2161  op0->type = M68K_OP_IMM;
2162  op0->imm = extension2;
2163 }

References cs_m68k_op::address_mode, build_init_op(), ext, cs_m68k_op::imm, info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_AM_IMMEDIATE, M68K_INS_FTRAPF, M68K_OP_IMM, read_imm_16(), and cs_m68k_op::type.

◆ d68020_cptrapcc_32()

static void d68020_cptrapcc_32 ( m68k_info info)
static

Definition at line 2165 of file M68KDisassembler.c.

2166 {
2167  uint32_t extension1, extension2;
2168  cs_m68k* ext;
2169  cs_m68k_op* op0;
2170 
2172 
2173  extension1 = read_imm_16(info);
2174  extension2 = read_imm_32(info);
2175 
2177 
2178  // these are all in row with the extension so just doing a add here is fine
2179  info->inst->Opcode += (extension1 & 0x2f);
2180 
2181  op0 = &ext->operands[0];
2182 
2184  op0->type = M68K_OP_IMM;
2185  op0->imm = extension2;
2186 }

References cs_m68k_op::address_mode, build_init_op(), ext, cs_m68k_op::imm, info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_AM_IMMEDIATE, M68K_INS_FTRAPF, M68K_OP_IMM, read_imm_16(), read_imm_32(), and cs_m68k_op::type.

◆ d68020_divl()

static void d68020_divl ( m68k_info info)
static

Definition at line 2214 of file M68KDisassembler.c.

2215 {
2216  uint32_t extension, insn_signed;
2217  cs_m68k* ext;
2218  cs_m68k_op* op0;
2219  cs_m68k_op* op1;
2220  uint32_t reg_0, reg_1;
2221 
2223 
2224  extension = read_imm_16(info);
2225  insn_signed = 0;
2226 
2227  if (BIT_B((extension)))
2228  insn_signed = 1;
2229 
2230  ext = build_init_op(info, insn_signed ? M68K_INS_DIVS : M68K_INS_DIVU, 2, 4);
2231 
2232  op0 = &ext->operands[0];
2233  op1 = &ext->operands[1];
2234 
2235  get_ea_mode_op(info, op0, info->ir, 4);
2236 
2237  reg_0 = extension & 7;
2238  reg_1 = (extension >> 12) & 7;
2239 
2240  op1->address_mode = M68K_AM_NONE;
2241  op1->type = M68K_OP_REG_PAIR;
2242  op1->reg_pair.reg_0 = reg_0 + M68K_REG_D0;
2243  op1->reg_pair.reg_1 = reg_1 + M68K_REG_D0;
2244 
2245  if ((reg_0 == reg_1) || !BIT_A(extension)) {
2246  op1->type = M68K_OP_REG;
2247  op1->reg = M68K_REG_D0 + reg_1;
2248  }
2249 }
#define BIT_A(A)

References cs_m68k_op::address_mode, BIT_A, BIT_B, build_init_op(), ext, get_ea_mode_op(), info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_AM_NONE, M68K_INS_DIVS, M68K_INS_DIVU, M68K_OP_REG, M68K_OP_REG_PAIR, M68K_REG_D0, read_imm_16(), cs_m68k_op::reg, cs_m68k_op_reg_pair::reg_0, cs_m68k_op_reg_pair::reg_1, cs_m68k_op::reg_pair, and cs_m68k_op::type.

◆ d68020_extb_32()

static void d68020_extb_32 ( m68k_info info)
static

Definition at line 2338 of file M68KDisassembler.c.

2339 {
2341  build_d(info, M68K_INS_EXTB, 4);
2342 }
@ M68K_INS_EXTB
Definition: m68k.h:304

References build_d(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_EXTB.

◆ d68020_link_32()

static void d68020_link_32 ( m68k_info info)
static

Definition at line 2368 of file M68KDisassembler.c.

2369 {
2372 }

References build_link(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and read_imm_32().

◆ d68020_mull()

static void d68020_mull ( m68k_info info)
static

Definition at line 2759 of file M68KDisassembler.c.

2760 {
2761  uint32_t extension, insn_signed;
2762  cs_m68k* ext;
2763  cs_m68k_op* op0;
2764  cs_m68k_op* op1;
2765  uint32_t reg_0, reg_1;
2766 
2768 
2769  extension = read_imm_16(info);
2770  insn_signed = 0;
2771 
2772  if (BIT_B((extension)))
2773  insn_signed = 1;
2774 
2775  ext = build_init_op(info, insn_signed ? M68K_INS_MULS : M68K_INS_MULU, 2, 4);
2776 
2777  op0 = &ext->operands[0];
2778  op1 = &ext->operands[1];
2779 
2780  get_ea_mode_op(info, op0, info->ir, 4);
2781 
2782  reg_0 = extension & 7;
2783  reg_1 = (extension >> 12) & 7;
2784 
2785  op1->address_mode = M68K_AM_NONE;
2786  op1->type = M68K_OP_REG_PAIR;
2787  op1->reg_pair.reg_0 = reg_0 + M68K_REG_D0;
2788  op1->reg_pair.reg_1 = reg_1 + M68K_REG_D0;
2789 
2790  if (!BIT_A(extension)) {
2791  op1->type = M68K_OP_REG;
2792  op1->reg = M68K_REG_D0 + reg_1;
2793  }
2794 }

References cs_m68k_op::address_mode, BIT_A, BIT_B, build_init_op(), ext, get_ea_mode_op(), info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_AM_NONE, M68K_INS_MULS, M68K_INS_MULU, M68K_OP_REG, M68K_OP_REG_PAIR, M68K_REG_D0, read_imm_16(), cs_m68k_op::reg, cs_m68k_op_reg_pair::reg_0, cs_m68k_op_reg_pair::reg_1, cs_m68k_op::reg_pair, and cs_m68k_op::type.

◆ d68020_pack_mm()

static void d68020_pack_mm ( m68k_info info)
static

Definition at line 2912 of file M68KDisassembler.c.

2913 {
2916 }
@ M68K_INS_PACK
Definition: m68k.h:518

References build_mm(), info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_INS_PACK, and read_imm_16().

◆ d68020_pack_rr()

static void d68020_pack_rr ( m68k_info info)
static

Definition at line 2906 of file M68KDisassembler.c.

2907 {
2910 }

References build_rr(), info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_INS_PACK, and read_imm_16().

◆ d68020_rtm()

static void d68020_rtm ( m68k_info info)
static

Definition at line 3081 of file M68KDisassembler.c.

3082 {
3083  cs_m68k* ext;
3084  cs_m68k_op* op;
3085 
3087 
3089 
3091 
3092  ext = &info->extension;
3093  op = &ext->operands[0];
3094 
3095  op->address_mode = M68K_AM_NONE;
3096  op->type = M68K_OP_REG;
3097 
3098  if (BIT_3(info->ir)) {
3099  op->reg = M68K_REG_A0 + (info->ir & 7);
3100  } else {
3101  op->reg = M68K_REG_D0 + (info->ir & 7);
3102  }
3103 }
#define BIT_3(A)
@ M68K_INS_RTM
Definition: m68k.h:542

References BIT_3, build_absolute_jump_with_immediate(), ext, info(), LIMIT_CPU_TYPES, M68020_ONLY, M68K_AM_NONE, M68K_GRP_RET, M68K_INS_RTM, M68K_OP_REG, M68K_REG_A0, M68K_REG_D0, op, and set_insn_group().

◆ d68020_trapcc_0()

static void d68020_trapcc_0 ( m68k_info info)
static

Definition at line 3253 of file M68KDisassembler.c.

3254 {
3256  build_trap(info, 0, 0);
3257 
3258  info->extension.op_count = 0;
3259 }
static void build_trap(m68k_info *info, int size, int immediate)

References build_trap(), info(), LIMIT_CPU_TYPES, and M68020_PLUS.

◆ d68020_trapcc_16()

static void d68020_trapcc_16 ( m68k_info info)
static

Definition at line 3261 of file M68KDisassembler.c.

3262 {
3265 }

References build_trap(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and read_imm_16().

◆ d68020_trapcc_32()

static void d68020_trapcc_32 ( m68k_info info)
static

Definition at line 3267 of file M68KDisassembler.c.

3268 {
3271 }

References build_trap(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and read_imm_32().

◆ d68020_tst_a_16()

static void d68020_tst_a_16 ( m68k_info info)
static

Definition at line 3306 of file M68KDisassembler.c.

3307 {
3309  build_ea(info, M68K_INS_TST, 2);
3310 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_a_32()

static void d68020_tst_a_32 ( m68k_info info)
static

Definition at line 3335 of file M68KDisassembler.c.

3336 {
3338  build_ea(info, M68K_INS_TST, 4);
3339 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_i_16()

static void d68020_tst_i_16 ( m68k_info info)
static

Definition at line 3324 of file M68KDisassembler.c.

3325 {
3327  build_ea(info, M68K_INS_TST, 2);
3328 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_i_32()

static void d68020_tst_i_32 ( m68k_info info)
static

Definition at line 3353 of file M68KDisassembler.c.

3354 {
3356  build_ea(info, M68K_INS_TST, 4);
3357 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_i_8()

static void d68020_tst_i_8 ( m68k_info info)
static

Definition at line 3295 of file M68KDisassembler.c.

3296 {
3298  build_ea(info, M68K_INS_TST, 1);
3299 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_pcdi_16()

static void d68020_tst_pcdi_16 ( m68k_info info)
static

Definition at line 3312 of file M68KDisassembler.c.

3313 {
3315  build_ea(info, M68K_INS_TST, 2);
3316 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_pcdi_32()

static void d68020_tst_pcdi_32 ( m68k_info info)
static

Definition at line 3341 of file M68KDisassembler.c.

3342 {
3344  build_ea(info, M68K_INS_TST, 4);
3345 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_pcdi_8()

static void d68020_tst_pcdi_8 ( m68k_info info)
static

Definition at line 3283 of file M68KDisassembler.c.

3284 {
3286  build_ea(info, M68K_INS_TST, 1);
3287 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_pcix_16()

static void d68020_tst_pcix_16 ( m68k_info info)
static

Definition at line 3318 of file M68KDisassembler.c.

3319 {
3321  build_ea(info, M68K_INS_TST, 2);
3322 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_pcix_32()

static void d68020_tst_pcix_32 ( m68k_info info)
static

Definition at line 3347 of file M68KDisassembler.c.

3348 {
3350  build_ea(info, M68K_INS_TST, 4);
3351 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_tst_pcix_8()

static void d68020_tst_pcix_8 ( m68k_info info)
static

Definition at line 3289 of file M68KDisassembler.c.

3290 {
3292  build_ea(info, M68K_INS_TST, 1);
3293 }

References build_ea(), info(), LIMIT_CPU_TYPES, M68020_PLUS, and M68K_INS_TST.

◆ d68020_unpk_mm()

static void d68020_unpk_mm ( m68k_info info)
static

Definition at line 3376 of file M68KDisassembler.c.

3377 {
3380 }
@ M68K_INS_UNPK
Definition: m68k.h:594

References build_mm(), info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_INS_UNPK, and read_imm_16().

◆ d68020_unpk_rr()

static void d68020_unpk_rr ( m68k_info info)
static

Definition at line 3370 of file M68KDisassembler.c.

3371 {
3374 }

References build_rr(), info(), LIMIT_CPU_TYPES, M68020_PLUS, M68K_INS_UNPK, and read_imm_16().

◆ d68040_cinv()

static void d68040_cinv ( m68k_info info)
static

Definition at line 1661 of file M68KDisassembler.c.

1662 {
1665 }
#define M68040_PLUS
static void build_cpush_cinv(m68k_info *info, int op_offset)
@ M68K_INS_CINVL
Definition: m68k.h:273

References build_cpush_cinv(), info(), LIMIT_CPU_TYPES, M68040_PLUS, and M68K_INS_CINVL.

◆ d68040_cpush()

static void d68040_cpush ( m68k_info info)
static

Definition at line 2188 of file M68KDisassembler.c.

2189 {
2192 }
@ M68K_INS_CPUSHL
Definition: m68k.h:276

References build_cpush_cinv(), info(), LIMIT_CPU_TYPES, M68040_PLUS, and M68K_INS_CPUSHL.

◆ d68040_move16_ai_al()

static void d68040_move16_ai_al ( m68k_info info)
static

Definition at line 2729 of file M68KDisassembler.c.

2730 {
2731  int data[] = { info->ir & 7, read_imm_32(info) };
2733 
2735 
2736  build_move16(info, data, modes);
2737 }
static void build_move16(m68k_info *info, int data[2], int modes[2])
@ M68K_AM_ABSOLUTE_DATA_LONG
Absolute Data Addressing - Long.
Definition: m68k.h:105

References build_move16(), info(), LIMIT_CPU_TYPES, M68040_PLUS, M68K_AM_ABSOLUTE_DATA_LONG, M68K_AM_REG_DIRECT_ADDR, and read_imm_32().

◆ d68040_move16_al_ai()

static void d68040_move16_al_ai ( m68k_info info)
static

Definition at line 2739 of file M68KDisassembler.c.

2740 {
2741  int data[] = { read_imm_32(info), info->ir & 7 };
2743 
2745 
2746  build_move16(info, data, modes);
2747 }

References build_move16(), info(), LIMIT_CPU_TYPES, M68040_PLUS, M68K_AM_ABSOLUTE_DATA_LONG, M68K_AM_REG_DIRECT_ADDR, and read_imm_32().

◆ d68040_move16_al_pi()

static void d68040_move16_al_pi ( m68k_info info)
static

Definition at line 2719 of file M68KDisassembler.c.

2720 {
2721  int data[] = { read_imm_32(info), info->ir & 7 };
2723 
2725 
2726  build_move16(info, data, modes);
2727 }

References build_move16(), info(), LIMIT_CPU_TYPES, M68040_PLUS, M68K_AM_ABSOLUTE_DATA_LONG, M68K_AM_REGI_ADDR_POST_INC, and read_imm_32().

◆ d68040_move16_pi_al()

static void d68040_move16_pi_al ( m68k_info info)
static

Definition at line 2709 of file M68KDisassembler.c.

2710 {
2711  int data[] = { info->ir & 7, read_imm_32(info) };
2713 
2715 
2716  build_move16(info, data, modes);
2717 }

References build_move16(), info(), LIMIT_CPU_TYPES, M68040_PLUS, M68K_AM_ABSOLUTE_DATA_LONG, M68K_AM_REGI_ADDR_POST_INC, and read_imm_32().

◆ d68040_move16_pi_pi()

static void d68040_move16_pi_pi ( m68k_info info)
static

Definition at line 2699 of file M68KDisassembler.c.

2700 {
2701  int data[] = { info->ir & 7, (read_imm_16(info) >> 12) & 7 };
2703 
2705 
2706  build_move16(info, data, modes);
2707 }

References build_move16(), info(), LIMIT_CPU_TYPES, M68040_PLUS, M68K_AM_REGI_ADDR_POST_INC, and read_imm_16().

◆ exists_reg_list()

static int exists_reg_list ( uint16_t regs,
uint8_t  count,
m68k_reg  reg 
)
static

Definition at line 3399 of file M68KDisassembler.c.

3400 {
3401  uint8_t i;
3402 
3403  for (i = 0; i < count; ++i) {
3404  if (regs[i] == (uint16_t)reg)
3405  return 1;
3406  }
3407 
3408  return 0;
3409 }
static char * regs[]
Definition: analysis_sh.c:203

References count, i, reg, and regs.

Referenced by add_reg_to_rw_list().

◆ fmove_fpcr()

static void fmove_fpcr ( m68k_info info,
uint32_t  extension 
)
static

Definition at line 1847 of file M68KDisassembler.c.

1848 {
1850  cs_m68k_op* op_ea;
1851 
1852  int regsel = (extension >> 10) & 0x7;
1853  int dir = (extension >> 13) & 0x1;
1854 
1856 
1857  special = &ext->operands[0];
1858  op_ea = &ext->operands[1];
1859 
1860  if (!dir) {
1861  cs_m68k_op* t = special;
1862  special = op_ea;
1863  op_ea = t;
1864  }
1865 
1866  get_ea_mode_op(info, op_ea, info->ir, 4);
1867 
1868  if (regsel & 4)
1869  special->reg = M68K_REG_FPCR;
1870  else if (regsel & 2)
1871  special->reg = M68K_REG_FPSR;
1872  else if (regsel & 1)
1873  special->reg = M68K_REG_FPIAR;
1874 }
@ M68K_REG_FPIAR
Definition: m68k.h:73
@ M68K_REG_FPCR
Definition: m68k.h:71
@ M68K_REG_FPSR
Definition: m68k.h:72
static void special(struct parse *, int)
Definition: regcomp.c:1076

References build_init_op(), ext, get_ea_mode_op(), info(), M68K_INS_FMOVE, M68K_REG_FPCR, M68K_REG_FPIAR, M68K_REG_FPSR, and special().

Referenced by d68020_cpgen().

◆ fmovem()

static void fmovem ( m68k_info info,
uint32_t  extension 
)
static

Definition at line 1876 of file M68KDisassembler.c.

1877 {
1878  cs_m68k_op* op_reglist;
1879  cs_m68k_op* op_ea;
1880  int dir = (extension >> 13) & 0x1;
1881  int mode = (extension >> 11) & 0x3;
1882  uint32_t reglist = extension & 0xff;
1884 
1885  op_reglist = &ext->operands[0];
1886  op_ea = &ext->operands[1];
1887 
1888  // flip args around
1889 
1890  if (!dir) {
1891  cs_m68k_op* t = op_reglist;
1892  op_reglist = op_ea;
1893  op_ea = t;
1894  }
1895 
1896  get_ea_mode_op(info, op_ea, info->ir, 0);
1897 
1898  switch (mode) {
1899  case 1 : // Dynamic list in dn register
1900  op_reglist->reg = M68K_REG_D0 + ((reglist >> 4) & 7);
1901  break;
1902 
1903  case 0 :
1904  op_reglist->address_mode = M68K_AM_NONE;
1905  op_reglist->type = M68K_OP_REG_BITS;
1906  op_reglist->register_bits = reglist << 16;
1907  break;
1908 
1909  case 2 : // Static list
1910  op_reglist->address_mode = M68K_AM_NONE;
1911  op_reglist->type = M68K_OP_REG_BITS;
1912  op_reglist->register_bits = ((uint32_t)reverse_bits_8(reglist)) << 16;
1913  break;
1914  }
1915 }
static uint8_t reverse_bits_8(uint32_t v)
const char int mode
Definition: ioapi.h:137
@ M68K_INS_FMOVEM
Definition: m68k.h:400

References cs_m68k_op::address_mode, build_init_op(), ext, get_ea_mode_op(), info(), M68K_AM_NONE, M68K_INS_FMOVEM, M68K_OP_REG_BITS, M68K_REG_D0, cs_m68k_op::reg, cs_m68k_op::register_bits, reverse_bits_8(), and cs_m68k_op::type.

Referenced by d68020_cpgen().

◆ get_ea_mode_op()

static void get_ea_mode_op ( m68k_info info,
cs_m68k_op op,
uint32_t  instruction,
uint32_t  size 
)
static

Definition at line 395 of file M68KDisassembler.c.

396 {
397  // default to memory
398 
399  op->type = M68K_OP_MEM;
400 
401  switch (instruction & 0x3f) {
402  case 0x00: case 0x01: case 0x02: case 0x03: case 0x04: case 0x05: case 0x06: case 0x07:
403  /* data register direct */
404  op->address_mode = M68K_AM_REG_DIRECT_DATA;
405  op->reg = M68K_REG_D0 + (instruction & 7);
406  op->type = M68K_OP_REG;
407  break;
408 
409  case 0x08: case 0x09: case 0x0a: case 0x0b: case 0x0c: case 0x0d: case 0x0e: case 0x0f:
410  /* address register direct */
411  op->address_mode = M68K_AM_REG_DIRECT_ADDR;
412  op->reg = M68K_REG_A0 + (instruction & 7);
413  op->type = M68K_OP_REG;
414  break;
415 
416  case 0x10: case 0x11: case 0x12: case 0x13: case 0x14: case 0x15: case 0x16: case 0x17:
417  /* address register indirect */
418  op->address_mode = M68K_AM_REGI_ADDR;
419  op->reg = M68K_REG_A0 + (instruction & 7);
420  break;
421 
422  case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f:
423  /* address register indirect with postincrement */
424  op->address_mode = M68K_AM_REGI_ADDR_POST_INC;
425  op->reg = M68K_REG_A0 + (instruction & 7);
426  break;
427 
428  case 0x20: case 0x21: case 0x22: case 0x23: case 0x24: case 0x25: case 0x26: case 0x27:
429  /* address register indirect with predecrement */
430  op->address_mode = M68K_AM_REGI_ADDR_PRE_DEC;
431  op->reg = M68K_REG_A0 + (instruction & 7);
432  break;
433 
434  case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2c: case 0x2d: case 0x2e: case 0x2f:
435  /* address register indirect with displacement*/
436  op->address_mode = M68K_AM_REGI_ADDR_DISP;
437  op->mem.base_reg = M68K_REG_A0 + (instruction & 7);
438  op->mem.disp = (int16_t)read_imm_16(info);
439  break;
440 
441  case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37:
442  /* address register indirect with index */
444  break;
445 
446  case 0x38:
447  /* absolute short address */
448  op->address_mode = M68K_AM_ABSOLUTE_DATA_SHORT;
449  op->imm = read_imm_16(info);
450  break;
451 
452  case 0x39:
453  /* absolute long address */
454  op->address_mode = M68K_AM_ABSOLUTE_DATA_LONG;
455  op->imm = read_imm_32(info);
456  break;
457 
458  case 0x3a:
459  /* program counter with displacement */
460  op->address_mode = M68K_AM_PCI_DISP;
461  op->mem.disp = (int16_t)read_imm_16(info);
462  break;
463 
464  case 0x3b:
465  /* program counter with index */
467  break;
468 
469  case 0x3c:
470  op->address_mode = M68K_AM_IMMEDIATE;
471  op->type = M68K_OP_IMM;
472 
473  if (size == 1)
474  op->imm = read_imm_8(info) & 0xff;
475  else if (size == 2)
476  op->imm = read_imm_16(info) & 0xffff;
477  else if (size == 4)
478  op->imm = read_imm_32(info);
479  else
480  op->imm = read_imm_64(info);
481 
482  break;
483 
484  default:
485  break;
486  }
487 }
static void get_with_index_address_mode(m68k_info *info, cs_m68k_op *op, uint32_t instruction, uint32_t size, bool is_pc)
static unsigned long long read_imm_64(m68k_info *info)
@ M68K_AM_REGI_ADDR
Register Indirect - Address.
Definition: m68k.h:85
@ M68K_AM_ABSOLUTE_DATA_SHORT
Absolute Data Addressing - Short.
Definition: m68k.h:104
@ M68K_AM_PCI_DISP
Program Counter Indirect - with Displacement.
Definition: m68k.h:96

References get_with_index_address_mode(), info(), M68K_AM_ABSOLUTE_DATA_LONG, M68K_AM_ABSOLUTE_DATA_SHORT, M68K_AM_IMMEDIATE, M68K_AM_PCI_DISP, M68K_AM_REG_DIRECT_ADDR, M68K_AM_REG_DIRECT_DATA, M68K_AM_REGI_ADDR, M68K_AM_REGI_ADDR_DISP, M68K_AM_REGI_ADDR_POST_INC, M68K_AM_REGI_ADDR_PRE_DEC, M68K_OP_IMM, M68K_OP_MEM, M68K_OP_REG, M68K_REG_A0, M68K_REG_D0, read_imm_16(), read_imm_32(), read_imm_64(), and read_imm_8().

Referenced by build_3bit_ea(), build_bitfield_ins(), build_chk2_cmp2(), build_d_d_ea(), build_ea(), build_ea_a(), build_ea_ea(), build_er_gen_1(), build_imm_ea(), build_movem_er(), build_movem_re(), build_moves(), build_re_gen_1(), d68000_jmp(), d68000_jsr(), d68000_move_fr_sr(), d68000_move_to_ccr(), d68000_move_to_sr(), d68000_scc(), d68010_move_fr_ccr(), d68020_cpgen(), d68020_cprestore(), d68020_cpsave(), d68020_cpscc(), d68020_divl(), d68020_mull(), fmove_fpcr(), and fmovem().

◆ get_with_index_address_mode()

static void get_with_index_address_mode ( m68k_info info,
cs_m68k_op op,
uint32_t  instruction,
uint32_t  size,
bool  is_pc 
)
static

Definition at line 310 of file M68KDisassembler.c.

311 {
312  uint32_t extension = read_imm_16(info);
313 
314  op->address_mode = M68K_AM_AREGI_INDEX_BASE_DISP;
315 
316  if (EXT_FULL(extension)) {
317  uint32_t preindex;
318  uint32_t postindex;
319 
320  op->mem.base_reg = M68K_REG_INVALID;
321  op->mem.index_reg = M68K_REG_INVALID;
322 
323  /* Not sure how to deal with this?
324  if (EXT_EFFECTIVE_ZERO(extension)) {
325  strcpy(mode, "0");
326  break;
327  }
328  */
329 
330  op->mem.in_disp = EXT_BASE_DISPLACEMENT_PRESENT(extension) ? (EXT_BASE_DISPLACEMENT_LONG(extension) ? read_imm_32(info) : read_imm_16(info)) : 0;
331  op->mem.out_disp = EXT_OUTER_DISPLACEMENT_PRESENT(extension) ? (EXT_OUTER_DISPLACEMENT_LONG(extension) ? read_imm_32(info) : read_imm_16(info)) : 0;
332 
333  if (EXT_BASE_REGISTER_PRESENT(extension)) {
334  if (is_pc) {
335  op->mem.base_reg = M68K_REG_PC;
336  } else {
337  op->mem.base_reg = M68K_REG_A0 + (instruction & 7);
338  }
339  }
340 
341  if (EXT_INDEX_REGISTER_PRESENT(extension)) {
342  if (EXT_INDEX_AR(extension)) {
343  op->mem.index_reg = M68K_REG_A0 + EXT_INDEX_REGISTER(extension);
344  } else {
345  op->mem.index_reg = M68K_REG_D0 + EXT_INDEX_REGISTER(extension);
346  }
347 
348  op->mem.index_size = EXT_INDEX_LONG(extension) ? 1 : 0;
349 
350  if (EXT_INDEX_SCALE(extension)) {
351  op->mem.scale = 1 << EXT_INDEX_SCALE(extension);
352  }
353  }
354 
355  preindex = (extension & 7) > 0 && (extension & 7) < 4;
356  postindex = (extension & 7) > 4;
357 
358  if (preindex) {
359  op->address_mode = is_pc ? M68K_AM_PC_MEMI_PRE_INDEX : M68K_AM_MEMI_PRE_INDEX;
360  } else if (postindex) {
361  op->address_mode = is_pc ? M68K_AM_PC_MEMI_POST_INDEX : M68K_AM_MEMI_POST_INDEX;
362  }
363 
364  return;
365  }
366 
367  op->mem.index_reg = (EXT_INDEX_AR(extension) ? M68K_REG_A0 : M68K_REG_D0) + EXT_INDEX_REGISTER(extension);
368  op->mem.index_size = EXT_INDEX_LONG(extension) ? 1 : 0;
369 
370  if (EXT_8BIT_DISPLACEMENT(extension) == 0) {
371  if (is_pc) {
372  op->mem.base_reg = M68K_REG_PC;
373  op->address_mode = M68K_AM_PCI_INDEX_BASE_DISP;
374  } else {
375  op->mem.base_reg = M68K_REG_A0 + (instruction & 7);
376  }
377  } else {
378  if (is_pc) {
379  op->mem.base_reg = M68K_REG_PC;
380  op->address_mode = M68K_AM_PCI_INDEX_8_BIT_DISP;
381  } else {
382  op->mem.base_reg = M68K_REG_A0 + (instruction & 7);
383  op->address_mode = M68K_AM_AREGI_INDEX_8_BIT_DISP;
384  }
385 
386  op->mem.disp = (int8_t)(extension & 0xff);
387  }
388 
389  if (EXT_INDEX_SCALE(extension)) {
390  op->mem.scale = 1 << EXT_INDEX_SCALE(extension);
391  }
392 }
#define EXT_INDEX_REGISTER_PRESENT(A)
#define EXT_BASE_DISPLACEMENT_LONG(A)
#define EXT_8BIT_DISPLACEMENT(A)
#define EXT_INDEX_LONG(A)
#define EXT_OUTER_DISPLACEMENT_PRESENT(A)
#define EXT_BASE_REGISTER_PRESENT(A)
#define EXT_BASE_DISPLACEMENT_PRESENT(A)
#define EXT_INDEX_REGISTER(A)
#define EXT_INDEX_SCALE(A)
#define EXT_INDEX_AR(A)
#define EXT_FULL(A)
#define EXT_OUTER_DISPLACEMENT_LONG(A)
@ M68K_AM_MEMI_POST_INDEX
Memory indirect - Postindex.
Definition: m68k.h:93
@ M68K_AM_PC_MEMI_PRE_INDEX
Program Counter Memory Indirect - Preindexed.
Definition: m68k.h:102
@ M68K_AM_AREGI_INDEX_8_BIT_DISP
Address Register Indirect With Index- 8-bit displacement.
Definition: m68k.h:90
@ M68K_AM_PCI_INDEX_BASE_DISP
Program Counter Indirect with Index - with Base Displacement.
Definition: m68k.h:99
@ M68K_AM_MEMI_PRE_INDEX
Memory indirect - Preindex.
Definition: m68k.h:94
@ M68K_AM_PC_MEMI_POST_INDEX
Program Counter Memory Indirect - Postindexed.
Definition: m68k.h:101
@ M68K_AM_AREGI_INDEX_BASE_DISP
Address Register Indirect With Index- Base displacement.
Definition: m68k.h:91
@ M68K_AM_PCI_INDEX_8_BIT_DISP
Program Counter Indirect with Index - with 8-Bit Displacement.
Definition: m68k.h:98
@ M68K_REG_PC
Definition: m68k.h:50
char int8_t
Definition: sftypes.h:35

References EXT_8BIT_DISPLACEMENT, EXT_BASE_DISPLACEMENT_LONG, EXT_BASE_DISPLACEMENT_PRESENT, EXT_BASE_REGISTER_PRESENT, EXT_FULL, EXT_INDEX_AR, EXT_INDEX_LONG, EXT_INDEX_REGISTER, EXT_INDEX_REGISTER_PRESENT, EXT_INDEX_SCALE, EXT_OUTER_DISPLACEMENT_LONG, EXT_OUTER_DISPLACEMENT_PRESENT, info(), M68K_AM_AREGI_INDEX_8_BIT_DISP, M68K_AM_AREGI_INDEX_BASE_DISP, M68K_AM_MEMI_POST_INDEX, M68K_AM_MEMI_PRE_INDEX, M68K_AM_PC_MEMI_POST_INDEX, M68K_AM_PC_MEMI_PRE_INDEX, M68K_AM_PCI_INDEX_8_BIT_DISP, M68K_AM_PCI_INDEX_BASE_DISP, M68K_REG_A0, M68K_REG_D0, M68K_REG_INVALID, M68K_REG_PC, read_imm_16(), and read_imm_32().

Referenced by get_ea_mode_op().

◆ instruction_is_valid()

static int instruction_is_valid ( m68k_info info,
const unsigned int  word_check 
)
static

Definition at line 3385 of file M68KDisassembler.c.

3386 {
3387  const unsigned int instruction = info->ir;
3389 
3390  if ( (i->word2_mask && ((word_check & i->word2_mask) != i->word2_match)) ||
3391  (i->instruction == d68000_invalid) ) {
3393  return 0;
3394  }
3395 
3396  return 1;
3397 }
static instruction_struct g_instruction_table[0x10000]

References d68000_invalid(), g_instruction_table, i, and info().

Referenced by build_cas2(), and m68k_disassemble().

◆ m68k_disassemble()

static unsigned int m68k_disassemble ( m68k_info info,
uint64_t  pc 
)
static

Definition at line 3574 of file M68KDisassembler.c.

3575 {
3576  MCInst *inst = info->inst;
3577  cs_m68k* ext = &info->extension;
3578  int i;
3579  unsigned int size;
3580 
3581  inst->Opcode = M68K_INS_INVALID;
3582 
3583  memset(ext, 0, sizeof(cs_m68k));
3584  ext->op_size.type = M68K_SIZE_TYPE_CPU;
3585 
3586  for (i = 0; i < M68K_OPERAND_COUNT; ++i)
3587  ext->operands[i].type = M68K_OP_REG;
3588 
3589  info->ir = peek_imm_16(info);
3590  if (instruction_is_valid(info, peek_imm_32(info) & 0xffff)) {
3591  info->ir = read_imm_16(info);
3593  }
3594 
3595  size = info->pc - (unsigned int)pc;
3596  info->pc = (unsigned int)pc;
3597 
3598  return size;
3599 }
static unsigned int peek_imm_16(const m68k_info *info)
return memset(p, 0, total)
#define M68K_OPERAND_COUNT
Definition: m68k.h:17
static int
Definition: sfsocketcall.h:114
Definition: MCInst.h:88
unsigned Opcode
Definition: MCInst.h:93
void(* instruction)(m68k_info *info)

References ext, g_instruction_table, i, info(), instruction_struct::instruction, instruction_is_valid(), int, M68K_INS_INVALID, M68K_OP_REG, M68K_OPERAND_COUNT, M68K_SIZE_TYPE_CPU, memset(), MCInst::Opcode, pc, peek_imm_16(), peek_imm_32(), and read_imm_16().

Referenced by M68K_getInstruction().

◆ M68K_getInstruction()

bool M68K_getInstruction ( csh  ud,
const uint8_t code,
size_t  code_len,
MCInst instr,
uint16_t size,
uint64_t  address,
void *  inst_info 
)

Definition at line 3601 of file M68KDisassembler.c.

3602 {
3603 #ifdef M68K_DEBUG
3604  SStream ss;
3605 #endif
3606  int s;
3608  cs_struct* handle = instr->csh;
3609  m68k_info *info = (m68k_info*)handle->printer_info;
3610 
3611  // code len has to be at least 2 bytes to be valid m68k
3612 
3613  if (code_len < 2) {
3614  *size = 0;
3615  return false;
3616  }
3617 
3618  if (instr->flat_insn->detail) {
3619  memset(instr->flat_insn->detail, 0, offsetof(cs_detail, m68k)+sizeof(cs_m68k));
3620  }
3621 
3622  info->groups_count = 0;
3623  info->regs_read_count = 0;
3624  info->regs_write_count = 0;
3625  info->code = code;
3626  info->code_len = code_len;
3627  info->baseAddress = address;
3628 
3629  if (handle->mode & CS_MODE_M68K_010)
3631  if (handle->mode & CS_MODE_M68K_020)
3633  if (handle->mode & CS_MODE_M68K_030)
3635  if (handle->mode & CS_MODE_M68K_040)
3637  if (handle->mode & CS_MODE_M68K_060)
3638  cpu_type = M68K_CPU_TYPE_68040; // 060 = 040 for now
3639 
3640  m68k_setup_internals(info, instr, (unsigned int)address, cpu_type);
3641  s = m68k_disassemble(info, address);
3642 
3643  if (s == 0) {
3644  *size = 2;
3645  return false;
3646  }
3647 
3649 
3650 #ifdef M68K_DEBUG
3651  SStream_Init(&ss);
3652  M68K_printInst(instr, &ss, info);
3653 #endif
3654 
3655  // Make sure we always stay within range
3656  if (s > (int)code_len)
3657  *size = (uint16_t)code_len;
3658  else
3659  *size = (uint16_t)s;
3660 
3661  return true;
3662 }
static void build_regs_read_write_counts(m68k_info *info)
static void m68k_setup_internals(m68k_info *info, MCInst *inst, unsigned int pc, unsigned int cpu_type)
static unsigned int m68k_disassemble(m68k_info *info, uint64_t pc)
void M68K_printInst(MCInst *MI, SStream *O, void *PrinterInfo)
void SStream_Init(SStream *ss)
Definition: SStream.c:25
static int cpu_type
Definition: arc-opc.c:143
static mcore_handle handle
Definition: asm_mcore.c:8
@ CS_MODE_M68K_040
M68K 68040 mode.
Definition: capstone.h:121
@ CS_MODE_M68K_060
M68K 68060 mode.
Definition: capstone.h:122
@ CS_MODE_M68K_010
M68K 68010 mode.
Definition: capstone.h:118
@ CS_MODE_M68K_020
M68K 68020 mode.
Definition: capstone.h:119
@ CS_MODE_M68K_030
M68K 68030 mode.
Definition: capstone.h:120
#define offsetof(type, member)
const char * code
Definition: pal.c:98
static RzSocket * s
Definition: rtr.c:28
cs_insn * flat_insn
Definition: MCInst.h:95
cs_struct * csh
Definition: MCInst.h:97
Definition: SStream.h:9
if(dbg->bits==RZ_SYS_BITS_64)
Definition: windows-arm64.h:4

References build_regs_read_write_counts(), code, cpu_type, CS_MODE_M68K_010, CS_MODE_M68K_020, CS_MODE_M68K_030, CS_MODE_M68K_040, CS_MODE_M68K_060, MCInst::csh, MCInst::flat_insn, handle, if(), info(), M68K_CPU_TYPE_68000, M68K_CPU_TYPE_68010, M68K_CPU_TYPE_68020, M68K_CPU_TYPE_68030, M68K_CPU_TYPE_68040, m68k_disassemble(), M68K_printInst(), m68k_setup_internals(), memset(), offsetof, s, and SStream_Init().

◆ m68k_read_disassembler_16()

static unsigned int m68k_read_disassembler_16 ( const m68k_info info,
const uint64_t  addr 
)
static

Definition at line 147 of file M68KDisassembler.c.

148 {
149  const uint16_t v0 = info->code[addr + 0];
150  const uint16_t v1 = info->code[addr + 1];
151  return (v0 << 8) | v1;
152 }
@ v0
Definition: lanai.h:84
@ v1
Definition: lanai.h:85
static int addr
Definition: z80asm.c:58

References addr, info(), v0, and v1.

Referenced by m68k_read_safe_16().

◆ m68k_read_disassembler_32()

static unsigned int m68k_read_disassembler_32 ( const m68k_info info,
const uint64_t  addr 
)
static

Definition at line 154 of file M68KDisassembler.c.

155 {
156  const uint32_t v0 = info->code[addr + 0];
157  const uint32_t v1 = info->code[addr + 1];
158  const uint32_t v2 = info->code[addr + 2];
159  const uint32_t v3 = info->code[addr + 3];
160  return (v0 << 24) | (v1 << 16) | (v2 << 8) | v3;
161 }

References addr, info(), v0, and v1.

Referenced by m68k_read_safe_32().

◆ m68k_read_disassembler_64()

static uint64_t m68k_read_disassembler_64 ( const m68k_info info,
const uint64_t  addr 
)
static

Definition at line 163 of file M68KDisassembler.c.

164 {
165  const uint64_t v0 = info->code[addr + 0];
166  const uint64_t v1 = info->code[addr + 1];
167  const uint64_t v2 = info->code[addr + 2];
168  const uint64_t v3 = info->code[addr + 3];
169  const uint64_t v4 = info->code[addr + 4];
170  const uint64_t v5 = info->code[addr + 5];
171  const uint64_t v6 = info->code[addr + 6];
172  const uint64_t v7 = info->code[addr + 7];
173  return (v0 << 56) | (v1 << 48) | (v2 << 40) | (v3 << 32) | (v4 << 24) | (v5 << 16) | (v6 << 8) | v7;
174 }
unsigned long uint64_t
Definition: sftypes.h:28
#define v6
Definition: sparc-opc.c:45
#define v7
Definition: sparc-opc.c:50

References addr, info(), v0, v1, v6, and v7.

Referenced by m68k_read_safe_64().

◆ m68k_read_safe_16()

static unsigned int m68k_read_safe_16 ( const m68k_info info,
const uint64_t  address 
)
static

Definition at line 176 of file M68KDisassembler.c.

177 {
178  const uint64_t addr = (address - info->baseAddress) & info->address_mask;
179  if (info->code_len < addr + 2) {
180  return 0xaaaa;
181  }
183 }
static unsigned int m68k_read_disassembler_16(const m68k_info *info, const uint64_t addr)

References addr, if(), info(), and m68k_read_disassembler_16().

Referenced by peek_imm_16(), and peek_imm_8().

◆ m68k_read_safe_32()

static unsigned int m68k_read_safe_32 ( const m68k_info info,
const uint64_t  address 
)
static

Definition at line 185 of file M68KDisassembler.c.

186 {
187  const uint64_t addr = (address - info->baseAddress) & info->address_mask;
188  if (info->code_len < addr + 4) {
189  return 0xaaaaaaaa;
190  }
192 }
static unsigned int m68k_read_disassembler_32(const m68k_info *info, const uint64_t addr)

References addr, if(), info(), and m68k_read_disassembler_32().

Referenced by peek_imm_32().

◆ m68k_read_safe_64()

static uint64_t m68k_read_safe_64 ( const m68k_info info,
const uint64_t  address 
)
static

Definition at line 194 of file M68KDisassembler.c.

195 {
196  const uint64_t addr = (address - info->baseAddress) & info->address_mask;
197  if (info->code_len < addr + 8) {
198  return 0xaaaaaaaaaaaaaaaaLL;
199  }
201 }
static uint64_t m68k_read_disassembler_64(const m68k_info *info, const uint64_t addr)

References addr, if(), info(), and m68k_read_disassembler_64().

Referenced by peek_imm_64().

◆ m68k_setup_internals()

static void m68k_setup_internals ( m68k_info info,
MCInst inst,
unsigned int  pc,
unsigned int  cpu_type 
)
static

Definition at line 3530 of file M68KDisassembler.c.

3531 {
3532  info->inst = inst;
3533  info->pc = pc;
3534  info->ir = 0;
3535  info->type = cpu_type;
3536  info->address_mask = 0xffffffff;
3537 
3538  switch(info->type) {
3539  case M68K_CPU_TYPE_68000:
3540  info->type = TYPE_68000;
3541  info->address_mask = 0x00ffffff;
3542  break;
3543  case M68K_CPU_TYPE_68010:
3544  info->type = TYPE_68010;
3545  info->address_mask = 0x00ffffff;
3546  break;
3547  case M68K_CPU_TYPE_68EC020:
3548  info->type = TYPE_68020;
3549  info->address_mask = 0x00ffffff;
3550  break;
3551  case M68K_CPU_TYPE_68020:
3552  info->type = TYPE_68020;
3553  info->address_mask = 0xffffffff;
3554  break;
3555  case M68K_CPU_TYPE_68030:
3556  info->type = TYPE_68030;
3557  info->address_mask = 0xffffffff;
3558  break;
3559  case M68K_CPU_TYPE_68040:
3560  info->type = TYPE_68040;
3561  info->address_mask = 0xffffffff;
3562  break;
3563  default:
3564  info->address_mask = 0;
3565  return;
3566  }
3567 }
#define TYPE_68000
#define TYPE_68010
#define TYPE_68020
#define TYPE_68040
#define TYPE_68030

References cpu_type, info(), M68K_CPU_TYPE_68000, M68K_CPU_TYPE_68010, M68K_CPU_TYPE_68020, M68K_CPU_TYPE_68030, M68K_CPU_TYPE_68040, M68K_CPU_TYPE_68EC020, pc, rz_bin_info_t::type, TYPE_68000, TYPE_68010, TYPE_68020, TYPE_68030, and TYPE_68040.

Referenced by M68K_getInstruction().

◆ make_cpbcc_operand()

static void make_cpbcc_operand ( cs_m68k_op op,
int  size,
int  displacement 
)
static

Definition at line 1773 of file M68KDisassembler.c.

1774 {
1775  op->address_mode = M68K_AM_BRANCH_DISPLACEMENT;
1776  op->type = M68K_OP_BR_DISP;
1777  op->br_disp.disp = displacement;
1778  op->br_disp.disp_size = size;
1779 }

References M68K_AM_BRANCH_DISPLACEMENT, and M68K_OP_BR_DISP.

Referenced by d68020_cpbcc_16(), d68020_cpbcc_32(), and d68020_cpdbcc().

◆ make_int_16()

static int make_int_16 ( int  value)
static

Definition at line 305 of file M68KDisassembler.c.

306 {
307  return (value & 0x8000) ? value | ~0xffff : value & 0xffff;
308 }
static int value
Definition: cmd_api.c:93

References value.

Referenced by d68000_bcc_16(), d68000_bra_16(), d68000_bsr_16(), d68000_dbcc(), d68000_dbra(), d68020_cpbcc_16(), and d68020_cpdbcc().

◆ make_int_8()

static int make_int_8 ( int  value)
static

Definition at line 300 of file M68KDisassembler.c.

301 {
302  return (value & 0x80) ? value | ~0xff : value & 0xff;
303 }

References value.

Referenced by d68000_bcc_8(), d68000_bra_8(), and d68000_bsr_8().

◆ peek_imm_16()

static unsigned int peek_imm_16 ( const m68k_info info)
static

Definition at line 276 of file M68KDisassembler.c.

276 { return m68k_read_safe_16((info), (info)->pc); }
static unsigned int m68k_read_safe_16(const m68k_info *info, const uint64_t address)

References info(), m68k_read_safe_16(), and pc.

Referenced by m68k_disassemble(), and read_imm_16().

◆ peek_imm_32()

static unsigned int peek_imm_32 ( const m68k_info info)
static

Definition at line 277 of file M68KDisassembler.c.

277 { return m68k_read_safe_32((info), (info)->pc); }
static unsigned int m68k_read_safe_32(const m68k_info *info, const uint64_t address)

References info(), m68k_read_safe_32(), and pc.

Referenced by build_cas2(), m68k_disassemble(), and read_imm_32().

◆ peek_imm_64()

static unsigned long long peek_imm_64 ( const m68k_info info)
static

Definition at line 278 of file M68KDisassembler.c.

278 { return m68k_read_safe_64((info), (info)->pc); }
static uint64_t m68k_read_safe_64(const m68k_info *info, const uint64_t address)

References info(), m68k_read_safe_64(), and pc.

Referenced by read_imm_64().

◆ peek_imm_8()

static unsigned int peek_imm_8 ( const m68k_info info)
static

Definition at line 275 of file M68KDisassembler.c.

275 { return (m68k_read_safe_16((info), (info)->pc)&0xff); }

References info(), m68k_read_safe_16(), and pc.

Referenced by read_imm_8().

◆ read_imm_16()

◆ read_imm_32()

◆ read_imm_64()

static unsigned long long read_imm_64 ( m68k_info info)
static

Definition at line 283 of file M68KDisassembler.c.

283 { const unsigned long long value = peek_imm_64(info); (info)->pc+=8; return value; }
static unsigned long long peek_imm_64(const m68k_info *info)

References info(), pc, peek_imm_64(), and value.

Referenced by get_ea_mode_op().

◆ read_imm_8()

◆ reverse_bits()

static uint16_t reverse_bits ( uint32_t  v)
static

Definition at line 869 of file M68KDisassembler.c.

870 {
871  uint32_t r = v; // r will be reversed bits of v; first get LSB of v
872  uint32_t s = 16 - 1; // extra shift needed at end
873 
874  for (v >>= 1; v; v >>= 1) {
875  r <<= 1;
876  r |= v & 1;
877  s--;
878  }
879 
880  return r <<= s; // shift when v's highest bits are zero
881 }
#define r
Definition: crypto_rc6.c:12
const char * v
Definition: dsignal.c:12

References r, s, and v.

Referenced by build_movem_re().

◆ reverse_bits_8()

static uint8_t reverse_bits_8 ( uint32_t  v)
static

Definition at line 883 of file M68KDisassembler.c.

884 {
885  uint32_t r = v; // r will be reversed bits of v; first get LSB of v
886  uint32_t s = 8 - 1; // extra shift needed at end
887 
888  for (v >>= 1; v; v >>= 1) {
889  r <<= 1;
890  r |= v & 1;
891  s--;
892  }
893 
894  return r <<= s; // shift when v's highest bits are zero
895 }

References r, s, and v.

Referenced by fmovem().

◆ set_insn_group()

static void set_insn_group ( m68k_info info,
m68k_group_type  group 
)
static

◆ update_am_reg_list()

static void update_am_reg_list ( m68k_info info,
cs_m68k_op op,
int  write 
)
static

Definition at line 3434 of file M68KDisassembler.c.

3435 {
3436  switch (op->address_mode) {
3439  add_reg_to_rw_list(info, op->reg, write);
3440  break;
3441 
3444  add_reg_to_rw_list(info, op->reg, 1);
3445  break;
3446 
3447  case M68K_AM_REGI_ADDR:
3449  add_reg_to_rw_list(info, op->reg, 0);
3450  break;
3451 
3460  add_reg_to_rw_list(info, op->mem.index_reg, 0);
3461  add_reg_to_rw_list(info, op->mem.base_reg, 0);
3462  break;
3463 
3464  // no register(s) in the other addressing modes
3465  default:
3466  break;
3467  }
3468 }
static void add_reg_to_rw_list(m68k_info *info, m68k_reg reg, int write)

References add_reg_to_rw_list(), info(), M68K_AM_AREGI_INDEX_8_BIT_DISP, M68K_AM_AREGI_INDEX_BASE_DISP, M68K_AM_MEMI_POST_INDEX, M68K_AM_MEMI_PRE_INDEX, M68K_AM_PC_MEMI_POST_INDEX, M68K_AM_PC_MEMI_PRE_INDEX, M68K_AM_PCI_INDEX_8_BIT_DISP, M68K_AM_PCI_INDEX_BASE_DISP, M68K_AM_REG_DIRECT_ADDR, M68K_AM_REG_DIRECT_DATA, M68K_AM_REGI_ADDR, M68K_AM_REGI_ADDR_DISP, M68K_AM_REGI_ADDR_POST_INC, M68K_AM_REGI_ADDR_PRE_DEC, and write.

Referenced by update_op_reg_list().

◆ update_bits_range()

static void update_bits_range ( m68k_info info,
m68k_reg  reg_start,
uint8_t  bits,
int  write 
)
static

Definition at line 3470 of file M68KDisassembler.c.

3471 {
3472  int i;
3473 
3474  for (i = 0; i < 8; ++i) {
3475  if (bits & (1 << i)) {
3476  add_reg_to_rw_list(info, reg_start + i, write);
3477  }
3478  }
3479 }
int bits(struct state *s, int need)
Definition: blast.c:72

References add_reg_to_rw_list(), bits(), i, info(), and write.

Referenced by update_reg_list_regbits().

◆ update_op_reg_list()

static void update_op_reg_list ( m68k_info info,
cs_m68k_op op,
int  write 
)
static

Definition at line 3489 of file M68KDisassembler.c.

3490 {
3491  switch ((int)op->type) {
3492  case M68K_OP_REG:
3493  add_reg_to_rw_list(info, op->reg, write);
3494  break;
3495 
3496  case M68K_OP_MEM:
3498  break;
3499 
3500  case M68K_OP_REG_BITS:
3502  break;
3503 
3504  case M68K_OP_REG_PAIR:
3505  add_reg_to_rw_list(info, op->reg_pair.reg_0, write);
3506  add_reg_to_rw_list(info, op->reg_pair.reg_1, write);
3507  break;
3508  }
3509 }
static void update_reg_list_regbits(m68k_info *info, cs_m68k_op *op, int write)
static void update_am_reg_list(m68k_info *info, cs_m68k_op *op, int write)

References add_reg_to_rw_list(), info(), M68K_OP_MEM, M68K_OP_REG, M68K_OP_REG_BITS, M68K_OP_REG_PAIR, update_am_reg_list(), update_reg_list_regbits(), and write.

Referenced by build_regs_read_write_counts().

◆ update_reg_list_regbits()

static void update_reg_list_regbits ( m68k_info info,
cs_m68k_op op,
int  write 
)
static

Definition at line 3481 of file M68KDisassembler.c.

3482 {
3483  uint32_t bits = op->register_bits;
3485  update_bits_range(info, M68K_REG_A0, (bits >> 8) & 0xff, write);
3486  update_bits_range(info, M68K_REG_FP0, (bits >> 16) & 0xff, write);
3487 }
static void update_bits_range(m68k_info *info, m68k_reg reg_start, uint8_t bits, int write)

References bits(), info(), M68K_REG_A0, M68K_REG_D0, M68K_REG_FP0, update_bits_range(), and write.

Referenced by update_op_reg_list().

Variable Documentation

◆ g_3bit_qdata_table

uint32_t g_3bit_qdata_table[8] = {8, 1, 2, 3, 4, 5, 6, 7}
static

Definition at line 228 of file M68KDisassembler.c.

Referenced by build_3bit_d(), and build_3bit_ea().

◆ g_5bit_data_table

uint32_t g_5bit_data_table[32]
static
Initial value:
= {
32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
}

Definition at line 230 of file M68KDisassembler.c.

Referenced by build_bitfield_ins().

◆ g_instruction_table

instruction_struct g_instruction_table[0x10000]
static

Definition at line 225 of file M68KDisassembler.c.

Referenced by instruction_is_valid(), and m68k_disassemble().

◆ s_branch_lut

m68k_insn s_branch_lut[]
static
Initial value:
= {
}
@ M68K_INS_BGE
Definition: m68k.h:243
@ M68K_INS_BLE
Definition: m68k.h:246
@ M68K_INS_BPL
Definition: m68k.h:241
@ M68K_INS_BMI
Definition: m68k.h:242
@ M68K_INS_BNE
Definition: m68k.h:237
@ M68K_INS_BEQ
Definition: m68k.h:238
@ M68K_INS_BCS
Definition: m68k.h:236
@ M68K_INS_BCC
Definition: m68k.h:235
@ M68K_INS_BVC
Definition: m68k.h:239
@ M68K_INS_BHI
Definition: m68k.h:233
@ M68K_INS_BVS
Definition: m68k.h:240
@ M68K_INS_BLT
Definition: m68k.h:244
@ M68K_INS_BGT
Definition: m68k.h:245
@ M68K_INS_BLS
Definition: m68k.h:234

Definition at line 235 of file M68KDisassembler.c.

Referenced by build_bcc().

◆ s_dbcc_lut

m68k_insn s_dbcc_lut[]
static
Initial value:
= {
}
@ M68K_INS_DBLS
Definition: m68k.h:282
@ M68K_INS_DBGT
Definition: m68k.h:293
@ M68K_INS_DBF
Definition: m68k.h:280
@ M68K_INS_DBEQ
Definition: m68k.h:286
@ M68K_INS_DBGE
Definition: m68k.h:291
@ M68K_INS_DBVC
Definition: m68k.h:287
@ M68K_INS_DBNE
Definition: m68k.h:285
@ M68K_INS_DBCC
Definition: m68k.h:283
@ M68K_INS_DBCS
Definition: m68k.h:284
@ M68K_INS_DBMI
Definition: m68k.h:290
@ M68K_INS_DBVS
Definition: m68k.h:288
@ M68K_INS_DBLT
Definition: m68k.h:292
@ M68K_INS_DBT
Definition: m68k.h:279
@ M68K_INS_DBLE
Definition: m68k.h:294
@ M68K_INS_DBPL
Definition: m68k.h:289
@ M68K_INS_DBHI
Definition: m68k.h:281

Definition at line 242 of file M68KDisassembler.c.

Referenced by build_dbcc().

◆ s_scc_lut

m68k_insn s_scc_lut[]
static
Initial value:
= {
}
@ M68K_INS_SVS
Definition: m68k.h:557
@ M68K_INS_SPL
Definition: m68k.h:558
@ M68K_INS_SVC
Definition: m68k.h:556
@ M68K_INS_SGT
Definition: m68k.h:562
@ M68K_INS_SF
Definition: m68k.h:547
@ M68K_INS_SHI
Definition: m68k.h:548
@ M68K_INS_SLT
Definition: m68k.h:561
@ M68K_INS_ST
Definition: m68k.h:546
@ M68K_INS_SCC
Definition: m68k.h:550
@ M68K_INS_SNE
Definition: m68k.h:554
@ M68K_INS_SLE
Definition: m68k.h:563
@ M68K_INS_SGE
Definition: m68k.h:560
@ M68K_INS_SLS
Definition: m68k.h:549
@ M68K_INS_SMI
Definition: m68k.h:559
@ M68K_INS_SEQ
Definition: m68k.h:555
@ M68K_INS_SCS
Definition: m68k.h:552

Definition at line 249 of file M68KDisassembler.c.

Referenced by d68000_scc().

◆ s_trap_lut

m68k_insn s_trap_lut[]
static
Initial value:
= {
}
@ M68K_INS_TRAPNE
Definition: m68k.h:582
@ M68K_INS_TRAPMI
Definition: m68k.h:587
@ M68K_INS_TRAPCC
Definition: m68k.h:578
@ M68K_INS_TRAPGT
Definition: m68k.h:590
@ M68K_INS_TRAPEQ
Definition: m68k.h:583
@ M68K_INS_TRAPF
Definition: m68k.h:575
@ M68K_INS_TRAPLT
Definition: m68k.h:589
@ M68K_INS_TRAPLS
Definition: m68k.h:577
@ M68K_INS_TRAPHI
Definition: m68k.h:576
@ M68K_INS_TRAPGE
Definition: m68k.h:588
@ M68K_INS_TRAPPL
Definition: m68k.h:586
@ M68K_INS_TRAPVC
Definition: m68k.h:584
@ M68K_INS_TRAPT
Definition: m68k.h:574
@ M68K_INS_TRAPVS
Definition: m68k.h:585
@ M68K_INS_TRAPCS
Definition: m68k.h:580
@ M68K_INS_TRAPLE
Definition: m68k.h:591

Definition at line 256 of file M68KDisassembler.c.

Referenced by build_trap().