Mercurial > projects > ldc
changeset 1303:c250e03d8a5b
Make the no-operand versions of floating point inline asm instructions always
pop the floating point stack - like dmd does.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Wed, 06 May 2009 18:54:20 +0200 |
parents | a26b99b7e293 |
children | b995c146366e |
files | gen/asm-x86-32.h gen/asm-x86-64.h |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 ||
--- 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 ||