[LLVMdev] Is the llvm ARM support big endian elf/obj output?

101 views
Skip to first unread message

gamma_chen

unread,
Apr 23, 2013, 1:26:34 AM4/23/13
to llv...@cs.uiuc.edu
The llvm ARM backend is little endian elf output as my examination as below. Is it support bid endian by other llc options as below?

llc  -filetype=obj -march=arm // little endian
llc  -filetype=obj -march=? or -otheroption=? // to output big endian

Jonathan

Anton Korobeynikov

unread,
Apr 23, 2013, 2:29:32 AM4/23/13
to gamma_chen, LLVM Developers Mailing List
Hello

There is not support for big endian ARM at all.


_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

陳韋任 (Wei-Ren Chen)

unread,
Apr 23, 2013, 2:40:17 AM4/23/13
to Anton Korobeynikov, LLVM Developers Mailing List, gamma_chen
On Tue, Apr 23, 2013 at 10:29:32AM +0400, Anton Korobeynikov wrote:
> Hello
>
> There is not support for big endian ARM at all.

I guess he need to change the data layout string in
ARMTargetMachine::ARMTargetMachine (ARMTargetMachine.cpp)
from "e" to "E" to get big endian output?

Regards,
chenwj

--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

Tim Northover

unread,
Apr 23, 2013, 2:50:18 AM4/23/13
to Anton Korobeynikov, gamma_chen, LLVM Developers Mailing List
> I guess he need to change the data layout string in
> ARMTargetMachine::ARMTargetMachine (ARMTargetMachine.cpp)
> from "e" to "E" to get big endian output?

That would be a start, but I'd expect a significant number of bugs
where the backend writers have assumed ARM was little-endian
(lib/Target/Mips, which *does* support both, has many more endian
checks in the code than ARM).

Tim.

Anton Korobeynikov

unread,
Apr 23, 2013, 2:53:22 AM4/23/13
to Tim Northover, LLVM Developers Mailing List, gamma_chen
>> I guess he need to change the data layout string in
>> ARMTargetMachine::ARMTargetMachine (ARMTargetMachine.cpp)
>> from "e" to "E" to get big endian output?
>
> That would be a start, but I'd expect a significant number of bugs
> where the backend writers have assumed ARM was little-endian
> (lib/Target/Mips, which *does* support both, has many more endian
> checks in the code than ARM).
Also note that NEON stuff is "almost" little-endian. So, huge changes
will be needed here.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University

gamma_chen

unread,
Apr 23, 2013, 4:00:49 AM4/23/13
to Anton Korobeynikov, LLVM Developers Mailing List
All,

Thank you! I just want to know if it support big endian like Mips without modify/add source code at this point, since I am new in ARM backend.

Jonathan

--- 13/4/23 (二),Anton Korobeynikov <an...@korobeynikov.info> 寫道:

寄件者: Anton Korobeynikov <an...@korobeynikov.info>
主旨: Re: [LLVMdev] Is the llvm ARM support big endian elf/obj output?
收件者: "gamma_chen" <gamma...@yahoo.com.tw>
副本: "LLVM Developers Mailing List" <llv...@cs.uiuc.edu>
日期: 2013年4月23日,二,下午2:29
Reply all
Reply to author
Forward
0 new messages