diff gen/asm-x86-64.h @ 1053:11e28922ac76

Always pass an address expression (not a var expression) to asm operands of type Arg_Memory. This fixes the following code: {{{ void f(real x) { asm { fld x[RBP]; } } void g(int x) { asm { mov EAX, x[RBP]; } } }}}
author Frits van Bommel <fvbommel wxs.nl>
date Sun, 08 Mar 2009 00:57:58 +0100
parents 16e2c750c857
children 8bc277ef23a5
line wrap: on
line diff
--- a/gen/asm-x86-64.h	Sat Mar 07 19:38:00 2009 +0100
+++ b/gen/asm-x86-64.h	Sun Mar 08 00:57:58 2009 +0100
@@ -2144,11 +2144,8 @@
                                           ( ( operand->baseReg == Reg_ESP || ( operand->baseReg == Reg_RSP ) ) && ! sc->func->naked ) ) )
                                 {
 
-                                    if ( mode == Mode_Output )
-                                    {
-                                        e = new AddrExp ( 0, e );
-                                        e->type = decl->type->pointerTo();
-                                    }
+                                    e = new AddrExp ( 0, e );
+                                    e->type = decl->type->pointerTo();
 
 #if !IN_LLVM
                                     /* DMD uses the same frame offsets for naked functions. */