Skip to content

Commit

Permalink
Removed a big chunk of unused stuff
Browse files Browse the repository at this point in the history
* Cleaned up M68KDisassembler.h with legacy stuff from Musashi which isn't used at all.
* Removed M68KConf.h which isn't needed anymore.
* Made some functions static as they are now only local to the current file.
  • Loading branch information
emoon authored and nplanel committed Oct 10, 2015
1 parent cc1e144 commit 997112d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 541 deletions.
180 changes: 0 additions & 180 deletions arch/M68K/M68KConf.h

This file was deleted.

25 changes: 12 additions & 13 deletions arch/M68K/M68KDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@

#define M68040_PLUS TYPE_68040

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, /* Supported by disassembler ONLY */
M68K_CPU_TYPE_68040 /* Supported by disassembler ONLY */
};

/* Extension word formats */
#define EXT_8BIT_DISPLACEMENT(A) ((A)&0xff)
Expand Down Expand Up @@ -143,7 +152,7 @@

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

unsigned int m68k_read_disassembler_16(m68k_info *info, const uint64_t address)
static unsigned int m68k_read_disassembler_16(m68k_info *info, const uint64_t address)
{
const uint64_t addr = (address - info->baseAddress) & info->address_mask;
if (addr > (info->code_len - 2)) {
Expand All @@ -154,7 +163,7 @@ unsigned int m68k_read_disassembler_16(m68k_info *info, const uint64_t address)
return (v0 << 8) | v1;
}

unsigned int m68k_read_disassembler_32(m68k_info *info, const uint64_t address)
static unsigned int m68k_read_disassembler_32(m68k_info *info, const uint64_t address)
{
const uint64_t addr = (address - info->baseAddress) & info->address_mask;
if (addr > (info->code_len - 4)) {
Expand All @@ -167,7 +176,7 @@ unsigned int m68k_read_disassembler_32(m68k_info *info, const uint64_t address)
return (v0 << 24) | (v1 << 16) | (v2 << 8) | v3;
}

uint64_t m68k_read_disassembler_64(m68k_info *info, const uint64_t address)
static uint64_t m68k_read_disassembler_64(m68k_info *info, const uint64_t address)
{
const uint64_t addr = (address - info->baseAddress) & info->address_mask;
if (addr > (info->code_len - 8)) {
Expand All @@ -189,16 +198,6 @@ uint64_t m68k_read_disassembler_64(m68k_info *info, const uint64_t address)
/* =============================== PROTOTYPES ============================= */
/* ======================================================================== */

/* Read data at the PC and increment PC */
uint read_imm_8(m68k_info *info);
uint read_imm_16(m68k_info *info);
uint read_imm_32(m68k_info *info);

/* Read data at the PC but don't imcrement the PC */
uint peek_imm_8(m68k_info *info);
uint peek_imm_16(m68k_info *info);
uint peek_imm_32(m68k_info *info);

/* make signed integers 100% portably */
static int make_int_8(int value);
static int make_int_16(int value);
Expand Down
Loading

0 comments on commit 997112d

Please sign in to comment.