Arm Community
Site
Search
User
Site
Search
User
Groups
Research Collaboration and Enablement
DesignStart
Education Hub
Innovation
Open Source Software and Platforms
Forums
AI and ML forum
Architectures and Processors forum
Arm Development Platforms forum
Arm Development Studio forum
Arm Virtual Hardware forum
Automotive forum
Compilers and Libraries forum
Graphics, Gaming, and VR forum
High Performance Computing (HPC) forum
Infrastructure Solutions forum
Internet of Things (IoT) forum
Keil forum
Morello Forum
Operating Systems forum
SoC Design and Simulation forum
中文社区论区
Blogs
AI and ML blog
Announcements
Architectures and Processors blog
Automotive blog
Graphics, Gaming, and VR blog
High Performance Computing (HPC) blog
Infrastructure Solutions blog
Innovation blog
Internet of Things (IoT) blog
Operating Systems blog
Research Articles
SoC Design and Simulation blog
Tools, Software and IDEs blog
中文社区博客
Support
Arm Support Services
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Support forums
Arm Development Studio forum
can coprocessor instruction be produced by compiler from c code
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
121 subscribers
Views
2952 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
Offline
rensheng yang
over 9 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?
Offline
rensheng yang
over 9 years ago
Note: This was originally posted on 19th April 2013 at
http://forums.arm.com
i know this feature, named register.
i mean compiler translate c code to arm instructions. except this extension of c code added by specific compiler, can normal c code produce instructions like 'MCR'?
etc, we write
int a;
int b;
int c=a+b;
this will translate to load and modify instructions. or we can use hard-float to control translate to float instructions.
how we can control coprocessor instructions produced from normall C code express?
i think usually c code is used for moving data, so may not produce control instructions, is this right? any theory?
Cancel
Up
0
Down
Cancel
Offline
Scott Douglass
over 9 years ago
Note: This was originally posted on 22nd April 2013 at
http://forums.arm.com
What is your goal here? Is it
a: to make the compiler emit certain coprocessor instructions? (If yes, please give an example)
or
b: to make sure the compiler *does not* emit any coprocessor instructions? (If yes, why?)
Cancel
Up
0
Down
Cancel
Offline
Martin Weidmann
over 9 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
Up
0
Down
Cancel