]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/d/dmd/iasm.c
2 /* Compiler implementation of the D programming language
3 * Copyright (C) 2018-2020 by The D Language Foundation, All Rights Reserved
4 * written by Walter Bright
5 * http://www.digitalmars.com
6 * Distributed under the Boost Software License, Version 1.0.
7 * http://www.boost.org/LICENSE_1_0.txt
8 * https://github.com/D-Programming-Language/dmd/blob/master/src/iasm.c
11 /* Inline assembler for the D programming language compiler
15 #include "declaration.h"
16 #include "statement.h"
19 Statement
*gccAsmSemantic(GccAsmStatement
*s
, Scope
*sc
);
21 Statement
*inlineAsmSemantic(InlineAsmStatement
*s
, Scope
*sc
);
24 Statement
*asmSemantic(AsmStatement
*s
, Scope
*sc
)
26 //printf("AsmStatement::semantic()\n");
28 FuncDeclaration
*fd
= sc
->parent
->isFuncDeclaration();
34 // Assume assembler code takes care of setting the return value
35 sc
->func
->hasReturnExp
|= 8;
38 GccAsmStatement
*eas
= new GccAsmStatement(s
->loc
, s
->tokens
);
39 return gccAsmSemantic(eas
, sc
);
41 InlineAsmStatement
*ias
= new InlineAsmStatement(s
->loc
, s
->tokens
);
42 return inlineAsmSemantic(ias
, sc
);