1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-17 23:32:25 +02:00
Commit graph

484 commits

Author SHA1 Message Date
Andy Wingo
d567faf657 Create beginning of stripped-down lightning interface
This file is the beginning of a lightened lightning.
2018-10-30 13:36:09 +01:00
Andy Wingo
90ebba864a Remove unneeded bits of lightning 2018-10-30 12:32:26 +01:00
Andy Wingo
9c1b01fba5 Simplify file names 2018-10-30 12:29:18 +01:00
Andy Wingo
846e7bc443 Remove -sz.c files
The new form of this library will not need them.
2018-10-30 12:21:45 +01:00
Andy Wingo
48993156f6 Rename lightning.c to jit.c 2018-10-30 12:20:05 +01:00
Andy Wingo
796ec6c16d Rename include to jit.h, move all files to jit/
This change is in anticipation of making this lightning fork into an
include-only library.
2018-10-30 12:16:35 +01:00
Andy Wingo
a5263b6618 Remove autotools 2018-10-30 11:48:23 +01:00
Andy Wingo
8215433144 Remove bits of .gitignore no longer needed 2018-10-30 11:47:57 +01:00
Andy Wingo
beac56d7ec Remove TODO 2018-10-30 11:47:49 +01:00
Andy Wingo
4ca2f6ef2a Archive lightning ChangeLog 2018-10-30 11:42:08 +01:00
Andy Wingo
59064a1949 Move lightning.texi up to root, and remove Makefile.am 2018-10-30 11:35:53 +01:00
Andy Wingo
414f530c1d Inline body.texi and version.texi into lightning.texi 2018-10-30 11:35:01 +01:00
Andy Wingo
423d048b25 Remove example .c files from documentation 2018-10-30 11:33:58 +01:00
Andy Wingo
d90a545a58 Strip "get-jit-size" feature from lightning.
* libguile/lightning/Makefile.am:
* libguile/lightning/configure.ac:
* libguile/lightning/size.c: Remove devel-only "get-jit-size" feature.
2018-10-30 11:22:35 +01:00
Andy Wingo
549dc50cfd Update .gitignore 2018-10-30 11:16:01 +01:00
Andy Wingo
3c76115aec Update version.texi 2018-10-30 10:48:00 +01:00
Paulo Andrade
94a188844d Correct typo and values in jit_sparc-sz.c 2018-04-25 16:02:52 -03:00
Paulo Andrade
d2ff737812 HPPA: Correct wrong regarg_p check
If argument registers are in incremental order in the global _rvs
vector, the check if a register argument is reversed.
  Adapted from a regression found in sparc 64.
2018-04-20 15:01:44 -03:00
Paulo Andrade
2cea99361b Build and pass all tests on 32 and 64 bit sparc
* include/lightning/jit_private.h: Add new register classes to
	flag float registers and double only registers, required for sparc64
	where only low 32 bit fpr registers can be used for single precision
	operations.
	Add new 128 bit jit_regset_t type for sparc64 register set.

	* include/lightning/jit_sparc.h, lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c,
	lib/jit_sparc-sz.c, lib/jit_sparc.c: Update for 64 bits sparc.

	* lib/lightning.c: Update for new jit_regset_t required for sparc64.
2018-04-20 10:37:37 -03:00
Paulo Andrade
ed5589ce59 Build and pass all test cases on Alpha Linux
* check/lightning.c, include/lightning.h: Add the new jit_va_push
	interface. That should be called when passing a va_list to a C
	function. This is required because on Alpha a va_list is passed
	by value, and lightning does not know about data types, so, cannot
	understand it is pushing a va_list as argument.

	* lib/jit_names.c, lib/lightning.c: Minor changes for the new
	jit_code_va_push.

	* check/cva_list.c: Update only test case using jit_va_push, to
	pass a va_list to a C function.

	doc/body.texi: Better documentation of the varargs interface.

	* jit_alpha.c, jit_alpha-cpu.c: Update to properly push a
	C va_list and correctly calculate varargs offset.

	* lib/jit_aarch64-sz.c, lib/jit_aarch64.c, lib/jit_alpha-sz.c,
	lib/jit_arm-sz.c, lib/jit_arm.c, lib/jit_hppa-sz.c, lib/jit_hppa.c,
	lib/jit_ia64-sz.c, lib/jit_ia64.c, lib/jit_mips-sz.c, lib/jit_mips.c,
	lib/jit_ppc-sz.c, lib/jit_ppc.c, lib/jit_s390-sz.c, lib/jit_s390.c,
	lib/jit_sparc-sz.c, lib/jit_sparc.c, lib/jit_x86-sz.c, lib/jit_x86.c:
	Update for the new jit_va_push interface.
