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

9 commits

Author SHA1 Message Date
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
pcpa
3fc2eb2f95 Update copyright year 2017-09-14 10:44:12 -04: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
a15f261afc Update copyright date 2015-04-26 14:33:41 -03:00
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
33ee2337c7 Implement the new jit_set_data interface.
* include/lightning.h, include/lightning/jit_private.h,
	lib/lightning.c: Implement the new jit_set_data() interface,
	and the new jit_get_data() helper. Like jit_set_code(),
	jit_realize() should be called before jit_set_data().
	The most common usage should be jit_set_data(JIT_DISABLE_DATA
	| JIT_DISABLE_NOTE), to force synthesize any float/double
	constant in the stack and not generate any debug information.

	* lib/jit_note.c: Minor change to debug note generation as
	now it uses an alternate temporary data buffer during constants
	and debug generation to accommodate the possibility of the user
	setting an alternate data buffer.

	* lib/jit_hppa-fpu.c, lib/jit_s390x.c, lib/jit_s390x-cpu.c,
	lib/jit_s390x-fpu.c, lib/jit_sparc.c, lib/jit_sparc-fpu.c,
	lib/jit_x86-sse.c, lib/jit_x86-x87.c: Implement jit_set_data.

	* lib/jit_hppa-sz.c, lib/jit_sparc-sz.c, lib/jit_x86-sz.c,
	lib/jit_s390x-sz.c: Update for several instructions that now
	have a different maximum length due to jit_set_data.

	* lib/jit_mips-fpu.c: Implement jit_set_data, but missing
	validation on n32 and n64 abis (and/or big endian).

	* lib/jit_mips-sz.c: Update for changes in o32.

	* lib/jit_ppc-fpu.c: Implement jit_set_data, but missing
	validation on Darwin PPC.

	* lib/jit_ppc-sz.c: Update for changes in powerpc 32 and
	64 bit.

	* lib/jit_ia64-fpu.c: Implement untested jit_set_data.

	* TODO: Add note to list ports that were not tested for the
	new jit_set_data() feature, due to no longer having access
	to them.

	* check/nodata.c: New file implementing a simple test exercising
	several different conditions created by jit_set_data().

	* check/check.nodata.sh: New file implementing a wrapper
	over the existing *.tst files, that runs all tests without
	using a data buffer for constants; only meaningful (and
	enabled) on architectures that used to store float/double
	constants on a read only data buffer.

	* configure.ac, check/Makefile.am: Update for the new test
	cases.

	* check/lightning.c: Implement the new "-d" option that
	sets an internal flag to call jit_set_data() disable
	constants and debug, that is, using only a pure code
	buffer.
2014-03-12 14:50:31 -03:00
pcpa
b5763c42aa Correct license to properly advertise LGPLv3 and not GPLv3. 2013-08-11 18:08:52 -03:00
pcpa
e304bc8bf9 Pass all but the (not yet implemented) qmul and qdiv tests in sparc
* check/float.tst: Add sparc to list of known NaN and +-Inf
	to integer conversion.

	* check/lightning.c: Define __sparc__ to preprocessor in
	the sparc backend.

	* include/lightning/jit_private.h: Correct wrong definition
	of emit_stxi_d, that has lived for a long time, but would
	cause problems whenever needing to spill/reload a float
	register.

	* include/lightning/jit_sparc.h: Can only use %g2,%g3,%g4
	for scratch variables, as other "global" registers are
	reserved for the system, e.g. libc.
	  Reorder float register naming to make it easier to
	access odd float registers, so that generating code for
	pusharg and getarg is easier for the IR.

	* lib/jit_mips-cpu.c, lib/jit_ppc-cpu.c: Update to match
	new code in jit_sparc-cpu.c. It must call jit_get_reg
	with jit_class_nospill if using the register to move
	an unconditional branch address to it, as the reload
	will not happen (actually could happen in the delay
	slot...)

	* lib/jit_sparc-cpu.c: Correct wrong macro definition for
	ldxr_s.
	  Properly implement div* and implement rem. Div* needs
	to use the y register, and rem* needs to be synthesized.
	  Correct b?sub* macro definitions.

	* lib/jit_sparc-fpu.c: Correct reversed float to/from double
	conversion.
	  Correct wrong jit_get_reg call asking for a gpr and then
	using the fpr with that number.
	  Correct wrong branch displacement computation for
	conditional branches.

	* lib/jit_sparc.c: Correct getarg_d and pushargi_d implementation.
	  Add rem* entries to the switch converting IR to machine code.

	* lib/lightning.c: Correct a problem detected when adding
	the jit_class_nospill flag to jit_get_reg, that was caused
	when having a branch to an "epilog" node, what would cause
	the code to think all registers in unknown state were live,
	while in truth, all registers in unknown state in the
	"just after return" point are actually dead.
2013-02-19 01:06:18 -03:00
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