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

9 commits

Author SHA1 Message Date
pcpa
960280decd Implement the jit_rsb* interface.
* check/alu_rsb.ok, check/alu_rsb.tst: New files implementing
	tests for jit_rsb*.

	* check/Makefile.am, check/lightning.c, include/lightning.h,
	lib/jit_aarch64-cpu.c, lib/jit_aarch64-fpu.c, lib/jit_aarch64-sz.c,
	lib/jit_aarch64.c, lib/jit_alpha-cpu.c, lib/jit_alpha-fpu.c,
	lib/jit_alpha-sz.c, lib/jit_alpha.c, lib/jit_arm-cpu.c,
	lib/jit_arm-swf.c, lib/jit_arm-sz.c, lib/jit_arm-vfp.c,
	lib/jit_arm.c, lib/jit_hppa-cpu.c, lib/jit_hppa-fpu.c,
	lib/jit_hppa-sz.c, lib/jit_hppa.c, lib/jit_ia64-cpu.c,
	lib/jit_ia64-fpu.c, lib/jit_ia64-sz.c, lib/jit_ia64.c,
	lib/jit_mips-cpu.c, lib/jit_mips-fpu.c, lib/jit_mips-sz.c,
	lib/jit_mips.c, lib/jit_names.c, lib/jit_ppc-cpu.c,
	lib/jit_ppc-fpu.c, lib/jit_ppc-sz.c, lib/jit_ppc.c,
	lib/jit_s390x-cpu.c, lib/jit_s390x-fpu.c, lib/jit_s390x-sz.c,
	lib/jit_s390x.c, lib/jit_sparc-cpu.c, lib/jit_sparc-fpu.c,
	lib/jit_sparc-sz.c, lib/jit_sparc.c, lib/jit_x86-cpu.c,
	lib/jit_x86-sse.c, lib/jit_x86-sz.c, lib/jit_x86-x87.c,
	lib/jit_x86.c, lib/lightning.c: Implement jit_rsb*. This
	was a missing lightning 1.x interface, that on most
	backends is synthesized, but on a few backends (hppa and ia64),
	it can generate better code as on those there is, or the
	only instruction with an immediate is in "rsb" format
	(left operand).
2014-10-18 11:31:18 -03:00
pcpa
afae5407f6 Implement the jit_align interface
* lib/jit_aarch64-cpu.c, lib/jit_alpha-cpu.c, lib/jit_arm-cpu.c,
	lib/jit_hppa-cpu.c, lib/jit_mips-cpu.c, lib/jit_ppc-cpu.c,
	lib/jit_sparc-cpu.c: Implement or correct the internal
	nop(count) call that receives an argument that tells the
	modulo bytes to align the code for the next instruction.

	* include/lightning.h, lib/lightning.c, lib/jit_aarch64.c,
	lib/jit_alpha.c, lib/jit_arm.c, lib/jit_hppa.c, lib/jit_ia64.c,
	lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c,
	lib/jit_x86.c: Implement the new jit_align() call that receive
	an argument, that tells the modulo, in bytes, to align the
	next instruction. In most backends the only value that makes
	a difference is a value that matches sizeof(void*), as all
	other values usually are already automatically aligned in
	labels, but not guaranteed to be aligned at word size bytes.

	* check/align.ok, check/align.tst: New files, implementing
	a simple test for the new jit_align() interface.

	* check/Makefile.am, check/lightning.c, lib/jit_aarch64-sz.c,
	lib/jit_alpha-sz.c, lib/jit_arm-sz.c, lib/jit_hppa-sz.c,
	lib/jit_ia64-sz.c, lib/jit_mips-sz.c, lib/jit_ppc-sz.c,
	lib/jit_print.c, lib/jit_s390x-sz.c, lib/jit_sparc-sz.c,
	lib/jit_x86-sz.c: Update for the new jit_code_align code and
	the jit_align() interface.