2018-02-26 09:48:50 -03:00
Paulo Andrade
b64b82ca51 Always set t12 to address of called function
* lib/jit_alpha-cpu.c: Always set t12 to the address of the
	current function, to properly work on all systems. Previously
	the shortcut did only work on Tru64. For Linux and glibc the
	change is required.
2018-02-22 13:17:28 -03:00
Paulo Andrade
2cf092efe4 Correct logic error with jit_live in jit_retr
* lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c,
	lib/jit_mips.c, lib/jit_ppc.c, lib/jit_sparc.c, lib/jit_x86.c:
	Correct wrong logic in usage of jit_live in jit_retr. The
	problem is that if a temporary is required during epilog,
	the return register might be allocated, so, jit_live must always
	be used.
2018-02-22 13:05:04 -03:00
pcpa
59f32e85c3 Add extra argument to jit_update to prevent recursion on branches
* lib/lightning.c: Avoid deep recursions when computing live
	register ranges.
2018-01-31 17:09:29 -05:00
pcpa
68dc475474 Correct issues with 32 bit big endian mips abis
* lib/jit_mips-cpu.c: Correct frame size and varargs
	initialization for the n32 abi.
	* lib/jit_mips.c, lib/jit_mips-fpu.c: Correct 32 bit abis
	in big-endian.
2018-01-31 08:52:27 -05:00
pcpa
df57fa95eb GNU lightning 2.1.2 release 2017-09-14 13:27:48 -04:00
pcpa
19439d47cb Correct binutils version detection 2017-09-14 13:27:09 -04:00
pcpa
c72b92333d GNU lightning 2.1.1 release 2017-09-14 10:44:34 -04:00
pcpa
3fc2eb2f95 Update copyright year 2017-09-14 10:44:12 -04:00
pcpa
7259f9dc8a Adapt for binutils 2.29
* configure.ac: Add check for binutils 2.29 prototype to the
	disassembler function.
	* lib/jit_disasm.c: Adapt for binutils 2.29 change.
2017-09-13 11:39:30 -04:00
pcpa
d761499315 Add a second pass to compute live register ranges
* include/lightning/jit_private.h, lib/lightning.c: Add a
	second pass from start when computing register live ranges.
	This should be used temporarily, and is required for certain
	loop constructs, with several consecutive blocks not referencing
	a live register.
2017-05-09 13:27:37 -04:00
pcpa
aa939b8ef8 Correct wrong live information for some code patterns
* lib/lightning.c: Correct wrong movr simplification,
	remove no longer needed code to set return registers live
	and update live register set when reaching a label boundary,
	but do not descend if the block has been already visited.
	The later need some tuning for complex code generation, where
	it will still have issues.
2016-05-05 17:55:29 -03:00
pcpa
b00c750830 Correct wrong movr simplification 2016-05-05 11:19:45 -03:00
Paulo Andrade
be32b6ad15 Correct wrong check for argument of value 2 in check/fib.tst. 2015-11-30 17:04:47 -02:00
Paulo Andrade
76876dd7bf Implement a correct generation of Fibonacci numbers.
* doc/body.texi: Change documentation to no longer say
	it is a variant of the Fibonacci sequence, and document
	a proper implementation.
	Thanks to Jon Arintok for pointing out that the Fibonacci
	sequence generation was incorrect. It was documented, but
	still confusing.

	* check/fib.tst, check/fib.ok, check/bp.tst, check/bp.ok,
	doc/ifib.c, doc/rbif.c: Implement a proper Fibonacci
	sequence implementation.
