Macros | Functions | Variables
M68KInstPrinter.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "M68KInstPrinter.h"
#include "M68KDisassembler.h"
#include "../../cs_priv.h"
#include "../../utils.h"
#include "../../MCInst.h"
#include "../../MCInstrDesc.h"
#include "../../MCRegisterInfo.h"
Include dependency graph for M68KInstPrinter.c:

Go to the source code of this file.

Macros

#define m68k_min(a, b)   (a < b) ? a : b
 
#define m68k_sizeof_array(array)   (int)(sizeof(array)/sizeof(array[0]))
 

Functions

static const char * getRegName (m68k_reg reg)
 
void M68K_get_insn_id (cs_struct *h, cs_insn *insn, unsigned int id)
 
const char * M68K_group_name (csh handle, unsigned int id)
 
const char * M68K_insn_name (csh handle, unsigned int id)
 
void M68K_printInst (MCInst *MI, SStream *O, void *PrinterInfo)
 
const char * M68K_reg_name (csh handle, unsigned int reg)
 
static void printAddressingMode (SStream *O, unsigned int pc, const cs_m68k *inst, const cs_m68k_op *op)
 
static void printRegbitsRange (char *buffer, uint32_t data, const char *prefix)
 
static void registerBits (SStream *O, const cs_m68k_op *op)
 
static void registerPair (SStream *O, const cs_m68k_op *op)
 

Variables

static name_map group_name_maps []
 
static const char * s_instruction_names []
 
static const char * s_reg_names []
 
static const char * s_spacing = " "
 

Macro Definition Documentation

◆ m68k_min

#define m68k_min (   a,
  b 
)    (a < b) ? a : b

Definition at line 260 of file M68KInstPrinter.c.

◆ m68k_sizeof_array

#define m68k_sizeof_array (   array)    (int)(sizeof(array)/sizeof(array[0]))

Definition at line 259 of file M68KInstPrinter.c.

Function Documentation

◆ getRegName()

static const char* getRegName ( m68k_reg  reg)
static

Definition at line 75 of file M68KInstPrinter.c.

◆ M68K_get_insn_id()

void M68K_get_insn_id ( cs_struct h,
cs_insn *  insn,
unsigned int  id 
)

Definition at line 355 of file M68KInstPrinter.c.

◆ M68K_group_name()

const char* M68K_group_name ( csh  handle,
unsigned int  id 
)

Definition at line 379 of file M68KInstPrinter.c.

◆ M68K_insn_name()

const char* M68K_insn_name ( csh  handle,
unsigned int  id 
)

Definition at line 360 of file M68KInstPrinter.c.

◆ M68K_printInst()

void M68K_printInst ( MCInst MI,
SStream O,
void *  PrinterInfo 
)

Definition at line 262 of file M68KInstPrinter.c.

◆ M68K_reg_name()

const char* M68K_reg_name ( csh  handle,
unsigned int  reg 
)

Definition at line 343 of file M68KInstPrinter.c.

◆ printAddressingMode()

static void printAddressingMode ( SStream O,
unsigned int  pc,
const cs_m68k inst,
const cs_m68k_op op 
)
static

Definition at line 131 of file M68KInstPrinter.c.

◆ printRegbitsRange()

static void printRegbitsRange ( char *  buffer,
uint32_t  data,
const char *  prefix 
)
static

Definition at line 80 of file M68KInstPrinter.c.

◆ registerBits()

static void registerBits ( SStream O,
const cs_m68k_op op 
)
static

Definition at line 106 of file M68KInstPrinter.c.

◆ registerPair()

static void registerPair ( SStream O,
const cs_m68k_op op 
)
static

Definition at line 125 of file M68KInstPrinter.c.

Variable Documentation

◆ group_name_maps

name_map group_name_maps[]
static
Initial value:
= {
{ M68K_GRP_INVALID , NULL },
{ M68K_GRP_JUMP, "jump" },
{ M68K_GRP_RET , "ret" },
{ M68K_GRP_IRET, "iret" },
{ M68K_GRP_BRANCH_RELATIVE, "branch_relative" },
}

Definition at line 370 of file M68KInstPrinter.c.

◆ s_instruction_names

