support nocash-style prints from ARM, in addition to thumb support which has existed for much time

This commit is contained in:
zeromus 2011-09-24 00:52:20 +00:00
parent b72ea5ee4b
commit 47afec91fa
3 changed files with 14 additions and 5 deletions

View File

@ -3233,6 +3233,15 @@ TEMPLATE static u32 FASTCALL OP_BLX_REG(const u32 i)
TEMPLATE static u32 FASTCALL OP_B(const u32 i)
{
static const u32 mov_r12_r12 = 0xE1A0C00C;
const u32 last = _MMU_read32<PROCNUM,MMU_AT_DEBUG>(cpu->instruct_adr-4);
if(last == mov_r12_r12)
{
const u32 next = _MMU_read16<PROCNUM,MMU_AT_DEBUG>(cpu->instruct_adr+4);
if(next == 0x6464)
NocashMessage(cpu, 8);
}
u32 off = SIGNEXTEND_24(i);
if(CONDITION(i)==0xF)
{

View File

@ -336,9 +336,9 @@ void IdeasLog(armcpu_t* cpu)
//don't emit a newline. that is a pain in the butt.
}
void NocashMessage(armcpu_t* cpu)
void NocashMessage(armcpu_t* cpu, int offset)
{
u32 adr = cpu->instruct_adr + 6;
u32 adr = cpu->instruct_adr + offset;
std::string todo;
for(;;) {

View File

@ -141,7 +141,7 @@ public:
#define INFO(...) INFOC(10, __VA_ARGS__)
void IdeasLog(armcpu_t* cpu);
void NocashMessage(armcpu_t* cpu);
void NocashMessage(armcpu_t* cpu, int offset);
enum EDEBUG_EVENT
{