mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 20:30:28 +02:00
Implement the qmul and qdiv instructions.
2013-02-04 Paulo Andrade <pcpa@gnu.org> * include/lightning.h, include/lightning/jit_private.h, lib/jit_arm-cpu.c, lib/jit_arm.c, lib/jit_mips-cpu.c, lib/jit_mips.c, lib/jit_ppc-cpu.c, lib/jit_ppc.c, lib/jit_x86-cpu.c, lib/jit_x86.c, lib/lightning.c: Implement the new qmul and qdiv instructions that return signed and unsigned lo/hi multiplication result and div/rem division result. These should be useful for jit translation of code that needs to know if a multiplication overflows (no branch opcode added) or if a division is exact (easy check if remainder is zero). * check/lightning.c, lib/jit_print.c, check/Makefile.am, check/all.tst: Update for the new qmul and qdiv instructions. * check/qalu.inc, check/qalu_div.ok, check/qalu_div.tst, check/qalu_mul.ok, check/qalu_mul.tst: New files implementing simple test cases for qmul and qdiv.
This commit is contained in:
parent
708cca9465
commit
d91b25d1be
22 changed files with 1073 additions and 95 deletions
|
@ -103,6 +103,7 @@
|
|||
#define jit_cc_a0_reg 0x00000001 /* arg0 is a register */
|
||||
#define jit_cc_a0_chg 0x00000002 /* arg0 is modified */
|
||||
#define jit_cc_a0_jmp 0x00000004 /* arg0 is a jump target */
|
||||
#define jit_cc_a0_rlh 0x00000008 /* arg0 is a register pair */
|
||||
#define jit_cc_a0_int 0x00000010 /* arg0 is immediate word */
|
||||
#define jit_cc_a0_flt 0x00000020 /* arg0 is immediate float */
|
||||
#define jit_cc_a0_dbl 0x00000040 /* arg0 is immediate double */
|
||||
|
@ -170,13 +171,13 @@ typedef struct jit_data_info jit_data_info_t;
|
|||
union jit_data {
|
||||
struct {
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
jit_int32_t l;
|
||||
jit_int32_t h;
|
||||
jit_int32_t l;
|
||||
jit_int32_t h;
|
||||
#else
|
||||
jit_int32_t h;
|
||||
jit_int32_t l;
|
||||
jit_int32_t h;
|
||||
jit_int32_t l;
|
||||
#endif
|
||||
} pair;
|
||||
} q;
|
||||
jit_word_t w;
|
||||
jit_float32_t f;
|
||||
jit_float64_t d;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue