> You don't need to add any code to gem5, at least not for the dumping 
> statistics. You only need to add some code to your application. For 
> example, take a look at the function do_dump_stats() in file util/m5/m5.c.
> 
> --
> Nilay
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users


thank you for your reply.

the function do_dump_stats() call function m5_dump_stats().

in util/m5/m5op_x86.S :
//=======================
#define TWO_BYTE_OP(name, number)         \
        .globl name;                      \
        .func name;                       \
name:                                     \
        .byte 0x0F, 0x04;                 \
        .word number;                     \
        ret;                              \
        .endfunc;

TWO_BYTE_OP(m5_dump_stats, dumpstats_func)
//=========================
// in util/m5/m5ops.h
#define dumpstats_func          0x41
//=========================

1. "m5_dump_stats()" defined as a global fucntion, is  "0x0F04" a pseudo 
instruction in m5?  "0x0041" is the interrupt vector?
there are no machine code like "0x0F04" in X86 ISA. 

2.  how to change the function "m5_dump_stats()" in m5, or how to add a new 
pseudo instruction like m5_dump_stats()?
or the machine code like "0x0F04" parsed by which file ?

thank you for your patience!
Best Regards
                                                          xu xin




                                          
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to