mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 03:30:22 +02:00
Update code to build and pass test cases in the arm port.
* configure.ac, include/lightning/jit_private.h, lib/jit_arm-cpu.c, lib/jit_arm-swf.c, lib/jit_arm.c, check/Makefile.am: Correct implementation of the arm backend port to build and pass the current test cases. Tested on armv7 with softfp abi. * lib/jit_disasm.c: Rename and change prototype of static disassemble function as in the arm backend it is required to access state information stored in the jit_state_t object. * check/3to2.tst, check/add.tst: Correct test case code assuming JIT_RO and JIT_RET are the same, and even if they are the same, the logic was incorrect because it must always call jit_retval* to fetch a function call return before any other instruction. The arm backend hash a special condition if jit_retval is not called, because "r0" is not JIT_R0, but is JIT_RET and *also* the first argument for a called function, so JIT_RET must be only used as an argument to jit_retval. * TODO: New file listing important tasks to be resolved.
This commit is contained in:
parent
712877a5a4
commit
1c9088beca
11 changed files with 119 additions and 52 deletions
|
@ -22,9 +22,10 @@ test_double_##a##_##b##_##c: \
|
|||
pushargi_d x \
|
||||
pushargi_d y \
|
||||
finishi test_double_##a##_##b##_##c \
|
||||
retval_d %f0 \
|
||||
prepare 1 \
|
||||
pushargi dfmt \
|
||||
pushargr_d %fret \
|
||||
pushargr_d %f0 \
|
||||
finishi @printf
|
||||
|
||||
#define def_test_int(a, b, c) \
|
||||
|
@ -42,9 +43,10 @@ test_int_##a##_##b##_##c: \
|
|||
pushargi x \
|
||||
pushargi y \
|
||||
finishi test_int_##a##_##b##_##c \
|
||||
retval %r0 \
|
||||
prepare 1 \
|
||||
pushargi ifmt \
|
||||
pushargr %ret \
|
||||
pushargr %r0 \
|
||||
finishi @printf
|
||||
|
||||
def_test_double(f0, f0, f0)
|
||||
|
|
|
@ -16,7 +16,7 @@ AM_CFLAGS = -I$(top_srcdir)/include -D_GNU_SOURCE
|
|||
|
||||
check_PROGRAMS = lightning
|
||||
|
||||
lightning_LDADD = $(top_builddir)/lib/liblightning.la -ldl
|
||||
lightning_LDADD = $(top_builddir)/lib/liblightning.la -lm -ldl
|
||||
|
||||
$(top_builddir)/lib/liblightning.la:
|
||||
cd $(top_builddir)/lib; $(MAKE) $(AM_MAKEFLAGS) liblightning.la
|
||||
|
|
|
@ -21,6 +21,7 @@ main:
|
|||
pushargi 5
|
||||
pushargi 4
|
||||
finishi test
|
||||
retval %r0
|
||||
prepare 1
|
||||
pushargi fmt
|
||||
pushargi 5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue