... | ... | @@ -12,7 +12,7 @@ The list of steps needed for new GHC/LLVM port is: |
|
|
|
|
|
**(4)** If the testsuite is passing, now try to build GHC itself using the LLVM backend. This is a very tough test. When working though its a good proof that the LLVM backend is working well on your platform.
|
|
|
|
|
|
**(5)** Now you have LLVM working in unregistered mode, so the next thing is to implement the GHC calling convention in LLVM that is used by GHC's LLVM backend. This should then allow you to get the LLVM backend working in registered mode but with (TABLES_NEXT_TO_CODE = NO in your build.mk). Majority of this step involves hacking inside the LLVM code. Usually lib/Target/\<your target platform name\> is the best way to start. Also you might study what David Terei did for [ x86 support](http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-March/030031.html) and his [ patch itself](http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20100307/714e5c37/attachment-0001.obj) to get an idea what's really needed.
|
|
|
**(5)** Now you have LLVM working in unregistered mode, so the next thing is to implement the GHC calling convention in LLVM that is used by GHC's LLVM backend. This should then allow you to get the LLVM backend working in registered mode but with (TABLES_NEXT_TO_CODE = NO in your build.mk). Majority of this step involves hacking inside the LLVM code. Usually lib/Target/\<your target platform name\> is the best way to start. Also you might study what David Terei did for [x86 support](http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-March/030031.html) and his [patch itself](http://lists.cs.uiuc.edu/pipermail/llvmdev/attachments/20100307/714e5c37/attachment-0001.obj) to get an idea what's really needed.
|
|
|
|
|
|
**(6)** Once **(5)** is working you have it all running except TABLES_NEXT_TO_CODE. So change that to Yes in your build.mk and get that working. This will probably involve changing the mangler used by LLVM to work on the platform you are targeting.
|
|
|
|
... | ... | |