HOME

TheInfoList



OR:

GNU lightning is a free-software library for generating assembly language code at run-time. Version 2.1.3, released in September 2019, supports backends for
SPARC SPARC (Scalable Processor Architecture) is a reduced instruction set computer (RISC) instruction set architecture originally developed by Sun Microsystems. Its design was strongly influenced by the experimental Berkeley RISC system developed ...
(32-bit), x86 (32- and 64-bit), MIPS,
ARM In human anatomy, the arm refers to the upper limb in common usage, although academically the term specifically means the upper arm between the glenohumeral joint (shoulder joint) and the elbow joint. The distal part of the upper limb between t ...
(32- and 64-bit),
ia64 IA-64 (Intel Itanium architecture) is the instruction set architecture (ISA) of the Itanium family of 64-bit Intel microprocessors. The basic ISA specification originated at Hewlett-Packard (HP), and was subsequently implemented by Intel in co ...
, HPPA,
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple– IBM ...
(32-bit), Alpha,
S390 The IBM System/390 is a discontinued mainframe product family implementing the ESA/390, the fifth generation of the System/360 instruction set architecture. The first computers to use the ESA/390 were the Enterprise System/9000 (ES/9000 ...
and
RISC-V RISC-V (pronounced "risk-five" where five refers to the number of generations of RISC architecture that were developed at the University of California, Berkeley since 1981) is an open standard instruction set architecture (ISA) based on establi ...
(64-bit).


Advantages over other libraries

The features GNU lightning provides make it useful for
Just-in-Time Compilation In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is a way of executing computer code that involves compiler, compilation during execution of a program (at run time (program lifecycle phase), run tim ...
. In comparison to libraries such as
LLVM LLVM is a set of compiler and toolchain technologies that can be used to develop a front end for any programming language and a back end for any instruction set architecture. LLVM is designed around a language-independent intermediate repre ...
or libJIT, GNU lightning provides only a low-level interface for assembling from a standardized RISC assembly language—loosely based on the
SPARC SPARC (Scalable Processor Architecture) is a reduced instruction set computer (RISC) instruction set architecture originally developed by Sun Microsystems. Its design was strongly influenced by the experimental Berkeley RISC system developed ...
and MIPS architectures—into the target architecture's machine language.


Disadvantages

It does not provide
register allocation In compiler optimization, register allocation is the process of assigning local automatic variables and expression results to a limited number of processor registers. Register allocation can happen over a basic block (''local register allocat ...
, data-flow or
control-flow analysis In computer science, control-flow analysis (CFA) is a static-code-analysis technique for determining the control flow of a program. The control flow is expressed as a control-flow graph (CFG). For both functional programming languages and object- ...
, or
optimization Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criterion, from some set of available alternatives. It is generally divided into two subfi ...
. Starting from 2.x, It generates code via intermediate graph, rather than one by one from each It's standardized instruction. This change allows inter-instruction optimization such as register allocation and dead code eliminatio


Instruction set

GNU lightning's instruction set is based loosely on existing Reduced instruction set computing, RISC architectures.


Types

When required instructions handle data with these 9 types:


Projects that use GNU lightning

GNU Smalltalk GNU Smalltalk is an implementation of the Smalltalk programming language by the GNU Project. The implementation, unlike other Smalltalk environments, uses text files for program input and interprets the contents as Smalltalk code. In this way, G ...
,
GNU Guile GNU Ubiquitous Intelligent Language for Extensions (GNU Guile) is the preferred extension language system for the GNU Project and features an implementation of the programming language Scheme. Its first version was released in 1993. In additio ...
, and
CLISP In computing, CLISP is an implementation of the programming language Common Lisp originally developed by Bruno Haible and Michael Stoll for the Atari ST. Today it supports the Unix and Microsoft Windows operating systems. CLISP includes an int ...
make use of GNU lightning for
just-in-time compilation In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is a way of executing computer code that involves compiler, compilation during execution of a program (at run time (program lifecycle phase), run tim ...
. GNU lightning was first developed as a tool to be used in GNU Smalltalk's dynamic translator from bytecodes to native code. GNU Guile 2.9.2 and later stop using GNU lightning 2.x instead their own fork based on GNU lightning 1.4 for native code generation, because GNU lightning 2.x devotes more complexity to inter-instruction optimization.


Notes


References


External links


GNU lightning
on
Free Software Directory The Free Software Directory (FSD) is a project of the Free Software Foundation (FSF). It catalogs free software that runs under free operating systems—particularly GNU and Linux. The cataloged projects are often able to run in several other opera ...
lightning Lightning is a naturally occurring electrostatic discharge during which two electrically charged regions, both in the atmosphere or with one on the ground, temporarily neutralize themselves, causing the instantaneous release of an average ...
{{Free-software-stub