const char* s_instruction_names[]
static
Initial value:
= {
"invalid",
"abcd", "add", "adda", "addi", "addq", "addx", "and", "andi", "asl", "asr", "bhs", "blo", "bhi", "bls", "bcc", "bcs", "bne", "beq", "bvc",
"bvs", "bpl", "bmi", "bge", "blt", "bgt", "ble", "bra", "bsr", "bchg", "bclr", "bset", "btst", "bfchg", "bfclr", "bfexts", "bfextu", "bfffo", "bfins",
"bfset", "bftst", "bkpt", "callm", "cas", "cas2", "chk", "chk2", "clr", "cmp", "cmpa", "cmpi", "cmpm", "cmp2", "cinvl", "cinvp", "cinva", "cpushl", "cpushp",
"cpusha", "dbt", "dbf", "dbhi", "dbls", "dbcc", "dbcs", "dbne", "dbeq", "dbvc", "dbvs", "dbpl", "dbmi", "dbge", "dblt", "dbgt", "dble", "dbra",
"divs", "divsl", "divu", "divul", "eor", "eori", "exg", "ext", "extb", "fabs", "fsabs", "fdabs", "facos", "fadd", "fsadd", "fdadd", "fasin",
"fatan", "fatanh", "fbf", "fbeq", "fbogt", "fboge", "fbolt", "fbole", "fbogl", "fbor", "fbun", "fbueq", "fbugt", "fbuge", "fbult", "fbule", "fbne", "fbt",
"fbsf", "fbseq", "fbgt", "fbge", "fblt", "fble", "fbgl", "fbgle", "fbngle", "fbngl", "fbnle", "fbnlt", "fbnge", "fbngt", "fbsne", "fbst", "fcmp", "fcos",
"fcosh", "fdbf", "fdbeq", "fdbogt", "fdboge", "fdbolt", "fdbole", "fdbogl", "fdbor", "fdbun", "fdbueq", "fdbugt", "fdbuge", "fdbult", "fdbule", "fdbne",
"fdbt", "fdbsf", "fdbseq", "fdbgt", "fdbge", "fdblt", "fdble", "fdbgl", "fdbgle", "fdbngle", "fdbngl", "fdbnle", "fdbnlt", "fdbnge", "fdbngt", "fdbsne",
"fdbst", "fdiv", "fsdiv", "fddiv", "fetox", "fetoxm1", "fgetexp", "fgetman", "fint", "fintrz", "flog10", "flog2", "flogn", "flognp1", "fmod", "fmove",
"fsmove", "fdmove", "fmovecr", "fmovem", "fmul", "fsmul", "fdmul", "fneg", "fsneg", "fdneg", "fnop", "frem", "frestore", "fsave", "fscale", "fsgldiv",
"fsglmul", "fsin", "fsincos", "fsinh", "fsqrt", "fssqrt", "fdsqrt", "fsf", "fseq", "fsogt", "fsoge", "fsolt", "fsole", "fsogl", "fsor", "fsun", "fsueq",
"fsugt", "fsuge", "fsult", "fsule", "fsne", "fst", "fssf", "fsseq", "fsgt", "fsge", "fslt", "fsle", "fsgl", "fsgle", "fsngle",
"fsngl", "fsnle", "fsnlt", "fsnge", "fsngt", "fssne", "fsst", "fsub", "fssub", "fdsub", "ftan", "ftanh", "ftentox", "ftrapf", "ftrapeq", "ftrapogt",
"ftrapoge", "ftrapolt", "ftrapole", "ftrapogl", "ftrapor", "ftrapun", "ftrapueq", "ftrapugt", "ftrapuge", "ftrapult", "ftrapule", "ftrapne", "ftrapt",
"ftrapsf", "ftrapseq", "ftrapgt", "ftrapge", "ftraplt", "ftraple", "ftrapgl", "ftrapgle", "ftrapngle", "ftrapngl", "ftrapnle", "ftrapnlt", "ftrapnge",
"ftrapngt", "ftrapsne", "ftrapst", "ftst", "ftwotox", "halt", "illegal", "jmp", "jsr", "lea", "link", "lpstop", "lsl", "lsr", "move", "movea", "movec",
"movem", "movep", "moveq", "moves", "move16", "muls", "mulu", "nbcd", "neg", "negx", "nop", "not", "or", "ori", "pack", "pea", "pflush", "pflusha",
"pflushan", "pflushn", "ploadr", "ploadw", "plpar", "plpaw", "pmove", "pmovefd", "ptestr", "ptestw", "pulse", "rems", "remu", "reset", "rol", "ror",
"roxl", "roxr", "rtd", "rte", "rtm", "rtr", "rts", "sbcd", "st", "sf", "shi", "sls", "scc", "shs", "scs", "slo", "sne", "seq", "svc", "svs", "spl", "smi",
"sge", "slt", "sgt", "sle", "stop", "sub", "suba", "subi", "subq", "subx", "swap", "tas", "trap", "trapv", "trapt", "trapf", "traphi", "trapls",
"trapcc", "traphs", "trapcs", "traplo", "trapne", "trapeq", "trapvc", "trapvs", "trappl", "trapmi", "trapge", "traplt", "trapgt", "traple", "tst", "unlk", "unpk",
}

Definition at line 46 of file M68KInstPrinter.c.

◆ s_reg_names

const char* s_reg_names[]
static
Initial value:
= {
"invalid",
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
"a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
"fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7",
"pc",
"sr", "ccr", "sfc", "dfc", "usp", "vbr", "cacr",
"caar", "msp", "isp", "tc", "itt0", "itt1", "dtt0",
"dtt1", "mmusr", "urp", "srp",
"fpcr", "fpsr", "fpiar",
}

Definition at line 33 of file M68KInstPrinter.c.

◆ s_spacing

const char* s_spacing = " "
static

Definition at line 31 of file M68KInstPrinter.c.

M68K_GRP_INVALID
@ M68K_GRP_INVALID
CS_GRUP_INVALID.
Definition: m68k.h:597
M68K_GRP_BRANCH_RELATIVE
@ M68K_GRP_BRANCH_RELATIVE
= CS_GRP_BRANCH_RELATIVE
Definition: m68k.h:601
M68K_GRP_RET
@ M68K_GRP_RET
= CS_GRP_RET
Definition: m68k.h:599
M68K_GRP_JUMP
@ M68K_GRP_JUMP
= CS_GRP_JUMP
Definition: m68k.h:598
M68K_GRP_IRET
@ M68K_GRP_IRET
= CS_GRP_IRET
Definition: m68k.h:600


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:22