32x: drc: some constant propagation

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@860 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2010-01-15 21:04:42 +00:00
parent 5aec752dac
commit 2368651527
5 changed files with 532 additions and 200 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
int sh2_drc_init(SH2 *sh2);
void sh2_drc_finish(SH2 *sh2);
void sh2_drc_mem_setup(SH2 *sh2);
void sh2_drc_flush_all(void);
void sh2_drc_wcheck_ram(unsigned int a, int val, int cpuid);
void sh2_drc_wcheck_da(unsigned int a, int val, int cpuid);

View file

@ -490,7 +490,8 @@ static UINT32 op1000(char *buffer, UINT32 pc, UINT16 opcode)
static UINT32 op1001(char *buffer, UINT32 pc, UINT16 opcode)
{
sprintf(buffer, "MOV.W @($%04X,PC),%s", (opcode & 0xff) * 2, regname[Rn]);
sprintf(buffer, "MOV.W @($%02X,PC),%s ; @$%08x", (opcode & 0xff) * 2, regname[Rn],
pc + (opcode & 0xff) * 2 + 2);
return 0;
}
@ -566,8 +567,8 @@ static UINT32 op1100(char *buffer, UINT32 pc, UINT16 opcode)
static UINT32 op1101(char *buffer, UINT32 pc, UINT16 opcode)
{
sprintf(buffer, "MOV.L @($%02X,PC),%s ; #$%06x", (opcode * 4) & 0x3ff, regname[Rn],
(pc + ((opcode * 4) & 0x3ff) + 2) & ~3);
sprintf(buffer, "MOV.L @($%02X,PC),%s ; @$%08x", (opcode & 0xff) * 4, regname[Rn],
(pc + (opcode & 0xff) * 4 + 2) & ~3);
return 0;
}

View file

@ -33,6 +33,10 @@ typedef struct SH2_
// drc stuff
int drc_tmp; // 70
int irq_cycles;
void *p_bios; // convenience pointers
void *p_da;
void *p_sdram;
void *p_rom;
// interpreter stuff
int icount; // cycles left in current timeslice