Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
How to avoid literal pools ?
Jump...
Cancel
Locked
Locked
Replies
3 replies
Subscribers
118 subscribers
Views
6288 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
How to avoid literal pools ?
Christophe Beausoleil
over 12 years ago
Note: This was originally posted on 19th January 2012 at
http://forums.arm.com
Hello everyone,
I am using Cortex-R4F (TI TMS570), and I noticed that ARM C compiler often adds data in literal pools as in example below :
C code
:
RTI_Re_TickFlag = 0;
ASM generated code :
000004 4c66 LDR r4,|L1.416|
000006 2700 MOVS r7,#0
...
ENDP
|L1.416|
DCD RTI_Re_TickFlag
My problem is that this constant is in the same section than the code, so the Cortex-R4 Harward architecture (separate data/instruction) is not used at its best.
It makes load/store unit (LSU) accesses interfere with prefetch unit (PFU) accesses.
So, can we make armcc (with optimization options or some directives...) not generate literal pools ?
Thanks
Best regards
Christophe