aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd/iasmgcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/dmd/iasmgcc.c')
-rw-r--r--gcc/d/dmd/iasmgcc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/d/dmd/iasmgcc.c b/gcc/d/dmd/iasmgcc.c
index 5cc9025..e3940a8 100644
--- a/gcc/d/dmd/iasmgcc.c
+++ b/gcc/d/dmd/iasmgcc.c
@@ -1,6 +1,6 @@
/* Compiler implementation of the D programming language
- * Copyright (C) 2018-2020 by The D Language Foundation, All Rights Reserved
+ * Copyright (C) 2018-2021 by The D Language Foundation, All Rights Reserved
* written by Iain Buclaw
* http://www.digitalmars.com
* Distributed under the Boost Software License, Version 1.0.
@@ -12,14 +12,12 @@
*/
#include "scope.h"
+#include "expression.h"
#include "declaration.h"
#include "errors.h"
#include "parse.h"
#include "statement.h"
-Expression *semantic(Expression *e, Scope *sc);
-Statement *semantic(Statement *s, Scope *sc);
-
/***********************************
* Parse list of extended asm input or output operands.
* Grammar:
@@ -321,7 +319,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
s->stc = sc->stc;
// Fold the instruction template string.
- s->insn = semantic(s->insn, sc);
+ s->insn = expressionSemantic(s->insn, sc);
s->insn = s->insn->ctfeInterpret();
if (s->insn->op != TOKstring || ((StringExp *) s->insn)->sz != 1)
@@ -336,7 +334,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
for (size_t i = 0; i < s->args->length; i++)
{
Expression *e = (*s->args)[i];
- e = semantic(e, sc);
+ e = expressionSemantic(e, sc);
// Check argument is a valid lvalue/rvalue.
if (i < s->outputargs)
e = e->modifiableLvalue(sc, NULL);
@@ -345,7 +343,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
(*s->args)[i] = e;
e = (*s->constraints)[i];
- e = semantic(e, sc);
+ e = expressionSemantic(e, sc);
assert(e->op == TOKstring && ((StringExp *) e)->sz == 1);
(*s->constraints)[i] = e;
}
@@ -357,7 +355,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
for (size_t i = 0; i < s->clobbers->length; i++)
{
Expression *e = (*s->clobbers)[i];
- e = semantic(e, sc);
+ e = expressionSemantic(e, sc);
assert(e->op == TOKstring && ((StringExp *) e)->sz == 1);
(*s->clobbers)[i] = e;
}
@@ -373,7 +371,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
if (!s->gotos)
s->gotos = new GotoStatements();
s->gotos->push(gs);
- semantic(gs, sc);
+ statementSemantic(gs, sc);
}
}