For immediate LDR, if we're loading from [PC + 0xXXX], print final offset instead of [PC + 0xXXX].
This commit is contained in:
parent
72f363a4fb
commit
a208def471
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue