1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 00:30:21 +02:00

Add new test case for int/float to/from conversion.

* check/Makefile.am, check/cvt.ok, check/cvt.tst: Add new
	"cvt" test case to test conversion from/to int/float types.

	* check/lightning.c: Only define truncr_{f,d}_l in 64 bit mode.

	* include/lightning.h: Correct typo that caused it to define
	jit_truncr_{f,d}_l in 32 bit mode.

	* lib/jit_arm-cpu.c: Avoid assertion failure in the signed/unsigned
	extend opcodes generation as it shares an interface for 3 argument
	opcode generation.

	* lib/jit_x86-cpu.c: Correct wrong argument passed to
	jit_unget_reg in the andi implementation and wrong byte
	unsigned extend code generation.

	* lib/jit_x86-sse.c: Correct conversion from "word" to float or
	double as is dependent on wordsize.
This commit is contained in:
pcpa 2012-12-06 15:16:23 -02:00
parent e7e55966cb
commit d1c0bc8e98
9 changed files with 449 additions and 18 deletions

View file

@ -497,7 +497,7 @@ typedef enum {
#define jit_truncr_f_i(u,v) jit_new_node_ww(jit_code_truncr_f_i,u,v)
jit_code_truncr_f_i,
#if __WODSIZE == 32
#if __WORDSIZE == 32
# define jit_truncr_f(u,v) jit_truncr_f_i(u,v)
#else
# define jit_truncr_f(u,v) jit_truncr_f_l(u,v)
@ -642,14 +642,14 @@ typedef enum {
#define jit_truncr_d_i(u,v) jit_new_node_ww(jit_code_truncr_d_i,u,v)
jit_code_truncr_d_i,
#if __WODSIZE == 32
#if __WORDSIZE == 32
# define jit_truncr_d(u,v) jit_truncr_d_i(u,v)
#else
# define jit_truncr_d(u,v) jit_truncr_d_l(u,v)
# define jit_truncr_d_l(u,v) jit_new_node_ww(jit_code_truncr_d_l,u,v)
#endif
jit_code_truncr_d_l,
#define jit_extr_d(u,v) jit_new_node_ww(jit_code_extr_f,u,v)
#define jit_extr_d(u,v) jit_new_node_ww(jit_code_extr_d,u,v)
#define jit_extr_f_d(u,v) jit_new_node_ww(jit_code_extr_f_d,u,v)
jit_code_extr_d, jit_code_extr_f_d,
#define jit_movr_d(u,v) jit_new_node_ww(jit_code_movr_d,u,v)