# HG changeset patch # User Christian Kamm # Date 1241628860 -7200 # Node ID c250e03d8a5bd5aff0caaa70d19b5de6170df287 # Parent a26b99b7e2931e8aa35d0c34ca02feb564f4a464 Make the no-operand versions of floating point inline asm instructions always pop the floating point stack - like dmd does. diff -r a26b99b7e293 -r c250e03d8a5b gen/asm-x86-32.h --- a/gen/asm-x86-32.h Wed May 06 18:08:44 2009 +0200 +++ b/gen/asm-x86-32.h Wed May 06 18:54:20 2009 +0200 @@ -1885,6 +1885,12 @@ insnTemplate.write(mnemonic, mlen-1) << tc_1 << type_char; } break; + + case Op_FMath0: + // the no-operand versions of floating point ops always pop + insnTemplate << mnemonic << "p"; + break; + default: // special case fdiv, fsub: see dmd 840, ldc 256 if (strncmp(mnemonic, "fsub", 4) == 0 || diff -r a26b99b7e293 -r c250e03d8a5b gen/asm-x86-64.h --- a/gen/asm-x86-64.h Wed May 06 18:08:44 2009 +0200 +++ b/gen/asm-x86-64.h Wed May 06 18:54:20 2009 +0200 @@ -2007,6 +2007,12 @@ insnTemplate.write(mnemonic, mlen-1) << tc_1 << type_char; } break; + + case Op_FMath0: + // the no-operand versions of floating point ops always pop + insnTemplate << mnemonic << "p"; + break; + default: // special case fdiv, fsub: see dmd 840, ldc 256 if (strncmp(mnemonic, "fsub", 4) == 0 ||