Mercurial > repos > blastem
comparison 68kinst.h @ 2213:53411df7fc71
More 68K disassembler refactoring and fix Windows build failure
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 29 Aug 2022 21:58:37 -0700 |
parents | 8554751f17b5 |
children |
comparison
equal
deleted
inserted
replaced
2212:71b0cb7c34a6 | 2213:53411df7fc71 |
---|---|
5 */ | 5 */ |
6 #ifndef M68KINST_H_ | 6 #ifndef M68KINST_H_ |
7 #define M68KINST_H_ | 7 #define M68KINST_H_ |
8 | 8 |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include "disasm.h" | |
10 | 11 |
11 #ifdef M68030 | 12 #ifdef M68030 |
12 #define M68020 | 13 #define M68020 |
13 #endif | 14 #endif |
14 #ifdef M68020 | 15 #ifdef M68020 |
331 VECTOR_TRAP_14, | 332 VECTOR_TRAP_14, |
332 VECTOR_TRAP_15, | 333 VECTOR_TRAP_15, |
333 VECTOR_USER0 = 64 | 334 VECTOR_USER0 = 64 |
334 } m68k_vector; | 335 } m68k_vector; |
335 | 336 |
336 typedef int (*format_label_fun)(char * dst, uint32_t address, void * data); | |
337 typedef uint16_t (*m68k_fetch_fun)(uint32_t address, void *data); | 337 typedef uint16_t (*m68k_fetch_fun)(uint32_t address, void *data); |
338 | 338 |
339 uint32_t m68k_decode(m68k_fetch_fun fetch, void *data, m68kinst * dst, uint32_t address); | 339 uint32_t m68k_decode(m68k_fetch_fun fetch, void *data, m68kinst * dst, uint32_t address); |
340 uint32_t m68k_branch_target(m68kinst * inst, uint32_t *dregs, uint32_t *aregs); | 340 uint32_t m68k_branch_target(m68kinst * inst, uint32_t *dregs, uint32_t *aregs); |
341 uint8_t m68k_is_branch(m68kinst * inst); | 341 uint8_t m68k_is_branch(m68kinst * inst); |
342 uint8_t m68k_is_noncall_branch(m68kinst * inst); | 342 uint8_t m68k_is_noncall_branch(m68kinst * inst); |
343 int m68k_disasm(m68kinst * decoded, char * dst); | 343 int m68k_disasm(m68kinst * decoded, char * dst); |
344 int m68k_disasm_labels(m68kinst * decoded, char * dst, format_label_fun label_fun, void * data); | 344 int m68k_disasm_labels(m68kinst * decoded, char * dst, disasm_context *disasm); |
345 int m68k_default_label_fun(char * dst, uint32_t address, void * data); | 345 |
346 | 346 #endif |
347 #endif | 347 |
348 |