2015-11-30 15:32:48 -02:00
Paulo Andrade
fd57359498 Correct missing jit_unget_reg calls 2015-11-04 17:05:51 -02:00
pcpa
17e78965a2 mips: Pass tests for variadic jit functions on new abi
* lib/jit_mips-cpu.c: Correct definition of htonr_ul.
	Correct prolog/epilog/va* routines to work on o64 abi.

	* lib/jit_mips-fpu.c: Correct load of double literal
	argument when not using a data buffer.
	Remove alignment correction in vaarg_d if using the
	new mips abi.

	* lib/jit_mips.c: Correct code to allow creating variadic
	jit functions when using the new mips abi.

	* lib/jit_rewind.c: Minor adjust for rewind when using
	the new mips abi, if there are varargs arguments in
	registers.
2015-07-03 20:53:34 -03:00
Paulo Andrade
c6b8fb2a74 ia64: Pass all tests for variadic jit functions
* lib/jit_ia64-cpu.c: Search backward for the last output
	register used, otherwise would stop too early if a float
	argument used the slot.
	Correct offset of first va_list argument, and use proper
	va_list abi.

	* lib/jit_ia64-fpu.c: Add new functions to move a gpr
	to a fpr register, to counterpart the ones that move a
	fpr to a gpr. These are required to properly implement
	jit_getarg*_{f,d} on complex prototypes, or variadic
	jit functions.

	* lib/jit_ia64-sz.c: Update for support to jit variadic
	functions.

	* lib/jit_ia64.c: Implement proper abi for variadic
	jit functions.
2015-06-06 22:28:20 -03:00
pcpa
d0a5bd8d3d Implement new synthesized IR codes sequences
* lib/jit_rewind.c: New file implementing generic functions
	to "rewind", or rewrite IR code sequences.

	* include/lightning.h: Add several new codes, that previously
	were a function call, that would synthesize the operation.
	Now, there is a code for the operation, and a new flag to
	know an operation is synthesized.

	* include/lightning/jit_private.h: Add several new macros to
	help construct synthesized IR code sequences.

	* lib/Makefile.am: Update for lib/jit_rewind.c.

	* lib/jit_disasm.c: Update for a small rework on jit_node_t,
	so that --enable-devel-disassembler does not need a change
	in the layout of jit_node_t.

	* lib/jit_names.c: Update for the new codes.

	* lib/jit_print.c: Update to print more readable output, and
	flag synthesized IR code sequences.

	* lib/jit_aarch64-sz.c, lib/jit_aarch64.c,
	lib/jit_arm-sz.c, lib/jit_arm.c, lib/jit_x86-sz.c,
	lib/jit_x86.c: Update for new synthesized IR code sequences.

	* lib/jit_ppc-cpu.c, lib/jit_ppc-fpu., lib/jit_ppc-sz.c,
	lib/jit_ppc.c, lib/jit_mips-cpu.c, lib/jit_mips-fpu.c,
	lib/jit_mips-sz.c, lib/jit_mips.c, lib/jit_s390-fpu.c,
	lib/jit_s390-sz.c, lib/jit_s390.c: Update for new synthesized
	IR code sequences and correct bugs in the initial varargs
	implementation support.

	* lib/jit_alpha-sz.c, lib/jit_alpha.c, lib/jit_hppa-sz.c,
	lib/jit_hppa.c, lib/jit_ia64-sz.c, lib/jit_ia64.c,
	lib/jit_sparc-sz.c, lib/jit_sparc.c: Add generic, untested
	support for the new synthesized	IR code sequences. Known
	most likely broken right now, and should be corrected once
	access to these hosts is available.

	* lib/lightning.c: Update for new IR codes, and add support
	for not yet existing instructions that change third argument.

	* size.c: Change to use different tables for LE and BE PowerPC.
	Correct a wrong endif for x32.
