Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
can coprocessor instruction be produced by compiler from c code
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
119 subscribers
Views
3611 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
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 coprocessor instruction be produced by compiler from c code
rensheng yang
over 12 years ago
Note: This was originally posted on 18th April 2013 at
http://forums.arm.com
can accessing coprocessor instruction be produced by compiler from c code?
except float point instructions?
such like drain write buffer instruction?
any docs describe detail of this?
Parents
Martin Weidmann
over 12 years ago
Note: This was originally posted on 18th April 2013 at
http://forums.arm.com
Which compiler?
If you are using armcc, I'd probably use the "named register" feature. This lets you declare a variable and tie to a coprocessor register (or other kind of register). Then whenever you access the variable the compiler will generate suitable coprocessor instructions. So:
egister unsigned int cp15_control __asm("cp15:0:c1:c0:0");
This ties the variable to the coprocessor register "cp15:0:c1:c0:0".
http://infocenter.arm.com/help/topic/com.arm.doc.dui0491i/CJAHJDBG.html
I believe GCC has a similar feature, but not sure of the syntax.
Cancel
Vote up
0
Vote down
Cancel
Reply
Martin Weidmann
over 12 years ago
Note: This was originally posted on 18th April 2013 at
http://forums.arm.com
Which compiler?
If you are using armcc, I'd probably use the "named register" feature. This lets you declare a variable and tie to a coprocessor register (or other kind of register). Then whenever you access the variable the compiler will generate suitable coprocessor instructions. So:
egister unsigned int cp15_control __asm("cp15:0:c1:c0:0");
This ties the variable to the coprocessor register "cp15:0:c1:c0:0".
http://infocenter.arm.com/help/topic/com.arm.doc.dui0491i/CJAHJDBG.html
I believe GCC has a similar feature, but not sure of the syntax.
Cancel
Vote up
0
Vote down
Cancel
Children
No data