1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 16:50:21 +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:
pcpa 2012-12-03 14:27:27 -02:00
parent 712877a5a4
commit 1c9088beca
11 changed files with 119 additions and 52 deletions

View file

@ -261,10 +261,18 @@ struct jit_state {
# if DISASSEMBLER
struct {
jit_data_info_t *ptr;
it_word_t offset;
jit_word_t offset;
jit_word_t length;
} data_info; /* constant pools information */
# endif
/* Note that this field is somewhat hackish, but required by most
* ways to implement jit, unless implementing a pure one function
* per jit, as most times it needs to start the jit buffer with a
* jump where the "main" prolog starts, and because the initial
* code is in "arm mode", need to make an "arm mode" patch on that
* jump. A good example is the test suite assembler, where most
* test cases start with a "jmpi main" call. */
jit_uword_t thumb;
struct {
jit_uint8_t *data; /* pointer to code */
jit_word_t size; /* size data */