mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-19 06:13:14 +01:00
Fixed bug #349 , now emits error.
This commit is contained in:
@@ -1555,7 +1555,13 @@ namespace AsmParserx8632
|
||||
}
|
||||
void addOperand2 ( const char * fmtpre, const char * fmtpost, AsmArgType type, Expression * e, AsmCode * asmcode, AsmArgMode mode = Mode_Input )
|
||||
{
|
||||
assert ( !sc->func->naked );
|
||||
if ( sc->func->naked )
|
||||
{
|
||||
// taken from above
|
||||
stmt->error ( "only global variables can be referenced by identifier in naked asm" );
|
||||
return;
|
||||
}
|
||||
|
||||
insnTemplate << fmtpre
|
||||
<< "<<" << (mode==Mode_Input ? "in" : "out") << ">>"
|
||||
<< fmtpost;
|
||||
|
||||
@@ -1676,7 +1676,13 @@ namespace AsmParserx8664
|
||||
}
|
||||
void addOperand2 ( const char * fmtpre, const char * fmtpost, AsmArgType type, Expression * e, AsmCode * asmcode, AsmArgMode mode = Mode_Input )
|
||||
{
|
||||
assert ( !sc->func->naked );
|
||||
if ( sc->func->naked )
|
||||
{
|
||||
// taken from above
|
||||
stmt->error ( "only global variables can be referenced by identifier in naked asm" );
|
||||
return;
|
||||
}
|
||||
|
||||
insnTemplate << fmtpre
|
||||
<< "<<" << (mode==Mode_Input ? "in" : "out") << ">>"
|
||||
<< fmtpost;
|
||||
|
||||
Reference in New Issue
Block a user