--- trunk/src/devices/dev_mp.c 2007/10/08 16:18:19 8 +++ trunk/src/devices/dev_mp.c 2007/10/08 16:18:51 14 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: dev_mp.c,v 1.27 2005/06/11 20:51:41 debug Exp $ + * $Id: dev_mp.c,v 1.28 2005/09/18 19:54:15 debug Exp $ * * This is a fake multiprocessor (MP) device. It can be useful for * theoretical experiments, but probably bares no resemblance to any @@ -221,6 +221,15 @@ cpu_interrupt_ack(d->cpus[cpu->cpu_id], MIPS_IPI_INT); break; + case DEV_MP_NCYCLES: + /* + * Return approximately the number of cycles executed + * in this machine. (This value is not updated for each + * instruction.) + */ + odata = cpu->machine->ncycles; + break; + default: fatal("[ dev_mp: unimplemented relative addr 0x%x ]\n", relative_addr);