Hi Matheus, Thank you for your information! Do you known where do download MIPS ABI/EABI document? Thanks in advance! -- Best Regards, Yu Rong Tan On Thu, Jun 12, 2014 at 7:14 PM, Matheus Almeida <Matheus.Almeida at imgtec.com> wrote:> An assembler is the tool you're after. [And a linker if you want to have an executable in the end]. > > You can specify -filetype=obj to llc and you should get an object file. Note that llvm-mc is not an end-user tool but it should do the job you have asked as well i.e., > > llvm-mc -arch=mips64 =mcpu=mips64 -filetype=obj test.s -o test.o (this should generate test.o) > > Regards, > Matheus > > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Nancy > Sent: 12 June 2014 11:24 > To: LLVM Developers Mailing List > Subject: [LLVMdev] Is there any tool can generate MIPS ELF file? > > Hi, > > To my understanding, ll/bc can translate to any target machine code that make cross-compiling easy. > > $llc -march=mipsel -mcpu=mips64 test.ll > generate test.s(MIPS ASM) > > There must be a tool turns test.s to mips ELF file to make this whole thing done completely. What is it? > > > -- > Best Regards, > Yu Rong Tan > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Matheus Almeida
2014-Jun-16 09:30 UTC
[LLVMdev] Is there any tool can generate MIPS ELF file?
Could you be more specific about what ABIs are you after ? The reason I'm asking is that there are several ABIs available for Mips and only a few of them are supported by LLVM (o32, n32 and n64). There are several ABIs defined by GNU with very little documentation that describes them (EABI is one example). We are aware that the available documentation and GCC disagree sometimes and given that GCC is the de-facto standard, LLVM tries to follow GCC's behaviour as close as possible. As far as I know there isn't any link from Imagination Technologies' website that I can point you to w.r.t ABIs but there's documentation out there like: https://dmz-portal.mips.com/mw/images/f/fe/MD00305-2B-ABIDESC-SPC-01.03.pdf // This is probably the best document as it compares the 3 most important ABIs. Note that it's an old document and needs some refactoring given that the implementation in GCC sometimes differs from the documentation. http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf // O32 ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf //n32 Regards, Matheus -----Original Message----- From: Nancy [mailto:nancydreaming at gmail.com] Sent: 14 June 2014 15:59 To: Matheus Almeida Cc: LLVM Developers Mailing List Subject: Re: [LLVMdev] Is there any tool can generate MIPS ELF file? Hi Matheus, Thank you for your information! Do you known where do download MIPS ABI/EABI document? Thanks in advance! -- Best Regards, Yu Rong Tan On Thu, Jun 12, 2014 at 7:14 PM, Matheus Almeida <Matheus.Almeida at imgtec.com> wrote:> An assembler is the tool you're after. [And a linker if you want to have an executable in the end]. > > You can specify -filetype=obj to llc and you should get an object file. Note that llvm-mc is not an end-user tool but it should do the job you have asked as well i.e., > > llvm-mc -arch=mips64 =mcpu=mips64 -filetype=obj test.s -o test.o (this should generate test.o) > > Regards, > Matheus > > -----Original Message----- > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Nancy > Sent: 12 June 2014 11:24 > To: LLVM Developers Mailing List > Subject: [LLVMdev] Is there any tool can generate MIPS ELF file? > > Hi, > > To my understanding, ll/bc can translate to any target machine code that make cross-compiling easy. > > $llc -march=mipsel -mcpu=mips64 test.ll > generate test.s(MIPS ASM) > > There must be a tool turns test.s to mips ELF file to make this whole thing done completely. What is it? > > > -- > Best Regards, > Yu Rong Tan > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Thank you very much for your information and documents! Why Imagination Technologies do not offer the latest MIPS ABI document download link just like the ISA docs? If they thought no much people interested in that doc, they had to make greate effort on compiler like GCC,LLVM by themself,then why GCC disagree with some MIPS ABI, it should be freely designed by MIPS ABI designer and compiler backend target implementation. Do I miss something? -- Best Regards, Yu Rong Tan On Mon, Jun 16, 2014 at 5:30 PM, Matheus Almeida <Matheus.Almeida at imgtec.com> wrote:> Could you be more specific about what ABIs are you after ? The reason I'm asking is that there are several ABIs available for Mips and only a few of them are supported by LLVM (o32, n32 and n64). There are several ABIs defined by GNU with very little documentation that describes them (EABI is one example). > > We are aware that the available documentation and GCC disagree sometimes and given that GCC is the de-facto standard, LLVM tries to follow GCC's behaviour as close as possible. > > As far as I know there isn't any link from Imagination Technologies' website that I can point you to w.r.t ABIs but there's documentation out there like: > https://dmz-portal.mips.com/mw/images/f/fe/MD00305-2B-ABIDESC-SPC-01.03.pdf // This is probably the best document as it compares the 3 most important ABIs. Note that it's an old document and needs some refactoring given that the implementation in GCC sometimes differs from the documentation. > http://math-atlas.sourceforge.net/devel/assembly/mipsabi32.pdf // O32 > ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/MIPS-N32-ABI-Handbook.pdf //n32 > > Regards, > Matheus >