ARM alignment options?
Daniel Ezekiel
Daniel.Ezekiel@ubinetics.co.in
Wed Jul 17 21:41:00 GMT 2002
have u tried this option in gcc
<snip from info gcc>
`DATA_ALIGNMENT (TYPE, BASIC-ALIGN)'
If defined, a C expression to compute the alignment for a
variables in the static store. TYPE is the data type, and
BASIC-ALIGN is the alignment that the object would ordinarily
have. The value of this macro is used instead of that alignment
to align the object.
If this macro is not defined, then BASIC-ALIGN is used.
One use of this macro is to increase alignment of medium-size data
to make it all fit in fewer cache lines. Another is to cause
character arrays to be word-aligned so that `strcpy' calls that
copy constants to character arrays can be done inline.
</snip>
Danny
-----Original Message-----
From: Gregor Dreijer [mailto:GDREIJER@SUN.AC.ZA]
Sent: Tuesday, July 16, 2002 7:13 AM
To: crossgcc@sources.redhat.com
Subject: ARM alignment options?
Hi,
I have a StrongARM (sa1110) processor, using 32-bit SRAM. I don't
want to use the byte select lines though. I want to access the
memory (reads and writes) 32-bits at a time (always).
So I need to get the gcc compiler to align all variables to 32-bit
boundaries... For example.. a "char" should use 32-bits too... I have
looked through the gcc info, but can find anything... surely there
must be a option that does this? Or can I compile a new cross-
compiler? I am using arm-elf at the moment...
At the moment I am using only unsigned ints (32-bit) variables... but I
would like to be able to work with strings too and hence need to use
bytes ;-)
Any ideas?
Thanks
Greg
Gregor Dreijer, <gdreijer@ING.SUN.AC.ZA>
Electronic Systems Laboratory (ESL)
Dept. Electrical & Electronic Engineering
University of Stellenbosch
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
**********************************************************************
The information contained in this email and any attachments
is likely to be confidential and legally privileged, and is for the
intended recipient named above only. Any copying,
dissemination, disclosure of or use of this email or its
attachments unless authorised by us is prohibited, except
that you may forward this email and/or attachments to a third
party on a strict "need to know" basis.
If you have received this email in error, please notify us
immediately by replying to the email or by calling
+91-80-2297030. Please then delete this email and any full
or partial copies of it.
You as the intended recipient must be aware and accept
that emailis not a totally secure communications medium.
Although we have taken all reasonable steps to make
sure this email and any attachments are free from viruses,
we do not (to the extent permitted by law) accept any liability
whatsoever for any virus infection and/or compromise of
security caused by this email and any attachment.
No contract may be formed or documents served by you
on or with us by this email or any attachments unless
expressly agreed otherwise by us.
Any views expressed in this email or attachments by
an individual are not necessarily those of UbiNetics
India (Private) Limited.
**********************************************************************
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list