[LLVMdev] Big endian ARM?
rich at pennware.com
Sat Jun 2 10:20:03 CDT 2012
I've been trying to set up clang/LLVM to compile for big endian ARM and I need
a little help. The code generation works for the most part and most of my
regression tests pass, but I noticed that code like this
extern void g(void);
if (*p & 0x01000000) g();
ldr r0, [r0]
ldrb r0, [r0, #3]
tst r0, #1
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?
More information about the LLVMdev