1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 12:20:26 +02:00
Commit graph

20 commits

Author SHA1 Message Date
pcpa
610a569300 Add framework for sparc port.
* include/lightning/jit_sparc.h, lib/jit_sparc-cpu.c,
	lib/jit_sparc-fpu.c, lib/jit_sparc.c: New files implementing
	the basic framework of the sparc port.

	* configure.ac, include/lightning.h, include/lightning/Makefile.am,
	include/lightning/jit_private.h, lib/jit_disasm.c: Update
	for the sparc port framework.

	* lib/jit_mips.c: Correct reversed retr/reti logic.

	* lib/jit_ppc.c: Correct misspelled __LITTLE_ENDIAN.

	* lib/lightning.c: Always do byte hashing in hash_data, because
	the logic to "compress" strings causes large pointers to not
	be guaranteed aligned at 4 byte boundaries.
	  Update for the sparc port framework.
2013-02-18 01:18:54 -03:00
pcpa
44d4fa5444 Add heuristic code to estimate space and resize if required jit buffer. 2013-01-29 16:37:43 -02:00
pcpa
16d18f11d3 Update texinfo documentation to match current implementation.
* 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.
2013-01-24 19:41:35 -02:00
pcpa
a34410eee2 Add filename and line number annotation abstraction.
* lib/jit_note.c: New file implementing a simple string+integer
	annotation, that should be used to map filename and line number
	to offsets in the generated jit.

	* include/lightning.h, lib/lightning.c: Update for the new
	note code.
	  Add an extra mandatory argument to init_jit, that is used
	as argument to bfd_openr.
	  Change from generic void* to char* the argument to jit_note
	and add an extra integer argument, to map to filename and
	line number.

	* check/ccall.c, check/lightning.c, include/lightning/jit_private.h,
	lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips.c, lib/jit_ppc.c,
	lib/jit_print.c, lib/jit_x86.c: lib/Makefile.am: Update for the
	new annotation code.

	* configure.ac, check/Makefile.am: Update to work with latest
	automake.
2013-01-11 15:29:35 -02:00
pcpa
d05538bff6 Add support to test different/alternate code generation setups.
* check/lightning.c: Remove the ".cpu name value" syntax,
	as it was not able to do proper changes before the jit
	internal data structure was initialized. Now it supports
	several getopt options to force using different jit
	generation options, effectively replacing the previous
	syntax.

	* check/run-test: Add simple extra logic to handle differently
	named test scripts, used to test things like x87 coprocessor
	in ix86, and arm instruction set or software float in armv7l.

	* configure.ac: Add some AC_RUN_IFELSE calls to figure at
	compile time if can test different code generation options,
	and update Makefile generation accordingly.

	* check/Makefile.am, lib/jit_arm.c, lib/jit_x86.c: Update to
	properly work with the test tool updating the jit_cpu global
	information.

	* check/check.arm.sh, check/check.swf.sh, check/check.x87.sh:
	New wrapper files passing -mthumb=0, mvfp=0 and -mx87=1 to
	the test tool, if applicable, so that it can validate alternate
	code generation options on test hosts that support them.
2012-12-14 22:40:08 -02:00
pcpa
7e3d863767 Add better ppc support code, but still not functional.
* configure.ac: Only default to using the builtin disassembler
	if on GNU/Linux. This should be temporary, due to requiring
	/proc/self/exe.
	  Correctly check $target_cpu for powerpc.

	* include/lightning/jit_ppc.h: Correctly implement jit_v_num.

	* include/lightning/jit_private.h: Declare proper prototype
	for jit_init_debug and jit_finish_debug.

	* lib/jit_ppc-cpu.c: Remove code to save/restore callee save
	float registers, as it is not required since those float
	registers are not usable currently.
	  Change prolog and epilog generation to, at least comparing
	code, match what gcc generates in "gcc -O0", but it is still
	failing in Darwin PPC, apparently due to the __clear_cache
	call not being enough, as frequently it will also fail to
	execute, and the code buffer is all zeroes.

	* lib/lightning.c: Do not fail in jit_regset_scan1 calls due
	to passing 64 as argument on computers with 64 registers.
2012-12-11 02:16:51 -02:00
pcpa
91244b1801 Correct test cases in i586 build.
* check/ldstxi.tst, check/ldstxr.tst: Correct wrong argument
	order for 32 bit mode tests.

	* configure.ac: Correct check for ix86 target_cpu.
2012-12-05 22:40:02 -02:00
pcpa
1c9088beca Update code to build and pass test cases in the arm port.
* configure.ac, include/lightning/jit_private.h, lib/jit_arm-cpu.c,
	lib/jit_arm-swf.c, lib/jit_arm.c, check/Makefile.am: Correct
	implementation of the arm backend port to build and pass the
	current test cases. Tested on armv7 with softfp abi.

	* lib/jit_disasm.c: Rename and change prototype of static
	disassemble function as in the arm backend it is required
	to access state information stored in the jit_state_t object.

	* check/3to2.tst, check/add.tst: Correct test case code assuming
	JIT_RO and JIT_RET are the same, and even if they are the same,
	the logic was incorrect because it must always call jit_retval*
	to fetch a function call return before any other instruction.
	The arm backend hash a special condition if jit_retval is not
	called, because "r0" is not JIT_R0, but is JIT_RET and *also*
	the first argument for a called function, so JIT_RET must be
	only used as an argument to jit_retval.

	* TODO: New file listing important tasks to be resolved.
