We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I came accross this statement in the compiler documentation "In ARM Compiler 4.1 and later, the compiler might place small global ZI data items in RW data sections as an optimization.". Can anyone explain what the optimization is?
see here: ARM Information Center
Welcome Niall, thanks for your question.
I am moving this question to the Software Development Tools group where the experts might be lurking!
Hi Niall,
This optimization conserves the number of base pointer registers needed to access global data freeing up valuable processor registers for other purposes and improves code performance. More information can be found here...
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/5673.html
Let us know if this helps or if you have any other questions.
Thanks,
Ken
Hi Ken,
Thanks for the link, I hadn't found this when seraching the site (can't beleive I didn't find it!)
What I'm trying to work out is how is the ZI data located in the RW section initialised? Are 0's stored in the RW ROM area is it it doing something clever to 0 those specific ZI data items?
Cheers,
Niall.
armlink will initialize the RW area either by
If a bit of ZI is in the RW area it will be treated as any other bit of RW but will have the initial value of zero.
Large ZI objects are not moved to ZI and are effectively run-length compressed.
Hi Scott,
Thanks, all makes sense now! I'd not joined the dots regarding the RW compression and the repeated 0's for the ZI area small objects.
Hi Niall, do you need any more precision on this?
If not, would you please be able to mark the question answered?
Thanks!