Commit Graph

14 Commits

Author SHA1 Message Date
Daniel Collin 997112d3d2 Removed a big chunk of unused stuff
* 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.
2015-10-10 19:30:04 +11:00
Nicolas PLANEL af1d39d336 cleanup peek/read macros
Remove unused m68k_read_disassembler_8(), rework peek/read macros.

Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-08 22:22:39 +11:00
Nicolas PLANEL 8daac3a164 Add boundary checker
Avoid reading bytes outside of the code section.
Trick by returning bad data (illegal instruction) to force capstone to skip data.

Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-08 16:41:03 +11:00
Daniel Collin 25d2ea6ac6 Fixed MSVC warnings 2015-10-05 16:31:06 +02:00
Nguyen Anh Quynh 9d28a6b04e m68k: fix some compiler warnings 2015-10-05 21:54:36 +08:00
Nicolas PLANEL d529ea0db7 [M68K] Use printer_info to share private info between disassembler and printer
Implementation is done by adding cs_m68k extension field in m68k_info.
The private m68k_info structure is allocated in M68K_getInstruction() (disassembly)
and free (if no error) by M68K_printInst() (printer).

Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-05 20:19:45 +11:00
Nicolas PLANEL ee75626661 [M68K] remove global dependency aim to have reentrant code
Remove the last global bytes :
static uint8_t* s_disassemblyBuffer;
static uint32_t s_baseAddress;

Introduce private struct m68k_info on the heap for future use.

Signed-off-by: Nicolas PLANEL <nplanel@gmail.com>
2015-10-05 19:26:37 +11:00
Nguyen Anh Quynh 8deb6d9eed m68k: rename M68Kconf.h to M68KConf.h for consistency 2015-10-04 21:59:03 +08:00
Nguyen Anh Quynh 7d5badd641 m68k: more cleanup & fix code style 2015-10-04 21:45:50 +08:00
Daniel Collin df5ff38758 Renamed incorrect named files 2015-10-04 14:14:07 +02:00
Daniel Collin bc9bdf5a54 Renamed files
Renamed M68Kdasm -> M68KDisassembler
Renamed M68KDisassembler -> M68KInstPrinter
2015-10-04 14:05:21 +02:00
Daniel Collin 09e4c3c9a8 Updated author 2015-10-03 10:00:00 +02:00
Daniel Collin d40cba00e2 Added author 2015-10-03 08:45:56 +02:00
Daniel Collin 2ee675c10a This adds M68K support to Capstone 2015-10-02 20:47:00 +02:00