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

Correct qmul and qdiv in ppc.

* lib/jit_ppc-cpu.c, lib/jit_ppc.c: Validate and correct
	problems in the qmul and qdiv ppc implementation.
This commit is contained in:
pcpa 2013-02-05 14:06:41 -02:00
parent d91b25d1be
commit 7b2c9cfb2a
3 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2013-02-05 Paulo Andrade <pcpa@gnu.org>
* lib/jit_ppc-cpu.c, lib/jit_ppc.c: Validate and correct
problems in the qmul and qdiv ppc implementation.
2013-02-04 Paulo Andrade <pcpa@gnu.org>
* include/lightning.h, include/lightning/jit_private.h,

View file

@ -903,12 +903,12 @@ _iqmulr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1,
else
MULLW(r0, r2, r3);
if (sign)
MULLH(r1, r2, r3);
MULHW(r1, r2, r3);
else
MULLHU(r1, r2, r3);
MULHWU(r1, r2, r3);
if (r0 == r2 || r0 == r3) {
movr(r0, rn(reg));
reg = jit_unget_reg(reg);
jit_unget_reg(reg);
}
}
@ -967,8 +967,8 @@ _iqdivr(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1,
divr(rg0, r2, r3);
else
divr_u(rg0, r2, r3);
mulr(rg1, r2, r0);
subr(rg1, r2, r0);
mulr(rg1, r3, rg0);
subr(rg1, r2, rg1);
if (rg0 != r0) {
movr(r0, rg0);
jit_unget_reg(sv0);

View file

@ -723,7 +723,7 @@ _emit_code(jit_state_t *_jit)
name##r##type(rn(node->u.w), \
rn(node->v.w), rn(node->w.w)); \
break
#define case_rrr(name, type) \
#define case_rrrr(name, type) \
case jit_code_##name##r##type: \
name##r##type(rn(node->u.q.l), rn(node->u.q.h), \
rn(node->v.w), rn(node->w.w)); \