2014-10-14 17:05:25 -03:00
pcpa
20a2f1f9c5 Allow jit_jmpi on an immediate constant address.
* lib/jit_aarch64.c, lib/jit_alpha.c, lib/jit_arm.c,
	lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_mips.c,
	lib/jit_ppc.c, lib/jit_s390x.c, lib/jit_sparc.c,
	lib/jit_x86.c, lib/lightning.c: Allow jit_jmpi on a
	target that is not a node. This may lead to hard to
	debug code generation, but is a required feature for
	certain generators, like the ones that used lightning
	1.2x. Note that previously, but not really well
	documented, it was instructed to use:
	jit_movi(rn, addr); jit_jmpr(rn);
	but now, plain:
	jit_patch_abs(jit_jmpi(), addr);
	should also work.
2014-10-14 17:04:13 -03:00
pcpa
b768fab8b1 Add code to calculate code buffer size based on devel time information.
* lib/jit_aarch64-sz.c, lib/jit_arm-sz.c, lib/jit_hppa-sz.c,
	lib/jit_ia64-sz.c, lib/jit_mips-sz.c, lib/jit_ppc-sz.c,
	lib/jit_s390x-sz.c, lib/jit_size.c, lib/jit_sparc-sz.c,
	lib/jit_x86-sz.c: New files implementing static tables
	with longest known instructions length generated to match
	a lightning instruction. These tables should make it easier
	to make it very unlikely to ever miscalculate, or by too
	much, the size of a code buffer.

	* lib/jit_size.c: New file that aids to either collect
	jit code size information, or use the information depending
	on build options.

	* size.c: New helper file that parses input for, and create
	an initial jit_$arch-sz.c file, that needs some minor edit
	for arches with multiple configurations.

	* configure.ac, Makefile.am: Add the new, devel mode only
	--enable-devel-get-jit-size configure option, that sets
	compile time flags to collect jit code size information,
	that will be used as input for the "noinst size program".

	* lib/jit_aarch64.c, lib/jit_arm.c, lib/jit_disasm.c,
	lib/jit_hppa.c, lib/jit_ia64.c, lib/jit_memory.c,
	lib/jit_mips.c, lib/jit_ppc.c, lib/jit_s390x.c,
	lib/jit_sparc.c, lib/jit_x86.c, lib/lightning.c: Minor
	changes for the --enable-devel-get-jit-size build mode,
	as well as the "production build mode" with jit code
	size information.
2013-09-24 03:31:54 -03:00
pcpa
b5763c42aa Correct license to properly advertise LGPLv3 and not GPLv3. 2013-08-11 18:08:52 -03:00
pcpa
c078a972b4 Cosmetic removal of white spaces in end of lines. 2013-08-10 11:38:43 -03:00
pcpa
443b7467c8 Remove redundancy in the hppa cache synchronization code.
* lib/jit_hppa.c: Sanitize the cache synchronization inline
	assembly code that was doing twice the work and redundantly
	flushing the end address every loop iteration.
2013-06-10 16:23:44 -03:00
pcpa
e82e5be448 Build and pass all test cases on a multiprocessor HP-UX.
* 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.
2013-06-09 18:31:50 -03:00
pcpa
3356b9d93a Add functional hppa port. All tests pass.
* include/lightning/jit_hppa.h, lib/jit_hppa-cpu.c,
	lib/jit_hppa-fpu.c, lib/jit_hppa.c: New files implementing
	the hppa port. Built on Debian Linux PA-RISC 2.0, 32 bit.

	* check/float.tst: Add preprocessor for hppa expected
	values when converting NaN and +-Inf to an integer.

	* check/ldst.inc: Ensure double load/store tests use an
	8 byte aligned address by default.

	* lib/lightning.c: Correct a bug found during tests in
	the new port, where qmul* and qdiv* were not properly
	setting one of the result registers as modified in the
	function, what would be a problem if the only "write"
	usage were the qmul* or qdiv*.

	* check/varargs.tst, check/varargs.ok: Add one extra
	interleaved integer/double test to validate proper code
	generation in the extra case.

	* check/lightning.c, configure.ac, include/lightning.h,
	include/lightning/Makefile.am,
	include/lightning/jit_private.h, lib/Makefile.am,
	lib/jit_disasm.c: Update for the hppa port.
2013-06-01 01:53:33 -03:00