Installation

  1. Download LLVM 2.9 source
  2. Extract the source
  3. Navigate to the lib/Target directory
  4. svn co svn://lenny.eng.utah.edu/research/ece/caddis/hwrt/svn/HWRT/LLVM_Trax/Trax
  5. Edit lib/Support/Triple.cpp and include/llvm/ADT/Triple.h adding Trax to the architecture lists similar to the mblaze entries.
  6. Edit "configure" script in the main directory by adding the Trax target to all the target lists (again, use mblaze search to find these lines.
  7. Add IntrinsicsTrax.td to the list of things included from the include/llvm/Intrinsics.td file.
  8. From the llvm-2.9 directory, run the following commands:
    mv lib/Target/Trax/IntrinsicsTrax.td include/llvm/IntrinsicsTrax.td
    ./configure
    make
    ./Release/bin/llc --version
    
    Trax should show up on the list.
    ln -s lib/Target/Trax/IntrinsicsTrax.td include/llvm/IntrinsicsTrax.td should also work, but it was causing the make to hang for me so I changed it to mv.

After that works, you can run llc -march=trax to generate trax assembly from llvm .bc or .ll files.

For linking, download the linker from svn://lenny.eng.utah.edu/research/ece/caddis/hwrt/svn/HWRT/LLVM_Trax/linker A list of libraries that are useful will be available eventually.