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

62 commits

Author SHA1 Message Date
Andy Wingo
ab0d17286a Add floating-point reg/reg compare-and-branch tests 2019-03-26 14:43:53 +01:00
Andy Wingo
5a740b9add Add more integer reg/reg branch-and-compare tests 2019-03-26 14:36:33 +01:00
Andy Wingo
52a9ab856d Add bltr test
Also rework how relocs are represented.
2019-03-26 14:21:00 +01:00
Andy Wingo
787305eae5 Tweak test build to run faster, and adapt CI 2019-03-26 12:32:08 +01:00
Andy Wingo
c5c2b6f518 Add stxi tests 2019-03-26 12:18:46 +01:00
Andy Wingo
552e51ace7 Add stxr tests 2019-03-26 12:18:42 +01:00
Andy Wingo
ee2c6ab806 Add sti tests 2019-03-26 12:03:24 +01:00
Andy Wingo
4fe296b1df Add str tests 2019-03-26 12:00:10 +01:00
Andy Wingo
6f9bbe72c7 Add ldxi tests 2019-03-26 11:34:35 +01:00
Andy Wingo
d917dc2147 Add ldxr tests 2019-03-26 11:24:31 +01:00
Andy Wingo
c6067dd8cb Add ldi tests 2019-03-26 11:16:17 +01:00
Andy Wingo
afd32134f0 Add ldr tests 2019-03-26 11:07:44 +01:00
Andy Wingo
1808239ec8 Add bswap tests, and fix missing breaks in jit_load_args 2019-03-26 10:47:22 +01:00
Andy Wingo
082a629f62 Add extr tests 2019-03-26 10:29:31 +01:00
Andy Wingo
3acf10280b Add mov_addr test 2019-03-26 10:11:12 +01:00
Andy Wingo
ae1394831c Rework naming of test suite files 2019-03-26 10:02:30 +01:00
Andy Wingo
a20146777d Add comr/negr tests 2019-03-26 09:58:33 +01:00
Andy Wingo
7393651653 Add lsh/rsh tests 2019-03-26 09:49:16 +01:00
Andy Wingo
6a6da4a8a5 Add bitops tests 2019-03-26 09:33:40 +01:00
Andy Wingo
0127664fb3 Add remr tests 2019-03-26 09:17:49 +01:00
Andy Wingo
8e0102564a Add more div tests 2019-03-26 09:10:19 +01:00
Andy Wingo
b371e913ff Tests for some div operations 2019-03-25 21:11:44 +01:00
Andy Wingo
56d8f8d6f0 Add more tests 2019-03-25 21:02:24 +01:00
Andy Wingo
823387114a Add new tests 2019-03-25 20:38:23 +01:00
Andy Wingo
f0cecc45d4 Convert tests to jit_load_args 2019-03-25 15:24:40 +01:00
Andy Wingo
df0a5d738f Better loading of args to registers; add tests 2019-03-25 15:08:05 +01:00
Andy Wingo
021f31f1dc Add "addi" test 2019-03-25 12:31:51 +01:00
Andy Wingo
bad7e34c83 Implementation of new design
Documentation to come, as tests get added and things settle down.
2019-03-25 12:21:23 +01:00
pcpa
7a1c455237 Big merge with new lightning semantics aiming for lightning 2.0.
2012-12-02 Paulo Andrade <pcpa@gnu.org>

	* tests/Makefile.am, tests/3to2.c, tests/3to2.ok, tests/add.c,
	tests/add.ok, tests/allocai.c, tests/allocai.ok, tests/bp.c,
	tests/bp.ok, tests/divi.c, tests/divi.ok, tests/fib.c, tests/fib.ok,
	tests/fibdelay.c, tests/fibdelay.ok, tests/fibit.c, tests/fibit.ok,
	tests/funcfp.c, tests/funcfp.ok, tests/incr.c, tests/incr.ok,
	tests/ldst.c, tests/ldst.ok, tests/ldxi.c, tests/ldxi.ok,
	tests/modi.c, tests/modi.ok, tests/movi.c, tests/movi.ok,
	tests/printf.c, tests/printf.ok, tests/printf2.c, tests/printf2.ok,
	tests/ret.c, tests/ret.ok, tests/rpn.c, tests/rpn.ok, tests/rpnfp.c,
	tests/rpnfp.ok, tests/sete.c, tests/sete.ok, tests/testfp.c,
	tests/testfp.ok, tests-run-test: Removed previous test suite, in
	favor of a newer one in the check subdirectory.

	* check/3to2.ok, check/3to2.tst, check/add.ok, check/add.tst,
	check/allocai.ok, check/allocai.tst, check/bp.ok, check/bp.tst,
	check/divi.ok, check/divi.tst, check/fib.ok, check/fib.tst:
	New sample input for the new test program, loosely matching
	several of the previous test cases.

	* check/Makefile.am: New test suite makefile.

	* check/check.sh, check/run-test: New wrapper files for the
	new test suite.

	* check/lightning.c: New file. The main driver of the new test
	suite, that compiles to a parser of a very simple assembly like
	language, generates jit and executes it.

	* check/all.tst: New file. A generic debug and sample test file
	with a directive to prevent it from being executed, and useful to
	read disassembly of all possible instructions, using a fixed set
	of registers.

	* include/Makefile.am, include/lightning.h,
	include/lightning/Makefile.am, include/lightning/jit_arm.h,
	include/lightning/jit_mips.h, include/lightning/jit_ppc.h,
	include/lightning/jit_private.h, include/lightning/jit_x86.h,
	lib/Makefile.am, lib/jit_disasm.c, lib/jit_print.c,
	lib/jit_x86-cpu.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c,
	lib/jit_x86.c, lib/lightning.c: New files. These files are
	written from scratch, only by <pcpa@gnu.org>, and have now
	copyright assignment to the FSF. This is the core of the new
	lightning rework. Previously it was integrated in code with
	a garbage collector and several custom types like vectors and
	hash tables, so this first code merge with lightning converts
	that code into a library extracting only the jit bits, and at
	first only for x86_64 GNU/Linux.

	* lightning.h, m4/lightning.m4: Removed. These are no longer
	required in the new lightning code.

	.gitignore, Makefile.am, configure.ac: Update for the new
	lightning code.
