[LLVMdev] Big endian ARM?
Chris Lattner
clattner at apple.com
Sun Jun 3 11:39:21 PDT 2012
On Jun 2, 2012, at 8:35 PM, Richard Pennington wrote:
>> i.e. the test of the value is optimized to use a byte load, but the ldrb is
>> done assuming a little endian address space.
>>
>> I've been snooping around, but can't seem to find where the conversion to a
>> byte operation is done. Could someone point me in the right direction?
>>
>
> I've figured out my problem. I didn't adjust the data layout description string
> in ARMTargetMachine.cpp for big endian targets.
>
> This brings up another question. clang has its own set of description strings
> for varying ABIs, etc. Should those strings somehow override in the code
> generators?
The current design is that the frontend (if it attaches a TD string) is *required* to match the code generator:
http://llvm.org/docs/LangRef.html#datalayout
It is intended to allow the mid-level optimizers to know about data layout without having the code generator linked in (e.g. "opt").
-Chris
More information about the llvm-dev
mailing list