diff --git a/gen/asm-x86-32.h b/gen/asm-x86-32.h index b6fc2a3e..75afc559 100644 --- a/gen/asm-x86-32.h +++ b/gen/asm-x86-32.h @@ -1869,7 +1869,7 @@ namespace AsmParserx8632 // 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,} diff --git a/gen/asm-x86-64.h b/gen/asm-x86-64.h index 6a4e8abf..b7c14584 100644 --- a/gen/asm-x86-64.h +++ b/gen/asm-x86-64.h @@ -1995,7 +1995,7 @@ namespace AsmParserx8664 // 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,}