diff options
Diffstat (limited to 'src/devices/cpu/e132xs/32xsdasm.h')
-rw-r--r-- | src/devices/cpu/e132xs/32xsdasm.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/devices/cpu/e132xs/32xsdasm.h b/src/devices/cpu/e132xs/32xsdasm.h new file mode 100644 index 00000000000..6c5b0fa4482 --- /dev/null +++ b/src/devices/cpu/e132xs/32xsdasm.h @@ -0,0 +1,43 @@ +// license:BSD-3-Clause +// copyright-holders:Pierpaolo Prazzoli +/* + + Hyperstone disassembler + written by Pierpaolo Prazzoli + +*/ + +#ifndef MAME_CPU_E132XS_32XSDASM_H +#define MAME_CPU_E132XS_32XSDASM_H + +#pragma once + +class hyperstone_disassembler : public util::disasm_interface +{ +public: + hyperstone_disassembler() = default; + virtual ~hyperstone_disassembler() = default; + + virtual u32 opcode_alignment() const override; + virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; + +private: + static const char *const L_REG[]; + static const char *const G_REG[]; + static const char *const SETxx[]; + + int size, global_fp; + + void LL_format(char *source, char *dest, uint16_t op); + void LR_format(char *source, char *dest, uint16_t op); + void RR_format(char *source, char *dest, uint16_t op, unsigned h_flag); + uint32_t LRconst_format(char *source, char *dest, uint16_t op, offs_t &pc, const data_buffer &opcodes); + uint32_t RRconst_format(char *source, char *dest, uint16_t op, offs_t &pc, const data_buffer &opcodes); + int32_t Rimm_format(char *dest, uint16_t op, offs_t &pc, const data_buffer &opcodes, unsigned h_flag); + uint8_t Ln_format(char *dest, uint16_t op); + uint8_t Rn_format(char *dest, uint16_t op); + int32_t PCrel_format(uint16_t op, offs_t pc, const data_buffer &opcodes); + uint32_t RRdis_format(char *source, char *dest, uint16_t op, uint16_t next_op, offs_t pc, const data_buffer &opcodes); +}; + +#endif |