mirror of
https://github.com/holub/mame
synced 2025-06-10 06:47:18 +03:00
Merge pull request #2721 from DavidHaywood/131017
a few dasm fixes that were in the sh4 core but not the sh2 core and got lost when merging them (nw)
This commit is contained in:
commit
e37cf6f659
@ -9,7 +9,10 @@
|
|||||||
|
|
||||||
static const char *const regname[16] = {
|
static const char *const regname[16] = {
|
||||||
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
|
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
|
||||||
"R8", "R9", "R10","R11","R12","R13","R14","SP"
|
"R8", "R9", "R10","R11","R12","R13","R14",
|
||||||
|
// The old SH2 dasm used 'SP' here, the old SH4 used 'R15'
|
||||||
|
//"SP"
|
||||||
|
"R15"
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint32_t op0000(std::ostream &stream, uint32_t pc, uint16_t opcode)
|
static uint32_t op0000(std::ostream &stream, uint32_t pc, uint16_t opcode)
|
||||||
@ -456,7 +459,7 @@ static uint32_t op1000(std::ostream &stream, uint32_t pc, uint16_t opcode)
|
|||||||
util::stream_format(stream, "MOV.B @($%02X,%s),R0", (opcode & 15), regname[Rm]);
|
util::stream_format(stream, "MOV.B @($%02X,%s),R0", (opcode & 15), regname[Rm]);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
util::stream_format(stream, "MOV.W @($%02X,%s),R0", (opcode & 15), regname[Rm]);
|
util::stream_format(stream, "MOV.W @($%02X,%s),R0", (opcode & 15) * 2, regname[Rm]);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
util::stream_format(stream, "CMP/EQ #$%02X,R0", (opcode & 0xff));
|
util::stream_format(stream, "CMP/EQ #$%02X,R0", (opcode & 0xff));
|
||||||
@ -557,7 +560,7 @@ static uint32_t op1100(std::ostream &stream, uint32_t pc, uint16_t opcode)
|
|||||||
|
|
||||||
static uint32_t op1101(std::ostream &stream, uint32_t pc, uint16_t opcode)
|
static uint32_t op1101(std::ostream &stream, uint32_t pc, uint16_t opcode)
|
||||||
{
|
{
|
||||||
util::stream_format(stream, "MOV.L @($%02X,PC),%s [%08X]", (opcode * 4) & 0xff, regname[Rn], ((pc + 2) & ~3) + (opcode & 0xff) * 4);
|
util::stream_format(stream, "MOV.L @($%04X,PC),%s [%08X]", (opcode & 0xff) * 4, regname[Rn], ((pc + 2) & ~3) + (opcode & 0xff) * 4);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user