simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Whats to do on execution of "illegal instruction"


From: Klaus
Subject: Re: [Simulavr-devel] Whats to do on execution of "illegal instruction"
Date: Sun, 7 Feb 2016 11:03:06 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

Hi,


I think, translating ff ff to NOP is not a good idea. I would prefer
executing a SBRS r31,7 and the option as

    --invalid-opcode=(execute|break|abort)


And this flags must be set for each illegal opcode. As Michael states, he has a need to differentiate between different opcodes.



A config file is not necessary.

Which then results to have a endless list of options on the command line. How should the user store this complex options?

The need to modify simulavr's code should be strictly avoided; it would
make it looking like an endless construction area.

simulavr is already an endless construction area! If you see all the ways you can interact with simulavr you can get an idea how many interfaces are already implemented. This story will never end.

If you decide to want to have a single additional command line option, feel free to implement this. You can provide the patch in the patch area of the project. If it works for you and maybe others, we can make this a branch. The chance to have only a single command line option for all illegal instructions looks not very common for all users. So I did not prefer such a solution. But it is easy to have branches in git and keep them alive while merging from master time by time.

Because I prefer a "hack" solution with changing simply one line in decoder.cpp on the users need, I will not spend time for this option and yes, I did not want tons of additional command line options. Maybe decoder changes can be made scriptable in the future. It is maybe also an idea to isolate the decoding stage completely from simulavr core sources. This opens the decoder engine to other cores. Maybe simulavr become a startpoint for other cores like arm? If the decoder interface is isolated it can be adapted to be scriptable. This avoids endless command line options and also avoids config files. The python and tcl interface is a good place for hacking such user requirements for each individual user without changing the core again and again. As you sad, an endless construction area.

I take a look how we can change the memory decoder and provide some "non real hardware related" special opcodes which can replace real opcodes.


I can also support you, if you want to change the simulavr code for your personal needs. It is also no problem to maintain a branch for your needs if this is useful for other users too. I can also give you some hints how you can do this on your machine for your own. git is really easy and helpful for exactly doing this work.



Regards
 Klaus






reply via email to

[Prev in Thread] Current Thread [Next in Thread]