mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
Implement the new jit_set_data interface.
* include/lightning.h, include/lightning/jit_private.h, lib/lightning.c: Implement the new jit_set_data() interface, and the new jit_get_data() helper. Like jit_set_code(), jit_realize() should be called before jit_set_data(). The most common usage should be jit_set_data(JIT_DISABLE_DATA | JIT_DISABLE_NOTE), to force synthesize any float/double constant in the stack and not generate any debug information. * lib/jit_note.c: Minor change to debug note generation as now it uses an alternate temporary data buffer during constants and debug generation to accommodate the possibility of the user setting an alternate data buffer. * lib/jit_hppa-fpu.c, lib/jit_s390x.c, lib/jit_s390x-cpu.c, lib/jit_s390x-fpu.c, lib/jit_sparc.c, lib/jit_sparc-fpu.c, lib/jit_x86-sse.c, lib/jit_x86-x87.c: Implement jit_set_data. * lib/jit_hppa-sz.c, lib/jit_sparc-sz.c, lib/jit_x86-sz.c, lib/jit_s390x-sz.c: Update for several instructions that now have a different maximum length due to jit_set_data. * lib/jit_mips-fpu.c: Implement jit_set_data, but missing validation on n32 and n64 abis (and/or big endian). * lib/jit_mips-sz.c: Update for changes in o32. * lib/jit_ppc-fpu.c: Implement jit_set_data, but missing validation on Darwin PPC. * lib/jit_ppc-sz.c: Update for changes in powerpc 32 and 64 bit. * lib/jit_ia64-fpu.c: Implement untested jit_set_data. * TODO: Add note to list ports that were not tested for the new jit_set_data() feature, due to no longer having access to them. * check/nodata.c: New file implementing a simple test exercising several different conditions created by jit_set_data(). * check/check.nodata.sh: New file implementing a wrapper over the existing *.tst files, that runs all tests without using a data buffer for constants; only meaningful (and enabled) on architectures that used to store float/double constants on a read only data buffer. * configure.ac, check/Makefile.am: Update for the new test cases. * check/lightning.c: Implement the new "-d" option that sets an internal flag to call jit_set_data() disable constants and debug, that is, using only a pure code buffer.
This commit is contained in:
parent
79bc3d03dd
commit
33ee2337c7
28 changed files with 1103 additions and 470 deletions
|
@ -337,6 +337,7 @@ struct jit_compiler {
|
|||
jit_node_t *head;
|
||||
jit_node_t *tail;
|
||||
jit_uint32_t realize : 1; /* jit_realize() called? */
|
||||
jit_uint32_t dataset : 1; /* jit_dataset() called? */
|
||||
jit_uint32_t done : 1; /* emit state finished */
|
||||
jit_uint32_t emit : 1; /* emit state entered */
|
||||
jit_uint32_t again : 1; /* start over emiting function */
|
||||
|
@ -344,6 +345,8 @@ struct jit_compiler {
|
|||
#if DEBUG
|
||||
jit_uint32_t getreg : 1;
|
||||
#endif
|
||||
jit_uint32_t no_data : 1;
|
||||
jit_uint32_t no_note : 1;
|
||||
jit_int32_t reglen; /* number of registers */
|
||||
jit_regset_t regarg; /* cannot allocate */
|
||||
jit_regset_t regsav; /* automatic spill only once */
|
||||
|
@ -357,6 +360,7 @@ struct jit_compiler {
|
|||
jit_uint8_t *end;
|
||||
} code;
|
||||
struct {
|
||||
jit_uint8_t *ptr;
|
||||
jit_node_t **table; /* very simple hash table */
|
||||
jit_word_t size; /* number of vectors in table */
|
||||
jit_word_t count; /* number of hash table entries */
|
||||
|
@ -467,6 +471,7 @@ struct jit_state {
|
|||
jit_compiler_t *comp;
|
||||
/* Flags to know if user did set the code and data buffers */
|
||||
jit_uint32_t user_code : 1;
|
||||
jit_uint32_t user_data : 1;
|
||||
};
|
||||
|
||||
struct jit_register {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue