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

Undefined instructions ARM7

ARM7TDMI

I am trying to understand how effective the undefined instruction exception is at stopping uncontrolled execution in arm mode.

Out of the entire 32bit arm mode instruction space, how many patterns are considered invalid instructions?
The docs say that some invalid patterns are not caught by the undefined instruction exception. How many?

Parents
  • I am trying to understand how effective the undefined instruction exception is at stopping uncontrolled execution in arm mode.

    Let's put it this way: I wouldn't bet my life on it.

    It's also not supposed to stop uncontrolled execution (which may very well be uncontrolled execution of otherwise perfectly valid code), it's supposed to offer a facility to do things like emulating coprocessor instructions if the coprocessor is absent, help with debugging, etc.

    Out of the entire 32bit arm mode instruction space, how many patterns are considered invalid instructions?

    That depends on which version of the ARM architecture you're looking and on the presence or absence of coprocessors.

    The docs say that some invalid patterns are not caught by the undefined instruction exception. How many?

    This is described in great detail in the ARM architecture reference manual, chapter 3.13, "Extending the instruction set". "UNPREDICTABLE" instructions are not caught by the undefined instruction exception.

Reply
  • I am trying to understand how effective the undefined instruction exception is at stopping uncontrolled execution in arm mode.

    Let's put it this way: I wouldn't bet my life on it.

    It's also not supposed to stop uncontrolled execution (which may very well be uncontrolled execution of otherwise perfectly valid code), it's supposed to offer a facility to do things like emulating coprocessor instructions if the coprocessor is absent, help with debugging, etc.

    Out of the entire 32bit arm mode instruction space, how many patterns are considered invalid instructions?

    That depends on which version of the ARM architecture you're looking and on the presence or absence of coprocessors.

    The docs say that some invalid patterns are not caught by the undefined instruction exception. How many?

    This is described in great detail in the ARM architecture reference manual, chapter 3.13, "Extending the instruction set". "UNPREDICTABLE" instructions are not caught by the undefined instruction exception.

Children