The code in the "encumbered" repository works for me.

Regards,

Max
On 01/10/2011 11:36 AM, Maximilien Breughe wrote:
Thanks for your quick reply.
In cpu/thread_context.hh there is a (virtual) function "TheISA::PCState pcState()" which returns a copy of the PCState and a function "void pcState(const TheISA::PCState &val)" to overwrite the PCState obj.

I could call tc->pcState() to get a local copy of the PCState-obj and copy it to a new place in memory called "modified_copy" (so that it would not get deleted). Then I could change the PC and NextPC and call tc->pcState(modified_copy). However, this would result in a memory-leak, since the original PCState-obj will not be deleted.

Kind regards,

Max
On 01/10/2011 11:15 AM, Gabe Black wrote:
  You'd read out the PCState object, change it, and then write it back.
The accessors are now mostly part of the PCState object as defined by
the ISA. If you're using Alpha we already have EIO support in the
"encumbered" mercurial repository which you can add to the build with
the EXTRAS scons command line variable.

Gabe

On 01/10/11 02:11, Maximilien Breughe wrote:
Dear M5 users,


I have a patch for EIO support on M5. However, therefor I need to
change the program counter (and next PC).
I noticed that the source of M5 recently changed its way to modify the
PC and NextPC. There were setters in the past to do this, but now
there is this "PCState" object.

Does anybody know how I can change the PC and NextPC of a
ThreadContext object?

Thank you very much!

Regards,

Max
_______________________________________________
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

_______________________________________________
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

Reply via email to