lightning
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Using Lightning for iOS


From: Paulo César Pereira de Andrade
Subject: Re: [Lightning] Using Lightning for iOS
Date: Mon, 25 Feb 2013 22:02:58 -0300

2013/2/25 Iain Merrick <address@hidden>:
> Hi lightning folks,

  Hi,

> Good to see there's some recent activity on this list, and discussion
> of Lightning 2.0!
>
> I'm interesting in writing some JIT-based code to target iOS. Apple
> imposes some heavy restrictions on dynamic code generation, so it
> occurs to me that Lightning be a better fit than LLVM, as Lightning is
> much simpler and should be easier to tweak. (The main requirement
> seems to be setting code pages to r-x before trying to execute them;
> rwx is banned. Good explanation here: good summary here:
> http://www.stuartcarnie.com/2011/03/executable-pages-in-ios-43.html)

  While it has not really been added in the current code, it is intended
since the start of the lightning 2.0 design, all bits are already in place
for it, basically just needs to mprotect the mmap'ed memory once jit
is generated.

> What's the current level of ARM support?

  I works on Linux, in software float mode, and also in the softfp
and hardfp abi formats, and can generate arm or thumb2 code.
Aarch64 is only in my todo list, once I get access to one :-)

> http://www.gnu.org/software/lightning/ says "the available backends
> cover the i686, x86_64, mips, arm, ppc, and sparc architectures", but
> links to the download for Lightning 1.2, which only seems to contain
> i386, ppc and sparc. Is there newer code somewhere?

  I became maintainer of lightning a few months ago. I hope to settle
for a lightning 2.0 before mid year, with an official release. For now,
you can get the sources from git, see
http://savannah.gnu.org/git/?group=lightning

  It should be very close to finished api wise, but some minor
simplifications should still be done. If you have used lightning
before, unless you are generating jit in some really very restricted
environment, like a boot loader, the major changes now is
left to right argument passing, and only wordsize operations for
integers (no _i, _l and _p suffixes), and slightly different approach
for patching, because it now uses an intermediate representation,
so, addresses are only known after actually generating jit.

> Thanks!
>
> Iain

Paulo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]