Hello
I would like to use the reserved opcodes from util/m5/m5ops.h to define some
custom M5 operations for full-system simulations. However, I have not succeeded
in implementing this. Hopefully somebody can tell what I did wrong or what I
still need to do:
I edited util/m5/m5ops.h:
#define my_func 0x56
I added to util/m5/m5op.h:
void m5_my_func(void);
I added to util/m5/m5op_alpha.S:
#define MY_FUNC INST(m5_op, 16, 17,my_func)
SIMPLE_OP(m5_my_func, MY_FUNC)
I added to src/sim/speudo_inst.hh
void wool_func(ThreadContext *tc);
I added to src/sim/pseudo_inst.cc
my_func(ThreadContext *tc)
{
Event *event = new SimLoopExitEvent("exit because my_func instruction
encountered", 0);
mainEventQueue.schedule(event, curTick);
}
As you can see my_func() should force an exit from M5. After all the above
modifications I recompiled M5. In my source code I included the edited m5op.h
file and I after compilation I linked my source code to m5op_alpha.o (the
object
file of the edited m5op_alpha.S). However, it did not work. Any ideas why?
Thanks
Alexandru Iordan
_______________________________________________
m5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/m5-users