2012-12-02 19:44:36 -02:00
pcpa
7d3321d696 Cleanup on preparation for lightning rework.
2012-12-01 Paulo Andrade <pcpa@gnu.org>

	* opcode/Makefile.am, opcode/Makefile.in, opcode/ansidecl.h,
	opcode/bfd.h, opcode/dis-asm.h, opcode/dis-buf.c, opcode/disass.c,
	opcode/i386-dis.c, opcode/i386.h, opcode/ppc-dis.c, opcode/ppc-opc.c,
	opcode/ppc.h, opcode/sparc-dis.c, opcode/sparc-opc.c, opcode/sparc.h,
	opcode/sysdep.h: Removed. Do not bundle GNU binutils files.

	* aclocal.m4, configure, Makefile.in, config.h.in, doc/Makefile.in,
	lightning/Makefile.in, tests/Makefile.in: Removed. Do not maintain
	autogenerated files that also generate too much diff noise when
	regenerated in git.

	* build-aux/help2man, build-aux/texinfo.tex, build-aux/texi2dvi:
	Removed. Buildenvironment must have an up to date version from
	upstream installed.

	* build-aux/config.guess, build-aux/config.sub, build-aux/depcomp,
	build-aux/install-sh build-aux/mdate-sh build-aux/missing: Removed.
	Do not maintain a copy of automake files in git. Release tarballs
	must use an up to date version.

	* lightningize.in, doc/lightningize.1: Removed. Do not encourage
	bundling lightning in other packages. It should use a system package
	or a proper thirdy part subdirectory.

	* INSTALL: Removed. Autoreconf removes it and creates a symlink
	when regenerating files, so, avoid conflicts in git and let
	automake create the symlink.

	* .gitignore: Add INSTALL and autogenerated files.

	* configure.ac, Makefile.am: Update for removal of opcode subdir,
	auto generated files and lightningize.

	* tests/Makefile.am, tests/3to2.c, tests/add.c, tests/bp.c,
	tests/fib.c, tests/fibdelay.c, tests/fibit.c, tests/funcfp.c,
	tests/incr.c, tests/printf.c, tests/rpn.c, tests/rpnfp.c,
	tests/sete.c, tests/testfp.c: Update for removal of opcode subdir.

	* doc/Makefile.am: Update for removal of lightningize.

	* configure.ac, lightning/ppc/funcs.h, lightning/sparc/funcs.h,
	lightning/i386/fp.h, lightning/i386/core.h, lightning/i386/asm.h,
	tests/3to2.c, tests/add.c, tests/bp.c, tests/fib.c, tests/fibdelay.c,
	tests/fibit.c, tests/funcfp.c, tests/incr.c, tests/printf.c,
	tests/rpn.c, tests/rpnfp.c, tests/sete.c, tests/testfp.c:
	Remove LIGHTNING_CROSS, it is half supported and incomplete.

	* tests/3to2.c, tests/funcfp.c, tests/rpnfp.c: Remove preprocessor
	check on JIT_FPR. If no hardware registers are available, the backend
	must provide an alternative for software float.

	* lightning/ppc/core.h, lightning/sparc/core.h, tests/Makefile.am:
	Remove JIT_NEED_PUSH_POP. It is absolutely not trivial to implement
	properly on some backends due to stack alignment constraints, and
	whenever it is required, using jit_allocai and using a properly
	aligned stack vector, or a heap buffer, is better.

	* tests/push-pop.c, tests/push-pop.ok: Removed due to
	JIT_NEED_PUSH_POP no longer available.
