[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lightning] Floating point branches
From: |
Paolo Bonzini |
Subject: |
Re: [Lightning] Floating point branches |
Date: |
Tue, 17 Feb 2009 09:54:34 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (Macintosh/20081209) |
Mike Spivey wrote:
> I encountered three problems with floating point branches on i386 with
> the GIT version of lightning. The patches shown below seem to work for
> me, but I haven't made extensive tests.
Great, thanks. I attach what I applied.
Paolo
diff --git a/ChangeLog b/ChangeLog
index bda065e..a842218 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-17 Paolo Bonzini <address@hidden>
+
+ * lightning/fp-common.h: Define double branches if missing.
+ * lightning/i386/asm.h: Define JC and JNC mnemonics.
+ * lightning/i386/fp-32.h: Fix jit_fp_btest. All reported
+ by Mike Spivey.
+
2008-10-09 Paolo Bonzini <address@hidden>
* lightning/ppc/funcs.h (jit_flush_code): Subtract 1 from end.
diff --git a/THANKS b/THANKS
index 0276167..fe8ad1e 100644
--- a/THANKS
+++ b/THANKS
@@ -5,6 +5,7 @@ Eli Barzilay <address@hidden>
Ludovic Courtes <address@hidden>
Matthew Flatt <address@hidden>
Laurent Michel <address@hidden>
+Mike Spivey <address@hidden>
Basile Starynkevitch <address@hidden>
Sam Steingold <address@hidden>
Jens Troeger <address@hidden>
diff --git a/doc/version.texi b/doc/version.texi
index bbcbdc5..a763770 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
address@hidden UPDATED 9 January 2008
address@hidden UPDATED-MONTH January 2008
address@hidden UPDATED 13 June 2008
address@hidden UPDATED-MONTH June 2008
@set EDITION 1.2c
@set VERSION 1.2c
diff --git a/lightning/fp-common.h b/lightning/fp-common.h
index d65d160..0847ceb 100644
--- a/lightning/fp-common.h
+++ b/lightning/fp-common.h
@@ -85,6 +85,23 @@
#define jit_retval_f(rs) jit_retval_d(rs)
#endif
+#ifndef jit_beqr_f
+#define jit_beqr_f(lab, a, b) jit_beqr_d(lab, a, b)
+#define jit_bner_f(lab, a, b) jit_bner_d(lab, a, b)
+#define jit_bgtr_f(lab, a, b) jit_bgtr_d(lab, a, b)
+#define jit_bger_f(lab, a, b) jit_bger_d(lab, a, b)
+#define jit_bltr_f(lab, a, b) jit_bltr_d(lab, a, b)
+#define jit_bler_f(lab, a, b) jit_bler_d(lab, a, b)
+#define jit_buneqr_f(lab, a, b) jit_buneqr_d(lab, a, b)
+#define jit_bltgtr_f(lab, a, b) jit_bltgtr_d(lab, a, b)
+#define jit_bungtr_f(lab, a, b) jit_bungtr_d(lab, a, b)
+#define jit_bunger_f(lab, a, b) jit_bunger_d(lab, a, b)
+#define jit_bunltr_f(lab, a, b) jit_bunltr_d(lab, a, b)
+#define jit_bunler_f(lab, a, b) jit_bunler_d(lab, a, b)
+#define jit_bordr_f(lab, a, b) jit_bordr_d(lab, a, b)
+#define jit_bunordr_f(lab, a, b) jit_bunordr_d(lab, a, b)
+#endif
+
#ifndef jit_retval_f
#define jit_retval_f(op1) jit_movr_f((op1), JIT_FPRET)
#endif
diff --git a/lightning/i386/asm.h b/lightning/i386/asm.h
index ad404fc..2dec4b9 100644
--- a/lightning/i386/asm.h
+++ b/lightning/i386/asm.h
@@ -915,8 +915,10 @@ enum {
#define JOSm(D) JCCSim(0x0, D)
#define JNOSm(D) JCCSim(0x1, D)
#define JBSm(D) JCCSim(0x2, D)
+#define JCSm(D) JCCSim(0x2, D)
#define JNAESm(D) JCCSim(0x2, D)
#define JNBSm(D) JCCSim(0x3, D)
+#define JNCSm(D) JCCSim(0x3, D)
#define JAESm(D) JCCSim(0x3, D)
#define JESm(D) JCCSim(0x4, D)
#define JZSm(D) JCCSim(0x4, D)
@@ -946,8 +948,10 @@ enum {
#define JOm(D) JCCim(0x0, D)
#define JNOm(D) JCCim(0x1, D)
#define JBm(D) JCCim(0x2, D)
+#define JCm(D) JCCim(0x2, D)
#define JNAEm(D) JCCim(0x2, D)
#define JNBm(D) JCCim(0x3, D)
+#define JNCm(D) JCCim(0x3, D)
#define JAEm(D) JCCim(0x3, D)
#define JEm(D) JCCim(0x4, D)
#define JZm(D) JCCim(0x4, D)
diff --git a/lightning/i386/fp-32.h b/lightning/i386/fp-32.h
index ff59631..71e5677 100644
--- a/lightning/i386/fp-32.h
+++ b/lightning/i386/fp-32.h
@@ -261,7 +261,7 @@ union jit_double_imm {
((_and) ? ANDLir ((_and), _EAX) : 0), \
((cmp) ? CMPLir ((cmp), _AL) : 0), \
POPLr(_EAX), \
- res ((d), 0, 0, 0), \
+ res ((d)), \
_jit.x.ppc)
#define jit_nothing_needed(x)