diff options
Diffstat (limited to 'src/devices/cpu/dsp32')
-rw-r--r-- | src/devices/cpu/dsp32/dsp32.cpp | 4 | ||||
-rw-r--r-- | src/devices/cpu/dsp32/dsp32.h | 2 | ||||
-rw-r--r-- | src/devices/cpu/dsp32/dsp32dis.cpp | 12 |
3 files changed, 4 insertions, 14 deletions
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp index 2f0d8d2eeab..ca4a757ee41 100644 --- a/src/devices/cpu/dsp32/dsp32.cpp +++ b/src/devices/cpu/dsp32/dsp32.cpp @@ -421,10 +421,10 @@ uint32_t dsp32c_device::disasm_max_opcode_bytes() const // helper function //------------------------------------------------- -offs_t dsp32c_device::disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) +offs_t dsp32c_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) { extern CPU_DISASSEMBLE( dsp32c ); - return CPU_DISASSEMBLE_NAME(dsp32c)(this, buffer, pc, oprom, opram, options); + return CPU_DISASSEMBLE_NAME(dsp32c)(this, stream, pc, oprom, opram, options); } diff --git a/src/devices/cpu/dsp32/dsp32.h b/src/devices/cpu/dsp32/dsp32.h index 62a56ef4a0a..4b39600284a 100644 --- a/src/devices/cpu/dsp32/dsp32.h +++ b/src/devices/cpu/dsp32/dsp32.h @@ -128,7 +128,7 @@ protected: // device_disasm_interface overrides virtual uint32_t disasm_min_opcode_bytes() const override; virtual uint32_t disasm_max_opcode_bytes() const override; - virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; + virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override; // memory accessors uint32_t ROPCODE(offs_t pc); diff --git a/src/devices/cpu/dsp32/dsp32dis.cpp b/src/devices/cpu/dsp32/dsp32dis.cpp index d893b412f44..aaf9dc63abb 100644 --- a/src/devices/cpu/dsp32/dsp32dis.cpp +++ b/src/devices/cpu/dsp32/dsp32dis.cpp @@ -694,21 +694,11 @@ static unsigned dasm_dsp32(std::ostream &stream, unsigned pc, uint32_t op) } -static unsigned dasm_dsp32(char *buffer, unsigned pc, uint32_t op) -{ - std::ostringstream stream; - unsigned result = dasm_dsp32(stream, pc, op); - std::string stream_str = stream.str(); - strcpy(buffer, stream_str.c_str()); - return result; -} - - /*************************************************************************** DISASSEMBLY HOOK ***************************************************************************/ CPU_DISASSEMBLE( dsp32c ) { - return dasm_dsp32(buffer, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24)); + return dasm_dsp32(stream, pc, oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24)); } |