[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 183/437: Correct qmul and qdiv in ppc.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 183/437: Correct qmul and qdiv in ppc. |
Date: |
Mon, 2 Jul 2018 05:14:14 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 7b2c9cfb2a4a97716de71d2f83bc95e63bf6053b
Author: pcpa <address@hidden>
Date: Tue Feb 5 14:06:41 2013 -0200
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.
---
ChangeLog | 5 +++++
lib/jit_ppc-cpu.c | 10 +++++-----
lib/jit_ppc.c | 2 +-
3 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ee46e0b..85a6855 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-05 Paulo Andrade <address@hidden>
+
+ * 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 <address@hidden>
* include/lightning.h, include/lightning/jit_private.h,
diff --git a/lib/jit_ppc-cpu.c b/lib/jit_ppc-cpu.c
index 56bf56a..f593d41 100644
--- a/lib/jit_ppc-cpu.c
+++ b/lib/jit_ppc-cpu.c
@@ -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);
diff --git a/lib/jit_ppc.c b/lib/jit_ppc.c
index dafc36b..301c3fb 100644
--- a/lib/jit_ppc.c
+++ b/lib/jit_ppc.c
@@ -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)); \
- [Guile-commits] 368/437: Implement jit_allocar for dynamic stack allocation, (continued)
- [Guile-commits] 368/437: Implement jit_allocar for dynamic stack allocation, Andy Wingo, 2018/07/02
- [Guile-commits] 355/437: Update documentation on jit_frame and jit_tramp, Andy Wingo, 2018/07/02
- [Guile-commits] 323/437: misc: Make jit_note and related functions take a const argument, Andy Wingo, 2018/07/02
- [Guile-commits] 429/437: Remove disassembler support from lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 346/437: PPC: Build and pass all tests in powerpcle, Andy Wingo, 2018/07/02
- [Guile-commits] 180/437: Correct C sequence point problem., Andy Wingo, 2018/07/02
- [Guile-commits] 370/437: Add missing ellipsis in allocar.tst, Andy Wingo, 2018/07/02
- [Guile-commits] 337/437: Remove a wrong optimization of callee save registers, Andy Wingo, 2018/07/02
- [Guile-commits] 437/437: Wire up lightning into libguile build, Andy Wingo, 2018/07/02
- [Guile-commits] 362/437: Avoid problems if JIT_INSTR_MAX is miscalculated, Andy Wingo, 2018/07/02
- [Guile-commits] 183/437: Correct qmul and qdiv in ppc.,
Andy Wingo <=
- [Guile-commits] 235/437: Correct build on FreeBSD/amd64, Andy Wingo, 2018/07/02
- [Guile-commits] 240/437: Correct wrong test and update of arm thumb offset information., Andy Wingo, 2018/07/02
- [Guile-commits] 215/437: Add functional hppa port. All tests pass., Andy Wingo, 2018/07/02
- [Guile-commits] 369/437: Correct typo in x87.nodata test list, Andy Wingo, 2018/07/02
- [Guile-commits] 307/437: x86: Build and pass all tests on 32 bit cygwin, Andy Wingo, 2018/07/02
- [Guile-commits] 401/437: Implement a correct generation of Fibonacci numbers., Andy Wingo, 2018/07/02
- [Guile-commits] 318/437: Add label predicates, Andy Wingo, 2018/07/02
- [Guile-commits] 373/437: Update copyright date, Andy Wingo, 2018/07/02
- [Guile-commits] 403/437: Correct wrong movr simplification, Andy Wingo, 2018/07/02
- [Guile-commits] 324/437: misc: Enable silent rules to make warnings stick out, Andy Wingo, 2018/07/02