mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 00:30:21 +02:00
Correct mips backend implementation to pass initial tests.
* include/lightning/jit_mips.h, lib/jit_mips-cpu.c, lib/jit_mips-fpu.c, lib/jit_mips.c: Correct float/double argument handling and make the mips backend pass the initial test cases. * include/lightning.h, ib/jit_print.c, lib/lightning.c: Add extra enum values for argument handling functions that could not be abstracted to the current codes, that is, when float values need to move from/to gpr from/to fpr. It would be more tempting to add such primitives, but they would have wordsize limitations, and it is not expected to add codes with one gpr argument for 64 bit and two for 32 bit. * lib/jit_ppc.c: Check _jit->function before calling jit_epilog() to avoid a runtime exception.
This commit is contained in:
parent
01be83d480
commit
760fab8d37
9 changed files with 201 additions and 51 deletions
|
@ -433,6 +433,7 @@ typedef enum {
|
|||
|
||||
#define jit_arg_f() _jit_arg_f(_jit)
|
||||
#define jit_getarg_f(u,v) _jit_getarg_f(_jit,u,v)
|
||||
jit_code_getarg_f,
|
||||
|
||||
#define jit_addr_f(u,v,w) jit_new_node_www(jit_code_addr_f,u,v,w)
|
||||
#define jit_addi_f(u,v,w) jit_new_node_wwf(jit_code_addi_f,u,v,w)
|
||||
|
@ -568,6 +569,7 @@ typedef enum {
|
|||
|
||||
#define jit_pushargr_f(u) _jit_pushargr_f(_jit,u)
|
||||
#define jit_pushargi_f(u) _jit_pushargi_f(_jit,u)
|
||||
jit_code_pushargr_f, jit_code_pushargi_f,
|
||||
#define jit_retr_f(u) _jit_retr_f(_jit,u)
|
||||
#define jit_reti_f(u) _jit_reti_f(_jit,u)
|
||||
#define jit_retval_f(u) _jit_retval_f(_jit,u)
|
||||
|
@ -575,6 +577,7 @@ typedef enum {
|
|||
|
||||
#define jit_arg_d() _jit_arg_d(_jit)
|
||||
#define jit_getarg_d(u,v) _jit_getarg_d(_jit,u,v)
|
||||
jit_code_getarg_d,
|
||||
|
||||
#define jit_addr_d(u,v,w) jit_new_node_www(jit_code_addr_d,u,v,w)
|
||||
#define jit_addi_d(u,v,w) jit_new_node_wwd(jit_code_addi_d,u,v,w)
|
||||
|
@ -711,6 +714,7 @@ typedef enum {
|
|||
|
||||
#define jit_pushargr_d(u) _jit_pushargr_d(_jit,u)
|
||||
#define jit_pushargi_d(u) _jit_pushargi_d(_jit,u)
|
||||
jit_code_pushargr_d, jit_code_pushargi_d,
|
||||
#define jit_retr_d(u) _jit_retr_d(_jit,u)
|
||||
#define jit_reti_d(u) _jit_reti_d(_jit,u)
|
||||
#define jit_retval_d(u) _jit_retval_d(_jit,u)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue