[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 360/437: Correct wrong check in simplify_stxi.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 360/437: Correct wrong check in simplify_stxi. |
Date: |
Mon, 2 Jul 2018 05:14:54 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 5724068b1c851e6bdd46143feb5586afffd8990a
Author: Paulo Andrade <address@hidden>
Date: Tue Feb 3 15:19:21 2015 -0200
Correct wrong check in simplify_stxi.
* lib/lightning.c: Correct wrong check in simplify_stxi.
The test was incorrectly comparing the target register
and the displacement offset. This was a time bomb bug,
that would trigger in code like:
stxi Im0 Rb0 Rt0
stxi Im1 Rb1 Rt1
if Rb0 == Rb1 && Rt0 == Rt1 && Im0 == Rt1, that is,
the wrong check was Im0 == Rt1, instead of the supposed
Im0 == Imm1 (that was what the code mean't to do). It
was removing the second stxi assuming it was redundantly
generated; as that is not uncommon pattern on
translators generating jit.
---
ChangeLog | 15 +++++++++++++++
lib/lightning.c | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index d352f0c..0f6530d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2015-02-03 Paulo Andrade <address@hidden>
+
+ * lib/lightning.c: Correct wrong check in simplify_stxi.
+ The test was incorrectly comparing the target register
+ and the displacement offset. This was a time bomb bug,
+ that would trigger in code like:
+ stxi Im0 Rb0 Rt0
+ stxi Im1 Rb1 Rt1
+ if Rb0 == Rb1 && Rt0 == Rt1 && Im0 == Rt1, that is,
+ the wrong check was Im0 == Rt1, instead of the supposed
+ Im0 == Imm1 (that was what the code mean't to do). It
+ was removing the second stxi assuming it was redundantly
+ generated; as that is not uncommon pattern on
+ translators generating jit.
+
2015-02-02 Paulo Andrade <address@hidden>
* configure.ac, include/lightning/jit_private.h,
diff --git a/lib/lightning.c b/lib/lightning.c
index b9173b7..d22a95c 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -2790,7 +2790,7 @@ _simplify_stxi(jit_state_t *_jit, jit_node_t *prev,
jit_node_t *node)
/* check for redundant store after load */
if (value->kind == jit_kind_code && value->code == node->code &&
value->base.q.l == right && value->base.q.h == _jitc->gen[right] &&
- node->w.w == value->disp.w) {
+ node->u.w == value->disp.w) {
del_node(prev, node);
return (1);
}
- [Guile-commits] 270/437: x86: Use aligned offset for x87 to/from sse move., (continued)
- [Guile-commits] 270/437: x86: Use aligned offset for x87 to/from sse move., Andy Wingo, 2018/07/02
- [Guile-commits] 302/437: Add info menu entry for lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 214/437: Remove remaining ia64 port debug code., Andy Wingo, 2018/07/02
- [Guile-commits] 331/437: mips: Do not make t9 available as a generic register, Andy Wingo, 2018/07/02
- [Guile-commits] 287/437: ARM: Do not leave early init_jit if /proc is not mounted., Andy Wingo, 2018/07/02
- [Guile-commits] 405/437: Add a second pass to compute live register ranges, Andy Wingo, 2018/07/02
- [Guile-commits] 300/437: Add consistency check on temporaries during a jump, Andy Wingo, 2018/07/02
- [Guile-commits] 276/437: Rewrite jit_regset_scan1 for easier optimization., Andy Wingo, 2018/07/02
- [Guile-commits] 268/437: Sync after regenerating version.texi., Andy Wingo, 2018/07/02
- [Guile-commits] 277/437: x86_64: Correct wrong inline assembly in jit_get_cpu, Andy Wingo, 2018/07/02
- [Guile-commits] 360/437: Correct wrong check in simplify_stxi.,
Andy Wingo <=
- [Guile-commits] 389/437: alpha: Save correct offset if loading a vararg double., Andy Wingo, 2018/07/02
- [Guile-commits] 380/437: ppc: Add initial jit_va_ calls to ppc, Andy Wingo, 2018/07/02
- [Guile-commits] 239/437: Avoid possible problem if built with gcc 4.8 or newer., Andy Wingo, 2018/07/02
- [Guile-commits] 347/437: S390: Add support for 32 bit., Andy Wingo, 2018/07/02
- [Guile-commits] 428/437: Further lightning integration work, Andy Wingo, 2018/07/02
- [Guile-commits] 420/437: Strip "get-jit-size" feature from lightning., Andy Wingo, 2018/07/02
- [Guile-commits] 434/437: Remove unused AM_CONDITIONAL statements from lightning configure, Andy Wingo, 2018/07/02
- [Guile-commits] 390/437: Correct make check for systems without gcc., Andy Wingo, 2018/07/02
- [Guile-commits] 388/437: sparc: Add initial jit_va_ calls to sparc, Andy Wingo, 2018/07/02
- [Guile-commits] 319/437: Properly handle jit_tramp and function descriptors, Andy Wingo, 2018/07/02