* doc/body.texi: Write detailed description and examples for
jit_get_memory_functions, jit_set_memory_functions,
jit_get_code, jit_set_code, jit_get_data and jit_set_data.
* include/lightning.h, lib/lightning.c: Add the new
jit_indirect() call, that returns a special label node,
and tells lightning that the label may be the target of
an indirect jump.
* doc/body.texi: Document the new jit_indirect() call, and
add examples of different ways to create labels and branches.
* doc/body.texi: Correct reversed arguments in example of
usage in a (possibly) multi threaded, multiple jit_state_t
environments.
* include/lightning/jit_arm.h, include/lightning/jit_private.h,
lib/jit_arm-cpu.c, lib/jit_arm.c: Make a previously, non
documented, global state private to the related jit_state_t
generating code.
* configure.ac, check/Makefile.am, doc/Makefile.am: Do not
explicitly link to -ldl, but instead autodetect the library
with dlopen, dlsym, etc.
* check/lightning.c: Add workaround to apparently buggy
getopt in HP-UX that sets optind to the wrong index, and
use RTLD_NEXT on HP-UX instead of RTLD_DEFAULT to dlsym
global symbols.
* include/lightning.h: Rework definitions of wordsize and
byte order to detect proper values on HP-UX.
* lib/lightning.c: Minor correction to use MAP_ANONYMOUS
instead of MAP_ANON on HP-UX.
* lib/jit_hppa.c: Float arguments must be passed on integer
registers on HP-UX, not only for varargs functions.
Add code to properly clear instruction cache. This was
not required on Debian hppa port, but may have been working
by accident.
* lib/jit_hppa-cpu.c: Follow pattern of HP-UX binaries and
use bve,n instead of bv,n to return from functions.
* lib/jit_hppa-fpu.c: For some reason "fst? frX,rX,(rY)" did
not work on the tested computer (HP-UX B.11.23 U 9000/785 HP-UX)
so the code was changed, at first for __hpux only to add the
base and offset register and use the instruction with an
immediate (zero) offset.
* include/lightning.h, lib/lightning.c: Implement the new
jit_clear_state and jit_destroy_state calls. jit_clear_state
releases all memory not required during jit_execution; that
is, leaves only the mmap'ed data and code buffers allocated.
jit_destroy_state releases the mmap'ed buffers as well as
the jit_state_t object itself, that holds pointers to the
code and data buffers, as well as annotation pointers (for
disassembly or backtrace) in the data buffer.
* lib/jit_note.c: Correct invalid vector offset access.
* check/ccall.c, check/lightning.c, doc/ifib.c, doc/incr.c,
doc/printf.c, doc/rfib.c, doc/rpn.c: Use the new jit_clear_state
and jit_destroy_state calls, to demonstrate the new code to
release all jit memory.
* doc/body.texi: Add basic documentation and usage description
of jit_clear_state and jit_destroy_state.
* doc/body.texi: Correct "jmpi" description that incorrectly
told it was possible to pass any address as jump target. The
only way to do that is "movi+jmpr".
* check/Makefile.am: "make debug" target should pass only
the main test tool program as argument for running gdb
* configure.ac: Add the --enable-assertions options.
* doc/Makefile.am, doc/body.texi, doc/lightning.texi:
Major rewrite of the documentation to match the current
implementation.
* doc/version.texi: Automatic date update.
* doc/ifib.c, doc/incr.c, doc/printf.c, doc/rfib.c, doc/rpn.c:
Implementation of the documentation examples, that are also
compiled during a normal build.
* doc/p-lightning.texi, doc/porting.texi, doc/toc.texi,
doc/u-lightning.texi, doc/using.texi: These files were
renamed in the documentation rewrite, as the documentation
was significantly trimmed due to full removal of the porting
chapters. Better porting documentation should be added but
for the moment it was just removed the documentation not
matching the implementation.
2012-12-02 Paulo Andrade <pcpa@gnu.org>
* .cvsignore: Removed for extra cleanup.
* build-aux: Rename directory to m4.
* m4: Renamed to "default" name and for consistency with merge
with code rework to be imported in lightning.
* .gitignore, configure.ac, Makefile.am, doc/Makefile.am:
Update for build-aux to m4 rename.
2012-12-01 Paulo Andrade <pcpa@gnu.org>
* opcode/Makefile.am, opcode/Makefile.in, opcode/ansidecl.h,
opcode/bfd.h, opcode/dis-asm.h, opcode/dis-buf.c, opcode/disass.c,
opcode/i386-dis.c, opcode/i386.h, opcode/ppc-dis.c, opcode/ppc-opc.c,
opcode/ppc.h, opcode/sparc-dis.c, opcode/sparc-opc.c, opcode/sparc.h,
opcode/sysdep.h: Removed. Do not bundle GNU binutils files.
* aclocal.m4, configure, Makefile.in, config.h.in, doc/Makefile.in,
lightning/Makefile.in, tests/Makefile.in: Removed. Do not maintain
autogenerated files that also generate too much diff noise when
regenerated in git.
* build-aux/help2man, build-aux/texinfo.tex, build-aux/texi2dvi:
Removed. Buildenvironment must have an up to date version from
upstream installed.
* build-aux/config.guess, build-aux/config.sub, build-aux/depcomp,
build-aux/install-sh build-aux/mdate-sh build-aux/missing: Removed.
Do not maintain a copy of automake files in git. Release tarballs
must use an up to date version.
* lightningize.in, doc/lightningize.1: Removed. Do not encourage
bundling lightning in other packages. It should use a system package
or a proper thirdy part subdirectory.
* INSTALL: Removed. Autoreconf removes it and creates a symlink
when regenerating files, so, avoid conflicts in git and let
automake create the symlink.
* .gitignore: Add INSTALL and autogenerated files.
* configure.ac, Makefile.am: Update for removal of opcode subdir,
auto generated files and lightningize.
* tests/Makefile.am, tests/3to2.c, tests/add.c, tests/bp.c,
tests/fib.c, tests/fibdelay.c, tests/fibit.c, tests/funcfp.c,
tests/incr.c, tests/printf.c, tests/rpn.c, tests/rpnfp.c,
tests/sete.c, tests/testfp.c: Update for removal of opcode subdir.
* doc/Makefile.am: Update for removal of lightningize.
* configure.ac, lightning/ppc/funcs.h, lightning/sparc/funcs.h,
lightning/i386/fp.h, lightning/i386/core.h, lightning/i386/asm.h,
tests/3to2.c, tests/add.c, tests/bp.c, tests/fib.c, tests/fibdelay.c,
tests/fibit.c, tests/funcfp.c, tests/incr.c, tests/printf.c,
tests/rpn.c, tests/rpnfp.c, tests/sete.c, tests/testfp.c:
Remove LIGHTNING_CROSS, it is half supported and incomplete.
* tests/3to2.c, tests/funcfp.c, tests/rpnfp.c: Remove preprocessor
check on JIT_FPR. If no hardware registers are available, the backend
must provide an alternative for software float.
* lightning/ppc/core.h, lightning/sparc/core.h, tests/Makefile.am:
Remove JIT_NEED_PUSH_POP. It is absolutely not trivial to implement
properly on some backends due to stack alignment constraints, and
whenever it is required, using jit_allocai and using a properly
aligned stack vector, or a heap buffer, is better.
* tests/push-pop.c, tests/push-pop.ok: Removed due to
JIT_NEED_PUSH_POP no longer available.
2010-07-28 Paolo Bonzini <bonzini@gnu.org>
* THANKS: Add Paulo Cesar Pereira de Andrade.
* doc/porting.texi: Fix ordering of arguments in jit_stxi.
* lightning/i386/core-32.h (jit_replace): Remove cmp argument.
* lightning/i386/fp-64.h (jit_movi_f): Fix.
2008-06-11 Paolo Bonzini <bonzini@gnu.org>
* build-aux/lightning.m4: Adjust LIGHTNING_BACKENDS, don't
use suffix support to distinguish i386/x86_64.
* lightning/i386/Makefile.frag: Use LIGHTNING_TARGET_FILES
to distribute *-32.h and *-64.h files now.
* lightning/i386/asm-i386: Moved to...
* lightning/i386/asm.h: Include the appropriate subtarget file.
* lightning/i386/core-i386: Moved to...
* lightning/i386/core.h: Include the appropriate subtarget file.
* lightning/i386/fp.h: New, include the appropriate subtarget file.
* lightning/i386/asm-32: Do not include asm-i386.h.
* lightning/i386/asm-64.h: Likewise.
* lightning/i386/core-32: Do not include core-i386.h.
* lightning/i386/core-64.h: Likewise.
* lightning/Makefile.am: Adjust for renamed files.
* configure.ac: Define LIGHTNING_TARGET here.
* opcode/disass.c: Change list of valid LIGHTNING_TARGET values.
* lightningize.in: Robustify against missing subtarget files.
2008-03-21 Paolo Bonzini <bonzini@gnu.org>
* lightning/i386/core-64.h: Fix jit_{ld,st}{,x}i_{i,l}.
Remove jit_ld{,x}i_ul.
* lightning/core-common.h: Make jit_ld{,x}{i,r}_ul
always a synonym of the _l variant.
* doc/porting.texi: Document this.
2006-11-20 Paolo Bonzini <bonzini@gnu.org>
Ludovic Courtes <ludo@chbouib.org>
* lightning/i386/core-32.h: Disable jit_push and jit_pop if stack not needed.
* lightning/i386/core-64.h: Disable jit_push and jit_pop if stack not needed.
* lightning/sparc/core.h: Merge final implementation of jit_pushr and jit_popr.
* lightning/ppc/core.h: Fix implementation of jit_pushr and jit_popr to
work (more or less) across function calls.
* tests/push-pop.c, tests/push-pop.ok: New test.
* tests/Makefile.am: Run it.
Patches applied:
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-32
Added missing SPARC changes from lightning@sv.gnu.org/lightning--stable--1.2--patch-10.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-33
SPARC: Fixed pushr/popr using %l7 to hold the pushed register offset.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-34
tests/push-pop.c: define `JIT_NEED_PUSH_POP'.
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-40
Patches applied:
* lcourtes@laas.fr--2005-libre/lightning--sparc-fixes--1.2--base-0
tag of lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-18
* lcourtes@laas.fr--2005-libre/lightning--sparc-fixes--1.2--patch-1
tests/push-pop.c: Use more `pushr's.
* lcourtes@laas.fr--2005-libre/lightning--sparc-fixes--1.2--patch-3
Added a test for `JIT_RET' (fails on SPARC).
* lcourtes@laas.fr--2005-libre/lightning--sparc-fixes--1.2--patch-4
Fixed use of `JIT_RET': Move %o0 into %i0 after `calli' and `callr'.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-19
Merge from `sparc-fixes': Fixed `pushr' and `popr', fixed `JIT_RET'.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-20
Undoed `lightning--sparc-fixes--1.2--patch-4' (about `JIT_RET') which was wrong.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-21
tests/ret.c: Use `jit_retval_i' to copy the function's return value.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-22
Doc: Clarified the use of `JIT_RET' and documented `jit_retval'.
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-32
2006-10-31 Paolo Bonzini <bonzini@gnu.org>
Ludovic Courtes <ludo@chbouib.org>
* tests/divi.c, tests/divi.ok, tests/movi.c, tests/movi.ok: New.
* tests/ldxi.c: Ensure large pointer is generated.
* tests/Makefile.am: Point to new tests.
* lightning.h: Include funcs-common.h before funcs.h.
* lightning/sparc/core.h: Fix bugs in modi/divi.
Patches applied:
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-11
Fixed a typo in `lightning/sparc/core.h'.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-12
SPARC: Fixed `jit_immsize' (untested!).
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-13
Added a `divi' test case (does not catch the bug fixed by the previous patch).
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-14
`divi' test case: Return non-zero on failure.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-15
`ldxi.c' (test case): Make sure we use a large pointer operand.
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-16
Added a `movi' test case (for `jit_movi_p' with large operands).
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-31
Patches applied:
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-7
Added a test case for `ldxi' with big immediate operands.
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-26
2006-07-06 Paolo Bonzini <bonzini@gnu.org>
Ludovic Courtes <ludovic.courtes@laas.fr>
* doc/using.texi: Clarify "Using autoconf" section
and rename it to "Bundling lightning"
* lightning.m4: Work also if lightning is not bundled.
Patches applied:
* lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-2
Fixed `LIGHTNING_CONFIGURE_IF_NOT_FOUND' in the case where `lightning.h' is not found.
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-23
2004-11-08 Paolo Bonzini <bonzini@gnu.org>
* lightning.h: New name of...
* lightning-inst.h: ... this file.
* lightning.h.in: Removed.
* opcodes/disass.c: Include config.h.
* tests/add.c: Include config.h.
* tests/bp.c: Include config.h.
* tests/fib.c: Include config.h.
* tests/fibdelay.c: Include config.h.
* tests/fibit.c: Include config.h.
* tests/funcfp.c: Include config.h.
* tests/incr.c: Include config.h.
* tests/printf.c: Include config.h.
* tests/printf2.c: Include config.h.
* tests/rpn.c: Include config.h.
* tests/rpnfp.c: Include config.h.
* tests/testfp.c: Include config.h.
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-4