diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-05-25 18:09:09 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-05-25 18:09:09 +0000 |
commit | 392a587b0562bfd8561bc15ad2625a4f49f461f0 (patch) | |
tree | 933e0970b7845c901c7ea3e128fa9cb0dcf9fe14 /sim/mcore/interp.c | |
parent | 751d21b5b946a4a451552fbac692b14abea3d816 (diff) | |
download | binutils-392a587b0562bfd8561bc15ad2625a4f49f461f0.zip binutils-392a587b0562bfd8561bc15ad2625a4f49f461f0.tar.gz binutils-392a587b0562bfd8561bc15ad2625a4f49f461f0.tar.bz2 |
import gdb-1999-05-25 snapshot
Diffstat (limited to 'sim/mcore/interp.c')
-rw-r--r-- | sim/mcore/interp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c index 003f697..810bb06 100644 --- a/sim/mcore/interp.c +++ b/sim/mcore/interp.c @@ -1002,6 +1002,9 @@ sim_resume (sd, step, siggnal) break; case 0xC: /* jmp */ pc = cpu.gr[RD]; + if (tracing && RD == 15) + fprintf (stderr, "Func return, r2 = %x, r3 = %x\n", + cpu.gr[2], cpu.gr[3]); bonus_cycles++; needfetch = 1; break; @@ -1127,6 +1130,9 @@ sim_resume (sd, step, siggnal) bonus_cycles += ticks; } bonus_cycles += 2; /* min. is 3, so add 2, plus ticks above */ + if (tracing) + fprintf (stderr, " mult %x by %x to give %x", + cpu.gr[RD], cpu.gr[RS], cpu.gr[RD] * cpu.gr[RS]); cpu.gr[RD] = cpu.gr[RD] * cpu.gr[RS]; break; case 0x04: /* loopt */ @@ -1205,6 +1211,8 @@ sim_resume (sd, step, siggnal) case 0x12: /* mov */ cpu.gr[RD] = cpu.gr[RS]; + if (tracing) + fprintf (stderr, "MOV %x into reg %d", cpu.gr[RD], RD); break; case 0x13: /* bgenr */ @@ -1513,6 +1521,9 @@ sim_resume (sd, step, siggnal) break; case 0x7F: /* jsri */ cpu.gr[15] = pc; + if (tracing) + fprintf (stderr, "func call: r2 = %x r3 = %x r4 = %x r5 = %x r6 = %x r7 = %x\n", + cpu.gr[2], cpu.gr[3], cpu.gr[4], cpu.gr[5], cpu.gr[6], cpu.gr[7]); case 0x70: /* jmpi */ pc = rlat ((pc + ((inst & 0xFF) << 2)) & 0xFFFFFFFC); memops++; |