[LLVMdev] Back End for a stack based architecture
Evan Cheng
evan.cheng at apple.com
Thu May 17 11:33:11 PDT 2007
If you want to get something up and running relatively quickly. You
can model the backend after X86 X87 FP math. See X86InstrFPStack.td,
X86FloatingPoint.cpp
Basically add a fake register class and then "stackify" it with a
post-allocation pass. Play around with it to see if something like
this fits your need.
Evan
On May 16, 2007, at 5:33 AM, Giovanni Di Guardo wrote:
> Hi all,
>
> I was asked to write a C compiler back end for a dated stack based
> architecture, i.e. once whose instructions operate only on the top
> elements of a stack and doesn't use arguments, something like the JVM.
>
> I looked at some open source compilers (gcc, sdcc, tinyc and LLVM). To
> me LLVM seems promising (and I likes C++).
>
> Because I'm new here I need your help to understand if:
>
> 1) LLVM could be used to target stack based architecture
>
> 2) is possible but LLVM is not the best solution for that kind of
> architecture (in this case any hint for the rigth compiler is very
> appreciated)
>
> thanks,
>
> Giovanni
> _______________________________________________
> 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