This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
Parents
  • Note: This was originally posted on 25th February 2010 at http://forums.arm.com

    There's no easy way to do what you ask. If you think about it, it's similar to asking if you can programmatically choose the arguments to something like an "ADD" instruction.

    Given that MCR instructions are generally rare, it's not too much of an overhead to write out ten or twenty instruction to dump the information that you want.

    I agree that it would be best to try to avoid the self-modifying code route; there is much to consider and in many cases it tends to get very messy, even before you start trying to debug it. I have a blog post [url="http://blogs.arm.com/software-enablement/caches-and-selfmodifying-code/"]here[/url] which may be of interest if you go down this route. It may be more efficient (in execution time) to use a switch-case style selector, unless you want a lot of options.

    ----

    Out of interest, what exactly are you trying to do? I've never found that I've needed generic access as you describe.
Reply
  • Note: This was originally posted on 25th February 2010 at http://forums.arm.com

    There's no easy way to do what you ask. If you think about it, it's similar to asking if you can programmatically choose the arguments to something like an "ADD" instruction.

    Given that MCR instructions are generally rare, it's not too much of an overhead to write out ten or twenty instruction to dump the information that you want.

    I agree that it would be best to try to avoid the self-modifying code route; there is much to consider and in many cases it tends to get very messy, even before you start trying to debug it. I have a blog post [url="http://blogs.arm.com/software-enablement/caches-and-selfmodifying-code/"]here[/url] which may be of interest if you go down this route. It may be more efficient (in execution time) to use a switch-case style selector, unless you want a lot of options.

    ----

    Out of interest, what exactly are you trying to do? I've never found that I've needed generic access as you describe.
Children
No data