wingo pushed a commit to branch lightning
in repository guile.
commit 1e9000649cf1ff66570092f217837a793e48ee4d
Author: Laurent Michel <[email protected]>
Date: Tue Jun 10 16:46:50 2008 -0700
fix jit_replace8 for case when one of the operands is _EAX.
2008-06-10 Laurent Michel <[email protected]>
* lightning/i386/core-i386.h: Fix jit_replace8 for
case when one of the operands is _EAX.
---
ChangeLog | 5 +++++
lightning/i386/core-i386.h | 12 ++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 675d9ba..16890e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-10 Laurent Michel <[email protected]>
+
+ * lightning/i386/core-i386.h: Fix jit_replace8 for
+ case when one of the operands is _EAX.
+
2008-05-19 Paolo Bonzini <[email protected]>
* tests/run-test: Avoid CRLF issues on mingw.
diff --git a/lightning/i386/core-i386.h b/lightning/i386/core-i386.h
index dec15fb..b57f9a5 100644
--- a/lightning/i386/core-i386.h
+++ b/lightning/i386/core-i386.h
@@ -69,10 +69,14 @@
(rs == forced) ? op : (jit_pushr_i(forced), MOVLrr(rs, forced), op,
jit_popr_i(forced)))
/* For LT, LE, ... */
-#define jit_replace8(d, cmp, op) \
- (jit_check8(d) \
- ? (XORLrr(d, d), (cmp), op(_rN(d) | _AL))
\
- : (jit_pushr_i(_EAX), XORLrr(_EAX, _EAX), (cmp), op(_AL),
MOVLrr(_EAX, (d)), jit_popr_i(_EAX)))
+#define jit_replace8(d, cmp, op) \
+ (jit_check8(d) \
+ ? ((cmp), \
+ MOVLir(0, (d)), \
+ op(_rN(d) | _AL)) \
+ : (jit_pushr_i(_EAX), (cmp), \
+ MOVLir(0, _EAX), \
+ op(_AL), MOVLrr(_EAX, (d)), jit_popr_i(_EAX)))
#define jit_bool_r(d, s1, s2, op) \
(jit_replace8(d, CMPLrr(s2, s1), op))