[LLVMdev] Would it be possible to have the LLVM be seen as an arch for the kernel to compile against?
John Criswell
criswell at cs.uiuc.edu
Thu Mar 8 16:25:00 PST 2007
Xavian-Anderson Macpherson wrote:
> I posted this question on the llvm channel on irc. I am new to all of
> this. And I only found out about LLVA as a result of the irc. And
> please forgive my erroneous terminology. So let me try this as best I
> can.
>
> I want to know if the code of LLVA/LLVM can be used as a virtual
> processor in configuring the linux kernel? Maybe you have already
> encountered this and possibly accomplished it as well. I want to use
> your ISA instead of say an i386 or AMD64. I only recently became aware
> of your project, so none of this may be new to you. Please be kind in
> your responses.
For the purposes of this email, I'll use the following terms (which I
believe are correct):
LLVM = The instruction set currently implemented in the LLVM Compiler
Infrastructure.
LLVA-OS = The set of instructions we added to support an OS kernel.
LLVA = The combination of LLVM and LLVA-OS.
The short answer is yes: we've done research work to create a virtual
instruction set (LLVA) that can support Linux (and, in theory, should
support other modern OS kernels, too). We have implemented LLVA-OS as a
set of library routines for a Pentium 3, ported Linux-2.4.22 to the LLVA
instruction set, and are currently using this kernel for our research.
Translation from LLVA code to native code occurs ahead of time (i.e. we
do not dynamically translate kernel code at the moment, but may in the
future).
The LLVM component of the instruction set is publicly available as a
part of the LLVM Compiler Infrastructure; you can download it off the
LLVM website. We have not publicly released the library implementation
of the LLVA-OS instructions or the port of Linux 2.4.22 to LLVA. If
you're doing a project in which you need the LLVA-OS implementation or
the LLVA Linux kernel, please email me off-list and let me know. I
can't promise anything, but we might be able to give you a copy.
We have papers describing the design of LLVA that might interest you.
They are at:
http://llvm.org/pubs/2003-10-01-LLVA.html
http://llvm.org/pubs/2006-06-18-WIOSCA-LLVAOS.html
http://llvm.org/pubs/2006-06-15-VEE-VectorLLVA.html
The first one is the first paper describing LLVA; the second describes
LLVA-OS, and the third describes some vector instructions.
Are you looking at doing a project, and if so, what do you have in
mind? Depending upon what you are doing, you may not need the LLVA
Linux kernel. The LLVM Compiler Infrastructure is now capable of
compiling code with inline assembly, and it can (or almost can) compile
native i386 Linux kernels. If you only need to compile Linux with LLVM,
everything you need is publicly available.
If you have any other questions, please don't hesitate to ask.
Regards,
John Criswell
>
> Thank you,
> Xavian-Anderson Macpherson
> Shingoshi
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list