This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

arm.md: arm_arch4 & LDRH vs LDRB


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]