Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
can't read CPSR correctly
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
118 subscribers
Views
2859 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
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
can't read CPSR correctly
arnina
over 12 years ago
Note: This was originally posted on 15th October 2009 at
http://forums.arm.com
hello,
I write the following codes to determine the mode in which the processor(Xscale) operates:
int x;
asm volatile ("mrs %0, cpsr"
:"=r"(x)
);
printf("cpsr:%x\n", x);
however, the result is:
cpsr:20000013
it doesn't seem to mean any mode, so what's going on?
Parents
Simon Craske
over 12 years ago
Note: This was originally posted on 19th October 2009 at
http://forums.arm.com
The most significant bits[31:28] are the flags, b0010 giving N clear, Z clear, C set and V clear.
The least significant bits[4:0] are the mode, b10011 giving Supervisor (SVC) mode.
hth
s.
Cancel
Vote up
0
Vote down
Cancel
Reply
Simon Craske
over 12 years ago
Note: This was originally posted on 19th October 2009 at
http://forums.arm.com
The most significant bits[31:28] are the flags, b0010 giving N clear, Z clear, C set and V clear.
The least significant bits[4:0] are the mode, b10011 giving Supervisor (SVC) mode.
hth
s.
Cancel
Vote up
0
Vote down
Cancel
Children
No data