2012-12-01 17:52:59 -02:00
Paolo Bonzini
e19b41c9f0 ldst test update
2010-08-15  Paolo Bonzini  <bonzini@gnu.org>

	* tests/ldst.c: Update.
	* tests/Makefile.am: Use -ffloat-store to compile it.
2010-08-15 06:41:42 -04:00
Paolo Bonzini
5ea118e8a9 add ldst test
2010-07-28  Paolo Bonzini  <bonzini@gnu.org>

	* tests/Makefile.am: Add ldst test.
	* tests/Makefile.in: Regenerate.
	* tests/ldst.c: New.
	* tests/ldst.ok: New.
2010-07-28 23:29:24 +02:00
Paolo Bonzini
21ece8cdcd always set and replace lightning_frag
2010-07-19  Paolo Bonzini  <bonzini@gnu.org>

	* build-aux/lightning.m4: Always set and replace lightning_frag.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* doc/lightningize.1: Regenerate.
	* doc/version.texi: Regenerate.
	* lightning/Makefile.in: Regenerate.
	* opcode/Makefile.in: Regenerate.
	* tests/Makefile.in: Regenerate.
2010-07-19 14:40:08 +02:00
Paolo Bonzini
5ab8cddd61 avoid CRLF issues on mingw
2008-05-19  Paolo Bonzini  <bonzini@gnu.org>

	* tests/run-test: Avoid CRLF issues on mingw.
2008-05-19 10:58:41 +02:00
Paolo Bonzini
3a199529db warning patrol (allocai.c, ppc)
2008-03-15  Paolo Bonzini  <bonzini@gnu.org>

	* lightning/ppc/core.h: Avoid some "value computed is not used"
	warnings.
	* lightning/ppc/funcs.h: Remove unused variables.
	* lightnings/tests/allocai.c: Silence other warnings.
2008-03-17 09:10:57 +01:00
Paolo Bonzini
950b2cefe9 fix i386 floating-point sub(a,0,a)
2008-01-05  Paolo Bonzini  <bonzini@gnu.org>

	* lightning/i386/fp-32.h: Fix sub(a,0,a).
	* lightning/tests/3to2.c: Add new testcases.
	* lightning/tests/3to2.ok: Add new testcases.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-61
2008-01-09 15:52:44 +01:00
Paolo Bonzini
329b8a8a68 add 3to2 test and fix bug
2008-01-02  Paolo Bonzini  <bonzini@gnu.org>

	* lightning/i386/fp-32.h: Fix sub(a,b,a) with a ~= JIT_FPR0.
	* lightning/tests/3to2.c: New.
	* lightning/tests/3to2.ok: New.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-58
