diff --git a/gen/asmstmt.cpp b/gen/asmstmt.cpp index bca2f738..8555c84c 100644 --- a/gen/asmstmt.cpp +++ b/gen/asmstmt.cpp @@ -256,7 +256,7 @@ AsmStatement::toIR(IRState * irs) static std::string i_cns = "i"; static std::string p_cns = "p"; - static std::string m_cns = "m"; + static std::string m_cns = "*m"; static std::string mw_cns = "=*m"; static std::string mrw_cns = "+m"; static std::string memory_name = "memory"; diff --git a/gen/d-asm-i386.h b/gen/d-asm-i386.h index a14a87f9..cabf144b 100644 --- a/gen/d-asm-i386.h +++ b/gen/d-asm-i386.h @@ -1913,12 +1913,10 @@ struct AsmProcessor insnTemplate->writebyte('*'); use_star = false; } - if (mode == Mode_Output) - { - e = new AddrExp(0, e); - assert(decl); - e->type = decl->type->pointerTo(); - } + e = new AddrExp(0, e); + assert(decl); + e->type = decl->type->pointerTo(); + addOperand(fmt, Arg_Memory, e, asmcode, mode); } }