I don't see anywhere where you added the instruction to the Alpha decoder. You've set up the M5 utility program to run the instruction and added an implementation, but you didn't tell M5 itself to run your new function when it sees that instruction.
http://repo.m5sim.org/m5/file/44f8c2507d85/src/arch/alpha/isa/decoder.isa#l947 Gabe On 05/11/11 08:58, Iordan Alexandru wrote: > 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 _______________________________________________ m5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/m5-users
