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

6 commits

Author SHA1 Message Date
pcpa
af92c5adfe Correct build and pass all tests on Solaris Sparc.
* lib/jit_sparc-cpu.c: Correct compiler warning of value
	used before assignment. The usage is bogus as the api
	requires always patching jumps, but the random value used
	could cause an assertion due to invalid displacement.

	* lib/jit_sparc.c: Always load and store double arguments
	in stack as 2 float loads or stores, for safety, as unaligned
	access is not allowed in Sparc Solaris.
2013-06-18 22:54:29 -03:00
pcpa
7bdd22bd99 Make it simpler to add support for more than 64 registers.
* include/lightning/jit_private.h, lib/jit_arm.c,
	lib/jit_mips-cpu.c, lib/jit_mips.c, lib/jit_ppc-cpu.c,
	lib/jit_ppc.c, lib/jit_print.c, lib/jit_sparc-cpu.c,
	lib/jit_sparc.c, lib/jit_x86-cpu.c, lib/jit_x86.c,
	lib/lightning.c: Change all jit_regset macros to take
	a pointer argument, to avoid structure copies when
	adding a port to an architecture with more than 64
	registers.
2013-04-10 15:07:01 -03:00
pcpa
9afca85921 Rework to better describe what is used only during jit generation.
* include/lightning/jit_private.h, lib/jit_arm-cpu.c,
	lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips-cpu.c,
	lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc-cpu.c,
	lib/jit_ppc.c, lib/jit_print.c, lib/jit_sparc-cpu.c,
	lib/jit_sparc.c, lib/jit_x86-cpu.c, lib/jit_x86.c,
	lib/lightning.c: Add an extra structure for data storage
	during jit generation, and release it after generating
	jit, to reduce a bit memory usage, and also to make it
	easier to understand what data is available during
	jit runtime.
2013-03-06 16:49:26 -03:00
pcpa
e6a14a61eb Finish sparc port.
* check/lightning.c: Remove state flag to work with partial
	sparc port, by just disassembling if there was incomplete
	code generation.

	* jit_sparc-cpu.c: Correct wrong range check for immediate
	integer constants (off by one bit shift).
	  Correct macro implementing equivalent "rd %y, rd" assembly.
	  Implement qmul* and qdiv*.

	* jit_sparc.c: Update for qmul* and qdiv* and remove logic
	to handle incomplete code generation during sparc port.
2013-02-19 17:28:38 -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