2008-01-09 15:52:30 +01:00
Paolo Bonzini
d0d493b417 improve set* encoding for i386, add testcase
2007-08-12  Paolo Bonzini  <bonzini@gnu.org>

	* lightning/i386/core-i386.h: Improve encoding of set* instructions.
	* lightning/i386/core-64.h: Fix jit_bra_l.
	* tests/sete.c: New.
	* tests/sete.ok: New.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-56
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-60
2008-01-09 15:50:14 +01:00
Paolo Bonzini
1551f5a787 switch to GPLv3
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-55
2008-01-09 15:50:13 +01:00
Paolo Bonzini
3a04a40aae merge some bugfixes, give right meaning to jit_retval_[fd]
2006-11-22  Paolo Bonzini  <bonzini@gnu.org>

	* lightning/i386/asm-i386.h: Move x86-64 instructions...
	* lightning/i386/asm-64.h: ... here.
	* lightning/i386/fp-32.h: Fix bugfixes worked around in froofyJIT.
	Add JIT_FPRET.
	* lightning/sparc/fp.h: Likewise.
	* lightning/ppc/fp.h: Likewise.
	* lightning/fp-common.h: Adjust for JIT_FPRET.
	* tests/funcfp.c: Adjust for JIT_FPRET.
	* tests/rpnfp.c: Adjust for JIT_FPRET.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-47
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-48
2008-01-09 15:50:05 +01:00
Paolo Bonzini
c1725c9320 x86-64 now passes test suite
2006-11-20  Paolo Bonzini  <bonzini@gnu.org>

	* lightning/i386/core-i386.h: Move jit_movip, jit_check8, jit_reg8,
	jit_reg16, jit_movbrm...
	* lightning/i386/core-32.h: ... here.
	* lightning/i386/core-64.h: Redefine them.  Fix other bugs.

	* tests/printf.c: Do not do a varargs call.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-44
2008-01-09 15:50:01 +01:00
Paolo Bonzini
2534af6d2d checkin rewrite of i386 assembler
2006-11-20  Paolo Bonzini  <bonzini@gnu.org>

	* lightning/i386/asm-i386.h: Check in rewrite from aranym.
	* lightning/i386/asm-32.h: Adjust.
	* lightning/i386/asm-64.h: Adjust.
	* lightning/i386/fp-32.h: Adjust.

	* lightning/i386/core-32.h: Adjust.  Add jit_{ld,ldx,st,stx}i*.
	* lightning/i386/core-64.h: Adjust.  Add jit_{ld,ldx,st,stx}i*.
	* lightning/i386/core-i386.h: Adjust. Remove these patterns.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-43
2008-01-09 15:50:00 +01:00
Paolo Bonzini
24794b0e83 add JIT_NEED_PUSH_POP and merge correct implementation of push/pop for SPARC
2006-11-20  Paolo Bonzini  <bonzini@gnu.org>
	    Ludovic Courtes  <ludo@chbouib.org>

	* lightning/i386/core-32.h: Disable jit_push and jit_pop if stack not needed.
	* lightning/i386/core-64.h: Disable jit_push and jit_pop if stack not needed.
	* lightning/sparc/core.h: Merge final implementation of jit_pushr and jit_popr.
	* lightning/ppc/core.h: Fix implementation of jit_pushr and jit_popr to
	work (more or less) across function calls.

	* tests/push-pop.c, tests/push-pop.ok: New test.
	* tests/Makefile.am: Run it.

