Previous 199869 Revisions Next

r25381 Saturday 21st September, 2013 at 01:37:19 UTC by R. Belmont
sh2: Show effective address in disassembly of PC-relative instructions [R. Belmont, based on a patch by Darksoft]
[src/emu/cpu/sh2]sh2dasm.c

trunk/src/emu/cpu/sh2/sh2dasm.c
r25380r25381
482482
483483static UINT32 op1001(char *buffer, UINT32 pc, UINT16 opcode)
484484{
485   sprintf(buffer, "MOV.W   @($%04X,PC),%s", (opcode & 0xff) * 2, regname[Rn]);
485   sprintf(buffer, "MOV.W   @($%04X,PC),%s [%08X]", (opcode & 0xff) * 2, regname[Rn], pc+((opcode & 0xff) * 2)+2);
486486   return 0;
487487}
488488
r25380r25381
526526      sprintf(buffer, "MOV.L   @($%04X,GBR),R0", (opcode & 0xff) * 4);
527527      break;
528528   case  7:
529      sprintf(buffer, "MOVA    @($%04X,PC),R0", (opcode & 0xff) * 4);
529      sprintf(buffer, "MOVA    @($%04X,PC),R0 [%08X]", (opcode & 0xff) * 4, ((pc + 2) & ~3) + (opcode & 0xff) * 4);
530530      break;
531531   case  8:
532532      sprintf(buffer, "TST     #$%02X,R0", opcode & 0xff);
r25380r25381
558558
559559static UINT32 op1101(char *buffer, UINT32 pc, UINT16 opcode)
560560{
561   sprintf(buffer, "MOV.L   @($%02X,PC),%s", (opcode * 4) & 0xff, regname[Rn]);
561   sprintf(buffer, "MOV.L   @($%02X,PC),%s [%08X]", (opcode * 4) & 0xff, regname[Rn], ((pc + 2) & ~3) + (opcode & 0xff) * 4);
562562   return 0;
563563}
564564

Previous 199869 Revisions Next


© 1997-2024 The MAME Team