mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 19:20: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
|
@ -765,6 +765,9 @@ _jit_classify(jit_state_t *_jit, jit_code_t code)
|
|||
case jit_code_callr: case jit_code_jmpr:
|
||||
mask = jit_cc_a0_reg|jit_cc_a0_jmp;
|
||||
break;
|
||||
case jit_code_pushargr_f: case jit_code_pushargr_d:
|
||||
mask = jit_cc_a0_reg|jit_cc_a1_reg;
|
||||
break;
|
||||
case jit_code_retval_f: case jit_code_retval_d:
|
||||
mask = jit_cc_a0_reg|jit_cc_a0_chg;
|
||||
break;
|
||||
|
@ -774,10 +777,10 @@ _jit_classify(jit_state_t *_jit, jit_code_t code)
|
|||
case jit_code_ldi_d:
|
||||
mask = jit_cc_a0_reg|jit_cc_a0_chg|jit_cc_a1_int;
|
||||
break;
|
||||
case jit_code_movi_f:
|
||||
case jit_code_movi_f: case jit_code_pushargi_f:
|
||||
mask = jit_cc_a0_reg|jit_cc_a0_chg|jit_cc_a1_flt;
|
||||
break;
|
||||
case jit_code_movi_d:
|
||||
case jit_code_movi_d: case jit_code_pushargi_d:
|
||||
mask = jit_cc_a0_reg|jit_cc_a0_chg|jit_cc_a1_dbl;
|
||||
break;
|
||||
case jit_code_negr: case jit_code_comr: case jit_code_movr:
|
||||
|
@ -793,6 +796,7 @@ _jit_classify(jit_state_t *_jit, jit_code_t code)
|
|||
case jit_code_negr_d: case jit_code_absr_d: case jit_code_sqrtr_d:
|
||||
case jit_code_movr_d: case jit_code_extr_d: case jit_code_extr_f_d:
|
||||
case jit_code_ldr_d:
|
||||
case jit_code_getarg_f: case jit_code_getarg_d:
|
||||
mask = jit_cc_a0_reg|jit_cc_a0_chg|jit_cc_a1_reg;
|
||||
break;
|
||||
case jit_code_addi: case jit_code_addxi: case jit_code_addci:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue