This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
arm.md: arm_arch4 & LDRH vs LDRB
- To: <gcc at gcc dot gnu dot org>
- Subject: arm.md: arm_arch4 & LDRH vs LDRB
- From: "Igor Shevlyakov" <igor at windriver dot com>
- Date: Tue, 16 May 2000 19:03:19 -0700
Hi folks,
I'm trying to understand is there a problem with code generation under ARM or
not and would appreciate your comments.
Could you tell me why LDRH is using for possibly unaligned half-word data
acesses while ARM "Architecture Reference Manual" states that "If the address
is not hald-word aligned result is UNPREDICTABLE".
I tried to run simple test case on StrongArm-110 and some ARM7 CPUs and got
two different behaviors but both are incorrect.
Maybe 2 LDRB instructions should be used when address is not known to be
aligned.
Thanks in advance.
Igor Shevlyakov
Senior Compiler Engineer
Wind River, Inc.