1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-20 18:50: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

@ -1348,7 +1348,7 @@ _andi(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1, jit_word_t i0)
reg = jit_get_reg(jit_class_gpr);
movi(rn(reg), i0);
iandr(r0, rn(reg));
jit_unget_reg(r0);
jit_unget_reg(reg);
}
}
else {
@ -1856,7 +1856,7 @@ _movcr_u(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1)
{
rex(0, 1, r0, _NOREG, r1);
ic(0x0f);
ic(0xbe);
ic(0xb6);
mrm(0x03, r7(r0), r7(r1));
}