For immediate LDR, if we're loading from [PC + 0xXXX], print final offset instead of [PC + 0xXXX].

This commit is contained in:
luigi__ 2009-06-05 21:09:35 +00:00
parent 72f363a4fb
commit a208def471
1 changed files with 8 additions and 2 deletions

View File

@ -2119,12 +2119,18 @@ return txt;}
static char * OP_LDR_P_IMM_OFF(u32 adr, u32 i, char * txt)
{
sprintf(txt, "LDR%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
if(REG_POS(i,16) == 15)
sprintf(txt, "LDR%s %s, [%08X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], (adr + 8 + (int)(i&0x7FF)));
else
sprintf(txt, "LDR%s %s, [%s, #%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
return txt;}
static char * OP_LDR_M_IMM_OFF(u32 adr, u32 i, char * txt)
{
sprintf(txt, "LDR%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
if(REG_POS(i,16) == 15)
sprintf(txt, "LDR%s %s, [%08X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], (adr + 8 - (int)(i&0x7FF)));
else
sprintf(txt, "LDR%s %s, [%s, -#%X]", Condition[CONDITION(i)], Registre[REG_POS(i,12)], Registre[REG_POS(i,16)], (int)(i&0x7FF));
return txt;}
static char * OP_LDR_P_LSL_IMM_OFF(u32 adr, u32 i, char * txt)