2015-06-04 18:53:07 -03:00
pcpa
7f1e0dfb34 Move definition of jit_va_ codes, cosmetic change. 2015-05-25 16:06:55 -03:00
pcpa
e21db9c421 Use an actual, invalid code, as last jit code. 2015-05-25 16:00:01 -03:00
pcpa
1ce1d00db8 Move multiply defined macro to a single header file. 2015-05-25 15:53:17 -03:00
pcpa
0b6cc01eea Intermediate, fully functional, rework for variadic functions
* check/cva_list.c: New file implementing a test to ensure
	the value returned by jit_va_start is a valid C va_list.

	* check/va_list.ok: New simple helper file, as now the
	va_list.tst test is enabled.

	* check/va_list.tst: Rewritten for an extensive variadic
	jit functions test.

	* check/Makefile.am: Update for the new tests.

	* lib/jit_arm-cpu.c, lib/jit_arm-swf.c, lib/jit_arm-vfp.c,
	lib/jit_arm.c: Correct broken software float in a previous
	commit. Note that the hard float abi implementation is known
	broken at this time, for special cases involving variadic
	functions, and should be corrected next.

	lib/jit_x86-cpu.c, lib/jit_x86-sz.c, lib/jit_x86.c: Correct
	the jit_va_list_t semantics to match C va_list.
2015-05-25 15:20:24 -03:00
pcpa
237c90295a Bump library major.
* lib/Makefile.am: Bump library major. This is a preparation
	for a rework that was due for quite some time, but that is
	now required to properly implement variadic jit functions.
	The rework is mainly required to know at prolog parsing, if
	a function is variadic or not. This will benefit a few
	backends, and is mandatory for the hard float arm abi.
	The rework was already planned for quite some time, to
	be able to use a variable stack framesize, and for leaf
	functions optimization where applicable.
	The change will be source compatible, but will change
	some internals, and jit_code_t values, as some new will
	be added.
	The only behavior change is that, jit_arg_register_p may
	change return value on hard float arm abi, if called before
	or after jit_ellipsis. Common sense anyway, would say to
	make that call after jit_ellipsis, but documentation
	should be updated for it.
2015-05-24 14:44:04 -03:00
pcpa
316dfc6e5e aarch64: Correct va_list offsets and double load.
* lib/jit_aarch64-fpu.c, lib/jit_aarch64.c: Correct base
	aarch64 varargs code.
2015-05-24 14:34:16 -03:00
pcpa
97f69a9c9c Correct make check for systems without gcc.
* check/lightning.c: Clearly run check if clang is the system
	compiler.
2015-05-24 13:50:58 -03:00
Paulo Andrade
d6a5a90d5a alpha: Save correct offset if loading a vararg double. 2015-05-20 23:19:16 -03:00
pcpa
bd38cfa9c9 sparc: Add initial jit_va_ calls to sparc
* lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c, lib/jit_sparc.c:
	Add base support to jit vararg functions to the sparc backend.
2015-05-20 14:33:31 -03:00
pcpa
9a90a28360 alpha: Add initial jit_va_ calls to alpha
* lib/jit_alpha-cpu.c, lib/jit_alpha-fpu.c, lib/jit_alpha.c:
	Add base support to jit vararg functions to the alpha backend.
2015-05-20 13:09:22 -03:00
pcpa
fdd55b903a hppa: Add initial jit_va_ calls to hppa
* lib/jit_hppa-cpu.c, lib/jit_hppa-fpu.c, lib/jit_hppa.c:
	Add base support to jit vararg functions to the hppa backend.
2015-05-19 19:39:28 -03:00
Paulo Andrade
6d8f8eb604 ia64: Add initial jit_va_ calls to ia64
* lib/jit_ia64-cpu.c, lib/jit_ia64-fpu.c, lib/jit_ia64.c:
	Add base support to jit vararg functions to the ia64 backend.
2015-05-10 19:35:40 -03:00