Giter Club home page Giter Club logo

Comments (13)

elliottslaughter avatar elliottslaughter commented on August 31, 2024 1

Does anyone in this issue still care about this?

I've had success building on PowerPC (which is a platform not supported by LuaJIT) with this PR: #320

from terra.

aiverson avatar aiverson commented on August 31, 2024 1

I would like to have this capability.

from terra.

zdevito avatar zdevito commented on August 31, 2024

It's something we eventually want to do, but have no concrete roadmap for due to some unknowns.
The LLVM JIT is being converted from their old JIT to MCJIT. We use the old JIT because it works well as an incremental compiler, something that hasn't been integrated into MCJIT yet. Unfortunately, the old JIT only really works on x86. Hopefully we will be able to use MCJIT soon, which will remove the blocker.

The second issue is that LLVM doesn't handle C calling convensions, so our code generator (tcompiler.cpp) will need to be updated with ARM calling conventions. This shouldn't be too difficult once JITing on ARM is possible.

from terra.

bananu7 avatar bananu7 commented on August 31, 2024

Could we get any update on that?

from terra.

zdevito avatar zdevito commented on August 31, 2024

Yeah, we have some preliminary arm support now. We've tested it on Nvidia's
Tegra K1 board, and at one point we were able to get it running on the
Raspberry Pi, but I don't have one set up right now to test with the latest
release.

However, we haven't implemented the entire ARM calling convention yet. When
calling C functions from Terra, and Terra functions from Lua, this
limitation restricts what types can be passed and returned. In particular,
structs and arrays cannot be passed/returned as values (pointers to them
are fine), and you cannot return multiple values from Terra (they are
packed in structs). When calling Terra functions from Terra there are no
restrictions.

It's often the case that you can work around the calling convention stuff,
since most C APIs don't pass structs by value, and you can avoid creating
code that does it yourself.

this is some code to get it running on the Tegra K1 board running ubuntu:

sudo add-apt-repository universe
sudo apt-get install build-essential llvm-3.4-dev clang-3.4
libclang-3.4-dev git
git clone https://github.com/zdevito/terra
cat > terra/Makefile.inc <<END
TERRA_CXX = g++
TERRA_CC = gcc
LLVM_CONFIG = $(shell which llvm-config-3.4)
END
make -C terra

On Fri, Nov 14, 2014 at 8:10 AM, Bartek Banachewicz <
[email protected]> wrote:

Could we get any update on that?


Reply to this email directly or view it on GitHub
#53 (comment).

from terra.

Starcounter-Jack avatar Starcounter-Jack commented on August 31, 2024

There is an open pull request regarding ARM. Should it be closed?

from terra.

zdevito avatar zdevito commented on August 31, 2024

Yes, I closed that, thanks. This issue will stay open until all of our functionality is supported on ARM.

from terra.

 avatar commented on August 31, 2024

Pinging for a query to status. Can a build off of master on an ARM architecture yield a working interpreter? What are the largest known missing features?

I'm very deep on the ARM side at present - - if a build is easy to achieve, I would be happy to contribute ARM builds and test pass/fail reports.

from terra.

bananu7 avatar bananu7 commented on August 31, 2024

I think that Terra should support the other architectures in general, but it remains a question of effort vs benefits, I suppose.

from terra.

elliottslaughter avatar elliottslaughter commented on August 31, 2024

If LuaJIT supports your platform, this should pretty much work out of the box (with a sufficiently recent version of LLVM).

For platforms LuaJIT doesn't support, like I mentioned in the last comment, you'll need to use PR #320, which continues to be a work in progress but is feature-complete enough that we've been able to use it for doing runs on the Summit supercomputer (a PPC64le machine).

from terra.

elliottslaughter avatar elliottslaughter commented on August 31, 2024

I haven't specifically tested ARM, but we've had success using PR #320 on PPC64le for a long time now, so I'm going to close this as "good enough".

If there are any actual issues with ARM support, please open new issues.

from terra.

elliottslaughter avatar elliottslaughter commented on August 31, 2024

Just wanted to update this to add: ARM64 binaries are included in release 1.0.1 and pass roughly 96% of the test suite (as tested on a Raspberry Pi with Ubuntu 22.04).

from terra.

elliottslaughter avatar elliottslaughter commented on August 31, 2024

As of 1.0.5 Terra now fully supports AArch64.

from terra.

Related Issues (20)

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.