Mercurial > projects > ldc
comparison gen/asm-x86-64.h @ 1563:b0a691de8cc7
Fixed bug #349 , now emits error.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Sun, 02 Aug 2009 17:56:30 +0200 |
parents | a0114765fe34 |
children | 3a08f5e2553b |
comparison
equal
deleted
inserted
replaced
1562:95d710d405e3 | 1563:b0a691de8cc7 |
---|---|
1674 asmcode->args.push_back ( AsmArg ( type, e, mode ) ); | 1674 asmcode->args.push_back ( AsmArg ( type, e, mode ) ); |
1675 } | 1675 } |
1676 } | 1676 } |
1677 void addOperand2 ( const char * fmtpre, const char * fmtpost, AsmArgType type, Expression * e, AsmCode * asmcode, AsmArgMode mode = Mode_Input ) | 1677 void addOperand2 ( const char * fmtpre, const char * fmtpost, AsmArgType type, Expression * e, AsmCode * asmcode, AsmArgMode mode = Mode_Input ) |
1678 { | 1678 { |
1679 assert ( !sc->func->naked ); | 1679 if ( sc->func->naked ) |
1680 { | |
1681 // taken from above | |
1682 stmt->error ( "only global variables can be referenced by identifier in naked asm" ); | |
1683 return; | |
1684 } | |
1685 | |
1680 insnTemplate << fmtpre | 1686 insnTemplate << fmtpre |
1681 << "<<" << (mode==Mode_Input ? "in" : "out") << ">>" | 1687 << "<<" << (mode==Mode_Input ? "in" : "out") << ">>" |
1682 << fmtpost; | 1688 << fmtpost; |
1683 asmcode->args.push_back ( AsmArg ( type, e, mode ) ); | 1689 asmcode->args.push_back ( AsmArg ( type, e, mode ) ); |
1684 } | 1690 } |