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

10 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
a15f261afc Update copyright date 2015-04-26 14:33:41 -03:00
pcpa
73e520767f Remove inconsistent, public jit_arg_reg_p macro
* include/lightning/jit_aarch64.h,
	include/lightning/jit_alpha.h,
	include/lightning/jit_arm.h,
	include/lightning/jit_hppa.h,
	include/lightning/jit_mips.h,
	 include/lightning/jit_ppc.h,
	include/lightning/jit_s390.h,
	include/lightning/jit_sparc.h,
	include/lightning/jit_x86.h,
	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_s390.c,
	lib/jit_sparc.c, lib/jit_x86.c: Remove jit_arg_reg_p and
	jit_arg_f_reg_p from a public header, and define it only
	on port specific files where an integer offset is used
	to qualify an argument identifier. Exported code expects
	an opaque pointer (but of jit_node_t* type) to "qualify"
	an argument identifier.
	This patch, and the code review/simplification done during
	it also corrected some bugs:
	o Inconsistent jit_arg_d value of double argument after 3
	  integer arguments in arm for jit_functions; tested, C
	  functions were being properly called.
	o Inconsistent use of getarg_{f,d} and putarg*_{f,d} on
	  s390 (32-bit) that happened to not have a proper test
	  case, as it would only happen for jit functions, and
	  tested, called C functions had proper arguments.
	o Corrected a "last minute" correction that did not go
	  to the committed version, and would not compile on hppa,
	  due to bad _jit_putargi_d prototype definition.
2015-01-17 17:31:09 -02:00
pcpa
abf1b6e678 Do not export private definitions and types.
* include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
	include/lightning/jit_hppa.h, include/lightning/jit_ia64.h,
	include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
	include/lightning/jit_private.h, include/lightning/jit_s390x.h,
	include/lightning/jit_sparc.h, include/lightning/jit_x86.h:
	Do not add jit_regset_t, JIT_RA0, and JIT_FA0 to the installed
	header file. These types and definitions are supposed to be
	only used internally.
2014-04-09 14:46:30 -03:00
pcpa
6e75c0352d Rewrite jit_regset_scan1 for easier optimization.
* include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
	include/lightning/jit_hppa.h, include/lightning/jit_ia64.h,
	include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
	include/lightning/jit_s390x.h, include/lightning/jit_sparc.h,
	include/lightning/jit_x86.h: Change jit_regset_t to an
	unsigned type, to allow safe right shift.

	* lib/lightning.c: Rewrite jit_regset_scan1 to allow easier
	compiler optimization.
2014-02-19 14:38:14 -03:00
pcpa
a62f405751 Add the jit_callee_save_p interface and extra register definitions.
* check/self.c, check/self.ok: New files implementing simple
	consistency check assertions. At first validating some macros
	that use values from different sources agree.

	* check/Makefile.am: Update for the new test case.

	* include/lightning.h,  lib/lightning.c: Add the new
	jit_callee_save_p() call, that is intended to be used when
	writing complex code using lightning, so that one does not
	need to verify what backend is being used, or have access to
	private data, to query if a register is callee save or not;
	on several backends the scratch registers are actually callee
	save.

	* include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
	include/lightning/jit_hppa.h, include/lightning/jit_mips.h,
	include/lightning/jit_ppc.h, include/lightning/jit_sparc.h,
	include/lightning/jit_x86.h: Add an explicit definition for
	JIT_R3-JIT_Rn, JIT_V3-JIT_Vn and JIT_F6-JIT_Fn when applicable.
	This allows one to write code based on "#if defined(JIT_XN)"
	and therefore, not need to check what is the current backend
	or have access to private data structures. This is particularly
	useful when writing virtual machines with several specialized,
	global registers.

	* lib/jit_ia64.c: Properly flag the callee save general
	purpose registers as such, so that jit_callee_save_p() works
	as intended.
2013-09-10 21:41:49 -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