Patches applied:

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-32
   Added missing SPARC changes from lightning@sv.gnu.org/lightning--stable--1.2--patch-10.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-33
   SPARC: Fixed pushr/popr using %l7 to hold the pushed register offset.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-34
   tests/push-pop.c: define `JIT_NEED_PUSH_POP'.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-40
2008-01-09 15:49:57 +01:00
Paolo Bonzini
197d20aa96 fix x86-64 builds
git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-39
2008-01-09 15:49:55 +01:00
Paolo Bonzini
82d90f4ddc remove pushr/popr from testsuite
2006-11-04  Paolo Bonzini  <bonzini@gnu.org>

	* tests/rpn.c: Remove pushr/popr.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-37
2008-01-09 15:49:53 +01:00
Paolo Bonzini
be415cc6a5 finish jit_allocai implementation
2006-11-04  Paolo Bonzini  <bonzini@gnu.org>

	* lightning/ppc/core.h: Implement jit_allocai, define JIT_FP to be R1.
	* lightning/ppc/funcs.h: Store frame size into _jitl.  Store R1 before
	the STMW, so that the offset is unchanged when we patch the STMW.
	* lightning/i386/core.h: Define JIT_FP to be EBP.
	* lightning/i386/core-32.h: Implement jit_allocai, put LEAVE in the
	epilog if jit_allocai was used.
	* lightning/i386/core-64.h: Implement jit_allocai, put LEAVE in the
	epilog if jit_allocai was used.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-36
2008-01-09 15:49:52 +01:00
Paolo Bonzini
4290adb33a add jit_allocai for SPARC
Patches applied:

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-28
   Implemented `jit_allocai' for SPARC.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-29
   tests/allocai.c: New test case.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-30
   Fixed `_d22 ()' on SPARC (fixes "displacement too large" errors).

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-35
2008-01-09 15:49:51 +01:00
Paolo Bonzini
e2cb4af6aa added ret test and clarified JIT_RET documentation
Patches applied:

 * lcourtes@laas.fr--2005-libre/lightning--sparc-fixes--1.2--base-0
   tag of lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-18

 * lcourtes@laas.fr--2005-libre/lightning--sparc-fixes--1.2--patch-1
   tests/push-pop.c: Use more `pushr's.

 * lcourtes@laas.fr--2005-libre/lightning--sparc-fixes--1.2--patch-3
   Added a test for `JIT_RET' (fails on SPARC).

 * lcourtes@laas.fr--2005-libre/lightning--sparc-fixes--1.2--patch-4
   Fixed use of `JIT_RET': Move %o0 into %i0 after `calli' and `callr'.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-19
   Merge from `sparc-fixes': Fixed `pushr' and `popr', fixed `JIT_RET'.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-20
   Undoed `lightning--sparc-fixes--1.2--patch-4' (about `JIT_RET') which was wrong.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-21
   tests/ret.c: Use `jit_retval_i' to copy the function's return value.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-22
   Doc: Clarified the use of `JIT_RET' and documented `jit_retval'.

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-32
2008-01-09 15:49:47 +01:00
Paolo Bonzini
147efb8d90 cherrypick from ludovic courtes
2006-10-31  Paolo Bonzini  <bonzini@gnu.org>
	    Ludovic Courtes  <ludo@chbouib.org>

	* tests/divi.c, tests/divi.ok, tests/movi.c, tests/movi.ok: New.
	* tests/ldxi.c: Ensure large pointer is generated.
	* tests/Makefile.am: Point to new tests.
	* lightning.h: Include funcs-common.h before funcs.h.
	* lightning/sparc/core.h: Fix bugs in modi/divi.

Patches applied:

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-11
   Fixed a typo in `lightning/sparc/core.h'.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-12
   SPARC: Fixed `jit_immsize' (untested!).

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-13
   Added a `divi' test case (does not catch the bug fixed by the previous patch).

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-14
   `divi' test case: Return non-zero on failure.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-15
   `ldxi.c' (test case): Make sure we use a large pointer operand.

 * lcourtes@laas.fr--2005-libre/lightning--stable--1.2--patch-16
   Added a `movi' test case (for `jit_movi_p' with large operands).

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-31
2008-01-09 15:49:46 +01:00
Paolo Bonzini
1f7feaffe2 first merge of x86-64 backend and related configury changes
Patches applied:

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--base-0
   tag of bonzini@gnu.org--2004b/lightning--stable--1.2--patch-28

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-1
   start merging from mzscheme...

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-2
   fix i386

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-3
   fix distribution hiccups

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-4
   adapt for usage outside distribution.

 * bonzini@gnu.org--2004b/lightning--x86-64--1.3--patch-6
   fixes for GNU Smalltalk

git-archimport-id: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-30
2008-01-09 15:49:45 +01:00