This is a multi-part message in MIME format.

------=_NextPart_000_0006_01C646BA.012437D0
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable


Hi:
I'm debugging my project with EVC4.0, ARM platform.
When I build my project, I face many data and pointer align =
problems.

Because this project is replanted from another platform, so i can't =
modify the pointer access mode and struct size.
For example:=20
ULONG=A1=A1* p =3D A + size,Somtimes the 'p' address can't align 4 =
bytes,
So when i access the '*p',occur an error=A1=A3How can i resovle this =
problem efficiently?=20
=20
Best Regards

MaxYan

=20


------=_NextPart_000_0006_01C646BA.012437D0
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2900.2180" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV>
<DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><SPAN lang=3DEN-US=20
style=3D"mso-fareast-font-family: =CB=CE=CC=E5; mso-fareast-language: =
ZH-CN"><?xml:namespace=20
prefix =3D o ns =3D "urn:schemas-microsoft-com:office:office" =
/><o:p><FONT face=3D=D0=C2=BC=9A=C3=F7=F3w=20
size=3D2></FONT></o:p></SPAN></P></DIV><FONT size=3D2>
<DIV><FONT face=3DArial color=3D#0000ff size=3D3><SPAN=20
class=3D731450008-13032006>Hi:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D3><SPAN=20
class=3D731450008-13032006>&nbsp;&nbsp;&nbsp; I'm debugging my project =
with=20
EVC4.0, ARM platform.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D3><SPAN=20
class=3D731450008-13032006>&nbsp;&nbsp;&nbsp; When&nbsp;I build my=20
project,&nbsp;I&nbsp;face many data and pointer align=20
problems.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D3><SPAN=20
class=3D731450008-13032006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D3><SPAN=20
class=3D731450008-13032006>&nbsp;&nbsp;&nbsp; Because this project is =
replanted=20
from&nbsp;another platform, so i can't modify </SPAN></FONT><FONT =
face=3DArial=20
color=3D#0000ff size=3D3><SPAN class=3D731450008-13032006>the pointer =
access mode and=20
struct size.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D3><SPAN=20
class=3D731450008-13032006>&nbsp;&nbsp;&nbsp; For=20
example:&nbsp;</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D3><SPAN=20
class=3D731450008-13032006></SPAN></FONT><FONT face=3DArial =
color=3D#0000ff=20
size=3D3><SPAN class=3D731450008-13032006>&nbsp;&nbsp;&nbsp;ULONG=A1=A1* =
p =3D A=20
+&nbsp;size,Somtimes the 'p'&nbsp;address &nbsp;can't align 4=20
bytes,</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff><SPAN =
class=3D731450008-13032006></SPAN></FONT><FONT=20
size=3D3><FONT face=3DArial><FONT color=3D#0000ff><SPAN=20
class=3D731450008-13032006>&nbsp;&nbsp;&nbsp; So when i access the =
'*p',occur an=20
error=A1=A3How can i&nbsp;resovle this problem =
efficiently</SPAN></FONT><FONT=20
color=3D#0000ff><SPAN class=3D731450008-13032006>?=20
</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D3><SPAN =
class=3D731450008-13032006>&nbsp;=20
</SPAN></FONT></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal style=3D"mso-margin-top-alt: auto; =
mso-margin-bottom-alt: auto"=20
align=3Dleft><FONT size=3D3><FONT face=3DArial><SPAN lang=3DEN-US=20
style=3D"FONT-SIZE: 13.5pt; COLOR: blue; FONT-FAMILY: tim; =
mso-fareast-font-family: =CB=CE=CC=E5; mso-bidi-font-family: =
=CB=CE=CC=E5; mso-fareast-language: ZH-CN">Best&nbsp;Regards</SPAN><SPAN =

lang=3DEN-US=20
style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-bidi-font-family: =CB=CE=CC=E5; =
mso-fareast-language: ZH-CN"><o:p></o:p></SPAN></FONT></FONT></P>
<P class=3DMsoNormal style=3D"mso-margin-top-alt: auto; =
mso-margin-bottom-alt: auto"=20
align=3Dleft><FONT face=3DArial size=3D3><SPAN class=3DSpellE><SPAN =
lang=3DEN-US=20
style=3D"FONT-SIZE: 13.5pt; COLOR: blue; FONT-FAMILY: tim; =
mso-fareast-font-family: =C1=A5=CA=E9; mso-fareast-language: ZH-CN; =
mso-bidi-font-size: 12.0pt">MaxYan</SPAN></SPAN></FONT><SPAN=20
lang=3DEN-US=20
style=3D"FONT-FAMILY: =CB=CE=CC=E5; mso-bidi-font-family: =CB=CE=CC=E5; =
mso-fareast-language: ZH-CN"><o:p></o:p></SPAN></P>
<P class=3DMsoNormal><SPAN lang=3DEN-US=20
style=3D"mso-fareast-font-family: =CB=CE=CC=E5; mso-fareast-language: =
ZH-CN"><o:p><FONT=20
face=3DArial size=3D3>&nbsp;</FONT></o:p></SPAN></P></DIV>
<DIV><FONT face=3DPMingLiU color=3D#0000ff=20
size=3D4></FONT>&nbsp;</DIV></FONT></DIV></DIV></BODY></HTML>

------=_NextPart_000_0006_01C646BA.012437D0--

Re: Data align problems in ARM by John

John
Mon Mar 13 02:45:57 CST 2006

You can use the UNALIGNED keyword to indicate to the compiler that a pointer
may need to reference unaligned data. It's "efficient" from a development
standpoint, but you should be aware that it turns all references into byte
reads which can have significant performance impact on memory intensive
scenarios.


--
Thanks,
John Eldridge
This posting is provided "AS IS" with no warranties, and confers no rights.

"Microsoft" <jackzhao@yeah.net> wrote in message
news:Orqt%23bnRGHA.196@TK2MSFTNGP10.phx.gbl...
Hi:
I'm debugging my project with EVC4.0, ARM platform.
When I build my project, I face many data and pointer align problems.

Because this project is replanted from another platform, so i can't
modify the pointer access mode and struct size.
For example:
ULONG¡¡* p = A + size,Somtimes the 'p' address can't align 4 bytes,
So when i access the '*p',occur an error¡£How can i resovle this problem
efficiently?

Best Regards
MaxYan