1 // license:BSD-3-Clause 2 // copyright-holders:Bryan McPhail, Phil Stroffolino 3 4 #ifndef MAME_CPU_ARM_ARMDASM_H 5 #define MAME_CPU_ARM_ARMDASM_H 6 7 #pragma once 8 9 class arm_disassembler : public util::disasm_interface 10 { 11 public: 12 arm_disassembler(); 13 virtual u32 opcode_alignment() const override; 14 virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; 15 16 private: 17 uint32_t ExtractImmediateOperand(uint32_t opcode) const; 18 void WriteDataProcessingOperand(std::ostream &stream, uint32_t opcode, bool printOp0, bool printOp1, offs_t pc) const; 19 void WriteRegisterOperand1(std::ostream &stream, uint32_t opcode) const; 20 void WriteBranchAddress(std::ostream &stream, uint32_t pc, uint32_t opcode) const; 21 void WritePadding(std::ostream &stream, std::streampos start_position) const; 22 23 }; 24 25 #endif 26