changeset 1325:5a9dc345c70a

Yet another fdiv/fsub special case.
author Christian Kamm <kamm incasoftware de>
date Sat, 09 May 2009 20:13:05 +0200
parents b3674ad4026d
children a41a40deff73
files gen/asm-x86-32.h gen/asm-x86-64.h
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gen/asm-x86-32.h	Sat May 09 18:57:21 2009 +0200
+++ b/gen/asm-x86-32.h	Sat May 09 20:13:05 2009 +0200
@@ -1869,7 +1869,7 @@
                 // special case fdiv, fsub: see dmd 840, ldc 256
                 if ((strncmp(mnemonic, "fsub", 4) == 0 ||
                      strncmp(mnemonic, "fdiv", 4) == 0) && 
-                    operands[0].reg != Reg_ST)
+                    operands[0].reg != Reg_ST && op != Op_FMath)
                 {
                     // replace:
                     //   f{sub,div}r{p,} <-> f{sub,div}{p,}
--- a/gen/asm-x86-64.h	Sat May 09 18:57:21 2009 +0200
+++ b/gen/asm-x86-64.h	Sat May 09 20:13:05 2009 +0200
@@ -1995,7 +1995,7 @@
                 // special case fdiv, fsub: see dmd 840, ldc 256
                 if ((strncmp(mnemonic, "fsub", 4) == 0 ||
                      strncmp(mnemonic, "fdiv", 4) == 0) && 
-                    operands[0].reg != Reg_ST)
+                    operands[0].reg != Reg_ST && op != Op_FMath)
                 {
                     // replace:
                     //   f{sub,div}r{p,} <-> f{sub,div}{p,}