Hi Eli, What do you mean by "kind of vague" ? So does not guarantee to generate correct instructions ? I just tried what you said but getting following error ? Any ideas ? What I did is clang hello.c -S -target mips-unknown-linux Error: In file included from hello.c:1In file included from /usr/include/stdio.h:28/usr/include/features.h:323:10 fatak error 'bits/predefs.h' file not found. =========================================== Phone : 82-42-860-1838 Fax : 82-42-860-6790 Cell Phone: 82-10-7599-1981 ========================================== --- On Mon, 11/12/12, Eli Friedman <eli.friedman at gmail.com> wrote: From: Eli Friedman <eli.friedman at gmail.com> Subject: Re: [LLVMdev] Mips instructions using llvm? To: "janarbek" <canarbekmatay at yahoo.com> Cc: llvmdev at cs.uiuc.edu Date: Monday, November 12, 2012, 4:55 PM On Mon, Nov 12, 2012 at 4:41 PM, janarbek <canarbekmatay at yahoo.com> wrote:> > Hi All, > > Is there any way to generate MIPS instructions from C code in llvm ?"Generate MIPS instructions" is kind of vague, but something like "clang myfile.c -S -target mips-unknown-linux" will make clang generate MIPS assembly. -Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121112/0480db03/attachment.html>
On 12 Nov 2012, at 17:22, janarbek wrote:> What do you mean by "kind of vague" ? So does not guarantee to generate correct instructions ?Your question is vague. Generally, you get better answers if you ask better questions.> I just tried what you said but getting following error ? Any ideas ? > What I did is clang hello.c -S -target mips-unknown-linux > > Error: > In file included from hello.c:1 > In file included from /usr/include/stdio.h:28 > /usr/include/features.h:323:10 fatak error 'bits/predefs.h' file not found.This sounds like you are using headers that do not support MIPS. David
> What do you mean by "kind of vague" ? So does not guarantee to generate correct instructions ?>Your question is vague. Generally, you get better answers if you ask better questions.Sorry, I didn't mean to be rude. My question is does that mean institution generated may not guarantee what the "instructions" mean to be ?>This sounds like you are using headers that do not support MIPS.So can I fix this? In my hello.c code I have only stdio.h header file. =========================================== Phone : 82-42-860-1838 Fax : 82-42-860-6790 Cell Phone: 82-10-7599-1981 ========================================== --- On Mon, 11/12/12, David Chisnall <dc552 at cam.ac.uk> wrote: From: David Chisnall <dc552 at cam.ac.uk> Subject: Re: [LLVMdev] Mips instructions using llvm? To: "janarbek" <canarbekmatay at yahoo.com> Cc: "Eli Friedman" <eli.friedman at gmail.com>, llvmdev at cs.uiuc.edu Date: Monday, November 12, 2012, 5:31 PM On 12 Nov 2012, at 17:22, janarbek wrote:> What do you mean by "kind of vague" ? So does not guarantee to generate correct instructions ?Your question is vague. Generally, you get better answers if you ask better questions.> I just tried what you said but getting following error ? Any ideas ? > What I did is clang hello.c -S -target mips-unknown-linux > > Error: > In file included from hello.c:1 > In file included from /usr/include/stdio.h:28 > /usr/include/features.h:323:10 fatak error 'bits/predefs.h' file not found.This sounds like you are using headers that do not support MIPS. David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121112/7f124beb/attachment.html>
See: https://dmz-portal.mips.com/wiki/Clang_cross_compilation On 11/12/2012 05:31 PM, David Chisnall wrote:> On 12 Nov 2012, at 17:22, janarbek wrote: > >> What do you mean by "kind of vague" ? So does not guarantee to generate correct instructions ? > > Your question is vague. Generally, you get better answers if you ask better questions. > >> I just tried what you said but getting following error ? Any ideas ? >> What I did is clang hello.c -S -target mips-unknown-linux >> >> Error: >> In file included from hello.c:1 >> In file included from /usr/include/stdio.h:28 >> /usr/include/features.h:323:10 fatak error 'bits/predefs.h' file not found. > > This sounds like you are using headers that do not support MIPS. > > David >
Maybe Matching Threads
- [LLVMdev] Mips instructions using llvm?
- [LLVMdev] Mips instructions using llvm?
- [LLVMdev] Mips instructions using llvm?
- [LLVMdev] Mips instructions using llvm?
- [LLVMdev] LLVM build is failed giving Path.inc:714: error: ‘unlink’ was not declared in this scope