GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.2.3.tar.gz
GNU Lightning 2.2.3 main new features:
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.2.2.tar.gz
GNU Lightning 2.2.2 main new features:
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.2.1.tar.gz
GNU Lightning 2.2.1 main new features:
GNU lightning 2.2.0 released!
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.2.0.tar.gz
GNU Lightning 2.2.0 extends the 2.1.4 release adding support for
Darwin aarch64, tested on Apple M1.
Now there is the new --enable-devel-strong-type-checking configure
option, not enabled by default, but code that works with that option
will work on Apple M1.
This release required significant rework as the Apple abi in aarch64
requires arguments to be truncated and zero/sign extended, unlike all
other ports. Jit generation will understand it, and use the system ABI,
avoiding double truncate and zero/sign extension.
Due to the significant rework, the library major number was bumped,
and the opportunity used to reorder the jit_code_t enumeration.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.1.4.tar.gz
2.1.4 main features are the new Loongarch port, currently supporting
only Linux 64 bit, and a new rewrite of the register live and
unknown state logic. Now it should be faster to generate code.
The matrix of built and tested environments is:
aarch64 Linux
alpha Linux (QEMU)
armv7l Linux (QEMU)
armv7hl Linux (QEMU)
hppa Linux (32 bit, QEMU)
i686 Linux, FreeBSD, NetBSD, OpenBSD and Cygwin/MingW
ia64 Linux
mips Linux
powerpc32 AIX
powerpc64 AIX
powerpc64le Linux
riscv Linux
s390 Linux
s390x Linux
sparc Linux
sparc64 Linux
x32 Linux
x86_64 Linux and Cygwin/MingW
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.1.3.tar.gz
2.1.3 main features are the new RISC-V port, currently supporting
only Linux 64 bit, and a major rewrite of the register live and
unknown state logic, so that a long standing issue with a live
register not accessed for several consecutive blocks could be
incorrectly assumed dead.
The matrix of built and tested environments is:
aarch64 Linux (Linaro, Foundation_v8pkg)
alpha Linux (QEMU)
armv7l Linux (QEMU)
armv7hl Linux (QEMU)
hppa Linux (32 bit, QEMU)
i686 Linux and Cygwin
ia64 Linux
mips Linux (32 bit)
powerpc32 Linux
powerpc64 Linux and AIX
powerpc64le Linux
riscv Linux (64 bit, QEMU)
s390 Linux (Hercules)
s390x Linux (Hercules)
sparc Linux (QEMU)
sparc64 Linux (QEMU)
x32 Linux (QEMU)
x86_64 Linux and Cygwin
------------------------------------------------------------------------
aarch64:
o Correct immediate checks on aarch64.
alpha:
o Always set the t12 register to the address of the called function.
hppa:
o Correct wrong regarg_p check.
mips:
o Correct issues with 32 bit big endian mips abis.
o Use JALR to get the same effect as JR.
powerpc:
o Update powerpc 32 bit port for the SYSV abi.
x86_64:
o Properly mark %r12 as callee save in x86_64.
generic:
o Correct logic error with the return register on several ports.
o Redesign the live and unknown register logic.
o Correct assertion on jit_unget_reg when there is a carry register.
o Update check/qalu.inc for more consistent verifications.
o Create lightning.h.in to remove dependency on config.h.
o Add wrapper to jit_live() to check/lightning test tool.
o Allow patching jit_ldi and jit_sti the same way as jit_movi.
o Correct doc/printf example to call jit_prepare.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.1.1.tar.gz
2.1.1 adds support for jit_allocar for runtime alloca, contrary to
jit_allocai that provides a static offset allocation.
2.1.1 also adds support for jit_va_start, jit_va_arg, jit_va_arg_d
and jit_va_end, that implements C compatible varargs functions.
Note: alpha, hppa, mips (n32 abi), ppc (Darwin abi) and sparc ports
are no longer supported due to lack of a test environment.
------------------------------------------------------------------------
ia64:
o Implement cache flush.
o Do not use a dangling pointer for double to integer copy.
x86:
o Correct issues in load and store in the x32 abi.
generic:
o Correct Fibonacci number generation examples.
o Correct wrong jit_movr simplification.
o Correct wrong live register information for some complex patterns.
o Adapt for binutils 2.29.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.1.0.tar.gz
2.1.0 adds the new jit_frame and jit_tramp calls, that makes
it easier to implement trampolines, tail call optimization and
continuations.
------------------------------------------------------------------------
ppc:
o Implement and use mcrxr emulation by default.
o Add support for little endian.
arm:
o Correct constants pool offset check.
o Correct inconsistencies with ldrd and strd.
s390:
o Add support for the 32 bit abi.
x86:
o Add support for the x32 abi.
o Update the x86 backend to work on cygwin64 and 32 bit cygwin.
generic:
o Correct a bug in the redundancy optimization simplify_stxi
function, that was making a wrong test comparing a registers
with an immediate offset.
o Implement jit_putarg*, that, with jit_getarg* allow read/write
access to function arguments.
o Implement typed jit_htonr* interfaces, to byte swap 2, 4 or
8 byte integers.
o Implement jit_rsb*. That generates "immediate - register"
in an optimized format in some ports, on others it is just
an useful alias.
o Implement jit_align, that accepts a value up to wordsize and
align code generation as appropriate.
o Only mark callee save regs as live on indirect jumps. That is,
indirect jumps are now treated as a function call.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.0.5.tar.gz
2.0.5 comes with a new port to the Alpha architecture. Thanks
to Many Trent Nelson from snakebite.net for providing access to
an Alpha computer.
------------------------------------------------------------------------
aarch64:
o Correct assertion on uninitialized state variables.
alpha:
o Implement lightning Alpha port.
arm:
o Correct wrong table of instruction sizes in software float.
o When checking cpu features, do not get confused on Linux if /proc
is not mounted, and end up not properly checking for __ARM_PCS_VFP,
that is the best source to know if a fpu is available.
mips:
o Correct usage of wrong register in jit_bmsr, that was working
(passing all tests) by accident.
generic:
o Add consistency check on temporaries during a jump.
o Always mark return registers as live in epilog.
o Correct change of possibly wrong bitmask in jit_update.
o Convert all assertions to result in an int check.
On alpha assertions directly on a pointer or long would fail if
only checking the top 32 bits.
o Do not pass null as free, memcpy and memmove arguments.
o Remove the global but not advertised jit_progname variable.
o Add note about initialization and jit_set_memory_functions call.
o Do not export some expected to be private definitions and types in
lightning/jit_${arch}.h.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.0.4.tar.gz
------------------------------------------------------------------------
x86_64:
o Correct wrong inline assembly in jit_get_cpu.
Previously it could cause data corruption when calling init_jit
if a 64 bit value was stored in %rbx, that was being truncated
in the bad asm.
arm:
o Correct crash in the doc/printf example.
The crash was specific to arm, due to releasing data required
by disassembly in jit_clear_state, before calling jit_disassembly.
o Do not emit a nop stack adjust instruction.
generic:
o Implement the new jit_indirect call.
This call returns a special label, and is required when creating
a label that can be only be reached with jit_jmpr.
o Implement the new jit_set_code interface.
This interface allows telling lightning to write code to a user
provided buffer, instead of lightning mmap'ed and managed memory.
o Implemented the new jit_set_data interface.
This interface allows telling lightning to not use a read only
data buffer for float/double constants, but instead synthesize
the constant; either gpr to fpr move, or gpr to stack and load fpr
from stack.
The interface also allows telling lightning to not generate debug
information, or using an alternate data buffer.
The new generic interfaces are documented and examples provided, in
lightning.info.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.0.3.tar.gz
This is a minor bug fixes release, and corrects all known bugs.
----------------------------------------------------------------
arm:
o Minor changes that should allow building on non gnu-linux/gcc
(e.g. clang/llvm & iOS7, untested)
ix86:
o Correct wrong x87 float indexed store code generation.
o Ensure the x87 stack is empty when calling a function
(this is particularly important if calling c99 complex functions,
that may easily fill the x87 stack, what could cause problems if
lightning did not empty the x87 stack)
o Correct wrong x87 optimization when loading the log(2) constant.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.0.2.tar.gz
----------------------------------------------------------------
generic bug fixes:
o Add assertion to detect double patching.
powerpc:
o Correct wrong ldxi_l simplification in 64 bit mode.
arm:
o Do not use ldrt/strt by default.
o Correct wrong offset for load/store of floats.
o Correct build when disassembler is disabled.
mips:
o Build and pass all test cases on mips64.
o Correct abi detection.
x86_64:
o %r12 may be used as an index register.
ia64:
o Correct some wrong value range checks.
ix86:
o Add alternate truncr_d implementation for Solaris 32 bit.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
This is mostly a bug fix release, with a few extra interfaces
to allow easier jit translation.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.0.1.tar.gz
----------------------------------------------------------------
o Add the new --enable-devel-get-jit-size configure option,
that can be used to regenerate the new jit_$arch-sz.c files.
The jit_$arch-sz.c files have static tables with longest
known instructions length generated when translating a
lightning instruction.
o Add the new jit_pointer_p predicate, that is useful to know
if a pointer is inside the jit code buffer.
o Make the jit_get_note call public. It was intended since
start, but by mistake not made public in lightning 2.0.0.
The call makes it easy to retrieve function name, file name
and line number information from any address in the jit
code buffer (provided that information was stored with
jit_name and jit_note).
o Correct wrong code on the s390x backend that was not
properly saving/restoring callee save floating point
registers.
o Correct wrong logic when patching forward function calls
or calling functions after moving the address to a register
in the hppa backend.
o Correct bogus logic when saving/restoring the r2 ia64
register, that is used as the lightning api specific
frame pointer register.
o Correct one example in the documentation that did not match
the actual sample implementation in the doc directory.
o Add fallback instead of plain #error if could not figure out
__WORDSIZE.
o Correct wrong logic updating internal state information of
current instruction set on the arm backend when generating
thumb instructions and needing to grow the code buffer.
o Test for zlib in configure.ac.
o Correct build and make check on NetBSD amd64.
o Correct build and make check on AIX with gcc 4.8.
Preventively another code path was corrected to avoid
possible problems with gcc 4.8 on ia64.
o Correct build on FreeBSD/amd64.
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
After significant delay working to ensure bug free and API/ABI
stability, the release is now available.
Development:
http://git.savannah.gnu.org/cgit/lightning.git
Download release:
ftp://ftp.gnu.org/gnu/lightning/lightning-2.0.0.tar.gz
----------------------------------------------------------------
Major highlights since lightning 1.2x are a large set of new
ports. The matrix of built and tested environments include:
i586 [1] Linux
x86_64 Linux and Solaris
powerpc [2] AIX, Darwin and Linux
sparc Linux and Solaris
arm [3] Linux
mips [4] Irix and Linux
ia64 HP-UX and Linux
hppa HP-UX and Linux
aarch64 [5] Linux
s390x [6] Linux
[1] Uses sse instructions by default on i586
[2] 32 bit on AIX and Darwin, 64 bit on Linux
[3] Supports armv4 or newer, arm or thumb instruction set,
softfp and hardfp
[4] Supports o32 and n32 abi
[5] Built on the Foundation V8 emulator
[6] Built on the Hercules emulator
----------------------------------------------------------------
A large set of test cases has been added so that it can brute
force test a huge amount of code generation combinations. New
tests can be easily added, to either ensure any regression is
corrected or simply to test conditions where problems may
arise.
----------------------------------------------------------------
GNU lightning 2.0.0 has been specially tailored to be used
for translation of bytecode to executable code, or conversion
of any interpreter that uses C switch or GCC computed gotos
to generation of an in memory executable.
Support for aarch64 was just committed to lightning.
The new port builds and pass all test cases.
Example using the main test tool:
<pre>
root@genericarmv8:~/lightning-1.99a/check# cat > hello.tst
.data 32
hello:
.c "Hello from aarch64!\n"
.code
prolog
prepare
pushargi hello
finishi @printf
ret
epilog
root@genericarmv8:~/lightning-1.99a/check# ./lightning -v hello.tst
0x7f809c1000 stp x29, x30, [sp,#-160]!
0x7f809c1004 mov x29, sp
0x7f809c1008 mov x0, #0xb120 // #45344
0x7f809c100c movk x0, #0x29f6, lsl #16
0x7f809c1010 bl 0x7f80a2eed0
0x7f809c1014 ldp x29, x30, [sp],#160
0x7f809c1018 ret
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hello from aarch64!
</pre>
The port was done using the Foundation v8 emulator and the Linaro
aarch64 image from
http://www.linaro.org/engineering/engineering-projects/armv8
GNU lightning is a library to aid in making portable programs
that compile assembly code at run time.
Home page:
http://www.gnu.org/software/lightning/
Latest alpha:
ftp://alpha.gnu.org/gnu/lightning/
Source code:
http://git.savannah.gnu.org/cgit/lightning.git
NEWS FROM 1.99 TO 1.99a
Lightning now builds and pass all test cases on AIX 7.1 powerpc, HP-UX 11iv2 hppa, HP-UX 11iv3 ia64, Solaris 10 Sparc, Solaris 11 x86_64, and Irix 6.5.30 mips (using n32 abi).
NEWS FROM VERSION 1.3 TO 1.99
The 1.99 version is a major lightning redesign and an alpha version.
Unless for some special power users usage, the major difference in the rework is that now function calls push arguments from left to right, what is both, more natural for programmers, and also more natural to implement for architectures that pass arguments in registers and have alignment constraints, usually for 64 bit double arguments.
Add mips backend, implementing the o32 abi.
Added arm backend implementing all combinations of software float, vfp, neon, arm and thumb instruction sets, softfp and hardp abis, armv5, armv6, and armv7.
Added sse2+ code generation for the 32 bit x86 backend.
Added sse3 and sse4.x optional code generation for the 64 bit x86 backend, code generation based on detected cpu.
Reworked and added full lightning instruction set to ppc 32; tested on ppc64 hardware and Darwin 32 operating system.
Added ppc64 backend, built and tested on Fedora ppc.
Reworked the sparc backend, built and tested on Debian sparc.
Added an ia64 backend, built and tested on Debian ia64.
Added an hppa backend, built and tested on Debian hppa.