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

Thumb mode, Thumb2 MRS insturction issue.

Note: This was originally posted on 28th July 2011 at http://forums.arm.com

Dear All

I have find a strange behavior on cortexA9/R4,

My mode data code as below 

0x0   0x8100F3EF    MRS R1,CPSR                 (current CPSR value is 0x1F3)

However when I execute the line,  the value in R1 is 0x1D3,   Isn't it should be 0x1F3?

Is it a chip bug? or there is some other reason?

If anyone knows the answer, please let me know.
Parents
  • Note: This was originally posted on 29th July 2011 at http://forums.arm.com


    Bit 5 is the T bit (ARM or Thumb state).  The value you're getting back implies you are in fact in ARM state.  How do you know what the value should be?  Are you using a debugger?



    I'm using a debugger

    data in 0x0700000C is MRS r1,cpsr[0x8100F3EF] , start program at 0x07000002 [thumb mode] and stop at Bp 0x0700001A, but the R1 value is not 0x1F3, it shown as 0x1D3



Reply
  • Note: This was originally posted on 29th July 2011 at http://forums.arm.com


    Bit 5 is the T bit (ARM or Thumb state).  The value you're getting back implies you are in fact in ARM state.  How do you know what the value should be?  Are you using a debugger?



    I'm using a debugger

    data in 0x0700000C is MRS r1,cpsr[0x8100F3EF] , start program at 0x07000002 [thumb mode] and stop at Bp 0x0700001A, but the R1 value is not 0x1F3, it shown as 0x1D3



Children
No data