Giter Site home page Giter Site logo

luseengithub / nyuzitoolchain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbush001/nyuzitoolchain

0.0 0.0 0.0 194.22 MB

Port of LLVM/Clang C compiler to Nyuzi parallel processor architecture

License: Other

CMake 0.25% Shell 0.05% Go 0.09% C++ 42.80% OCaml 0.22% Python 0.47% C 0.24% SourcePawn 0.01% Objective-C 0.29% LLVM 44.27% Mirah 0.81% Assembly 10.46% Roff 0.01% Logos 0.01% Perl 0.02% Emacs Lisp 0.01% CSS 0.01% Batchfile 0.01% Vim Script 0.01%

nyuzitoolchain's Introduction

This is a toolchain for a parallel processor architecture called Nyuzi, based on LLVM. It includes a C/C++ compiler (clang), assembler, linker and debugger (lldb).

While this project includes a C/C++ compiler, the LLVM backend can support any language. There is a small, experimental SPMD parallel compiler in tools/spmd_compiler.

Questions or issues can be directed to the mailing list or... Chat at https://gitter.im/jbush001/NyuziProcessor

Building

The NyuziProcessor repository README has instructions for building this as well. These instructions are only necessary if you want to build this separately.

Required Software

The following sections describe how to install these packages.

Building on Linux

You can install required packages using the built-in package manager (apt-get, yum, etc). As LLVM needs newer versions of many packages, you should be on a recent version of your Linux distribution. Instructions are below are for Ubuntu (which must be on at least version 16). You may need to change the package names for other distributions:

sudo apt-get install libxml2-dev cmake gcc g++ python bison flex \
    zlib1g-dev swig python-dev libedit-dev libncurses5-dev

git clone [email protected]:jbush001/NyuziToolchain.git
cd NyuziToolchain
mkdir build
cd build
cmake ..
make
sudo make install

Building on MacOS

On Mavericks and later, you can install the host command line compiler like this:

xcode-select --install

On earlier versions, you can download XCode from the app store. You will also need to install a package manager like MacPorts to get the remaining dependencies. Open a new terminal to do the build after installing MacPorts, because it installs alternate versions of some utilities and updates the PATH. Once you have done this:

sudo port install cmake bison swig swig-python

git clone https://github.com/jbush001/NyuziToolchain.git
cd NyuziToolchain
mkdir build
cd build
cmake ..
make
sudo make install

Upgrading 'flex' using the package manager may cause build errors. I would recommend using the system supplied version.

Building on Windows

I have not tested this natively on Windows. Many of the libraries are already cross platform, so it should theoretically be possible.

Other Notes

  • The toolchain is installed into /usr/local/llvm-nyuzi/
  • The triple for this target is 'nyuzi-'.

Running Regression Tests

Change PATH environment variable to include the binary directory (build/bin). This is only required for llvm-lit based tests. Run the tests as follows (assuming you are at the top of the project directory):

export PATH=<BUILDDIR>/build/bin:$PATH
llvm-lit test
llvm-lit tools/clang/test/CodeGen/

All tests should pass.

Running Whole Program Tests

There is a set of tests in https://github.com/jbush001/NyuziProcessor/tree/master/tests/compiler Each test case is compiled and then run in the instruction set simulator, which checks the output for validity. This is similar to the test-suite project in LLVM. Instructions are in that directory.

nyuzitoolchain's People

Contributors

jbush001 avatar cristina9209 avatar adonut avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.