2012-12-03 14:27:27 -02:00
pcpa
e6f1df7124 Correct make distcheck.
2012-12-03 Paulo Andrade <pcpa@gnu.org>

	* configure.ac, check/Makefile.am, check/check.sh,
	doc/Makefile.am, include/lightning/Makefile.am,
	lib/Makefile.am: Correct make distcheck.
2012-12-03 07:26:40 -02:00
pcpa
7a1c455237 Big merge with new lightning semantics aiming for lightning 2.0.
2012-12-02 Paulo Andrade <pcpa@gnu.org>

	* tests/Makefile.am, tests/3to2.c, tests/3to2.ok, tests/add.c,
	tests/add.ok, tests/allocai.c, tests/allocai.ok, tests/bp.c,
	tests/bp.ok, tests/divi.c, tests/divi.ok, tests/fib.c, tests/fib.ok,
	tests/fibdelay.c, tests/fibdelay.ok, tests/fibit.c, tests/fibit.ok,
	tests/funcfp.c, tests/funcfp.ok, tests/incr.c, tests/incr.ok,
	tests/ldst.c, tests/ldst.ok, tests/ldxi.c, tests/ldxi.ok,
	tests/modi.c, tests/modi.ok, tests/movi.c, tests/movi.ok,
	tests/printf.c, tests/printf.ok, tests/printf2.c, tests/printf2.ok,
	tests/ret.c, tests/ret.ok, tests/rpn.c, tests/rpn.ok, tests/rpnfp.c,
	tests/rpnfp.ok, tests/sete.c, tests/sete.ok, tests/testfp.c,
	tests/testfp.ok, tests-run-test: Removed previous test suite, in
	favor of a newer one in the check subdirectory.

	* check/3to2.ok, check/3to2.tst, check/add.ok, check/add.tst,
	check/allocai.ok, check/allocai.tst, check/bp.ok, check/bp.tst,
	check/divi.ok, check/divi.tst, check/fib.ok, check/fib.tst:
	New sample input for the new test program, loosely matching
	several of the previous test cases.

	* check/Makefile.am: New test suite makefile.

	* check/check.sh, check/run-test: New wrapper files for the
	new test suite.

	* check/lightning.c: New file. The main driver of the new test
	suite, that compiles to a parser of a very simple assembly like
	language, generates jit and executes it.

	* check/all.tst: New file. A generic debug and sample test file
	with a directive to prevent it from being executed, and useful to
	read disassembly of all possible instructions, using a fixed set
	of registers.

	* include/Makefile.am, include/lightning.h,
	include/lightning/Makefile.am, include/lightning/jit_arm.h,
	include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
	include/lightning/jit_private.h, include/lightning/jit_x86.h,
	lib/Makefile.am, lib/jit_disasm.c, lib/jit_print.c,
	lib/jit_x86-cpu.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c,
	lib/jit_x86.c, lib/lightning.c: New files. These files are
	written from scratch, only by <pcpa@gnu.org>, and have now
	copyright assignment to the FSF. This is the core of the new
	lightning rework. Previously it was integrated in code with
	a garbage collector and several custom types like vectors and
	hash tables, so this first code merge with lightning converts
	that code into a library extracting only the jit bits, and at
	first only for x86_64 GNU/Linux.

	* lightning.h, m4/lightning.m4: Removed. These are no longer
	required in the new lightning code.

	.gitignore, Makefile.am, configure.ac: Update for the new
	lightning code.
2012-12-02 19:44:36 -02:00
pcpa
75d99beb21 Extra cleanup before update to new codebase.
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-02 19:08:34 -02:00
pcpa
7d3321d696 Cleanup on preparation for lightning rework.
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.
2012-12-01 17:52:59 -02:00
Paolo Bonzini
66aef1c644 detect 32-/64-bit variant of i386 back-end at include time (not configure time)
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-06-11 19:00:37 -07:00
Paolo Bonzini
1551f5a787 switch to GPLv3
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-55
2008-01-09 15:50:13 +01:00
Paolo Bonzini
1f7feaffe2 first merge of x86-64 backend and related configury changes
Patches applied:

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--base-0
   tag of bonzini@gnu.org--2004b/lightning--stable--1.2--patch-28

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-1
   start merging from mzscheme...

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-2
   fix i386

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-3
   fix distribution hiccups

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-4
   adapt for usage outside distribution.

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-6
   fixes for GNU Smalltalk

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-30
2008-01-09 15:49:45 +01:00
Paolo Bonzini
65f45278de upgrade to autoconf 2.60
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-27
2008-01-09 15:49:40 +01:00
Paolo Bonzini
2c1b6b96e8 bump version, add ldxi test case
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
2008-01-09 15:49:39 +01:00
Paolo Bonzini
4dc7a6e75b Fix comments in config.h.in
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-18
2008-01-09 15:49:31 +01:00
Paolo Bonzini
50a74cf9c1 use autoheader like every other package in this world
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
2008-01-09 15:49:23 +01:00
Paolo Bonzini
3b4c061913 initial import
(automatically generated log message)

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--base-0
2004-10-10 21:18:38 +00:00