Skip to content

Commit baee0d8

Browse files
Packagise compiler/souce/iasm*.d (dlang#21394)
1 parent bc73f6e commit baee0d8

7 files changed

Lines changed: 28 additions & 18 deletions

File tree

compiler/src/build.d

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,7 +1558,7 @@ auto sourceFiles()
15581558
}
15591559
DmdSources dmd = {
15601560
glue: fileArray(env["D"], "
1561-
dmsc.d e2ir.d iasmdmd.d iasmaarch64.d glue.d objc_glue.d
1561+
dmsc.d e2ir.d iasm/dmdx86.d iasm/dmdaarch64.d glue.d objc_glue.d
15621562
s2ir.d tocsym.d toctype.d tocvdebug.d todt.d toir.d toobj.d
15631563
"),
15641564
driver: fileArray(env["D"], "dinifile.d dmdparams.d gluelayer.d lib/package.d lib/elf.d lib/mach.d lib/mscoff.d
@@ -1570,13 +1570,14 @@ auto sourceFiles()
15701570
cli.d clone.d compiler.d cond.d constfold.d cpreprocess.d ctfeexpr.d
15711571
ctorflow.d dcast.d dclass.d declaration.d delegatize.d denum.d deps.d dimport.d
15721572
dinterpret.d dmacro.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d dsymbolsem.d
1573-
dtemplate.d dtoh.d dversion.d enumsem.d escape.d expression.d expressionsem.d func.d funcsem.d hdrgen.d iasm.d iasmgcc.d
1573+
dtemplate.d dtoh.d dversion.d enumsem.d escape.d expression.d expressionsem.d func.d funcsem.d hdrgen.d
15741574
impcnvtab.d imphint.d importc.d init.d initsem.d inline.d inlinecost.d intrange.d json.d lambdacomp.d
15751575
mtype.d mustuse.d nogc.d nspace.d ob.d objc.d opover.d optimize.d
15761576
parse.d pragmasem.d printast.d rootobject.d safe.d
15771577
semantic2.d semantic3.d sideeffect.d statement.d
15781578
statementsem.d staticassert.d staticcond.d stmtstate.d target.d templatesem.d templateparamsem.d traits.d
15791579
typesem.d typinf.d utils.d
1580+
iasm/package.d iasm/gcc.d
15801581
mangle/package.d mangle/basic.d mangle/cpp.d mangle/cppwin.d
15811582
visitor/package.d visitor/foreachvar.d visitor/parsetime.d visitor/permissive.d visitor/postorder.d visitor/statement_rewrite_walker.d
15821583
visitor/strict.d visitor/transitive.d

compiler/src/dmd/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ Note that these groups have no strict meaning, the category assignments are a bi
170170

171171
| File | Purpose |
172172
|-------------------------------------------------------------------------|-------------------------------------------|
173-
| [iasm.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasm.d) | Inline assembly depending on the compiler |
174-
| [iasmdmd.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasmdmd.d) | Inline assembly for DMD X86_64 |
175-
| [iasmaarch64.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasmaarch64.d) | Inline assembly for DMD AArch64 |
176-
| [iasmgcc.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasmgcc.d) | Inline assembly for GDC |
173+
| [iasm/package.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasm/package.d) | Inline assembly depending on the compiler |
174+
| [iasm/dmdx86.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasm/dmd.d) | Inline assembly for DMD X86_64 |
175+
| [iasm/dmdaarch64.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasm/aarch64.d) | Inline assembly for DMD AArch64 |
176+
| [iasm/gcc.d](https://github.com/dlang/dmd/blob/master/compiler/src/dmd/iasm/gcc.d) | Inline assembly for GDC |
177177

178178
**Other**
179179

compiler/src/dmd/cxxfrontend.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,14 +395,14 @@ void asmSemantic(CAsmDeclaration d, Scope* sc)
395395
*/
396396
Statement gccAsmSemantic(GccAsmStatement s, Scope* sc)
397397
{
398-
import dmd.iasmgcc;
399-
return dmd.iasmgcc.gccAsmSemantic(s, sc);
398+
import dmd.iasm.gcc;
399+
return dmd.iasm.gcc.gccAsmSemantic(s, sc);
400400
}
401401

402402
void gccAsmSemantic(CAsmDeclaration d, Scope* sc)
403403
{
404-
import dmd.iasmgcc;
405-
return dmd.iasmgcc.gccAsmSemantic(d, sc);
404+
import dmd.iasm.gcc;
405+
return dmd.iasm.gcc.gccAsmSemantic(d, sc);
406406
}
407407

408408
/***********************************************************
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/iasmaarch64.d
1111
*/
1212

13-
module dmd.iasmaarch64;
13+
module dmd.iasm.dmdaarch64;
1414

1515
import core.stdc.stdio;
1616
import core.stdc.stdarg;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/iasmdmd.d
1212
*/
1313

14-
module dmd.iasmdmd;
14+
module dmd.iasm.dmdx86;
1515

1616
import core.stdc.stdio;
1717
import core.stdc.stdarg;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Coverage: https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/iasmgcc.d
1010
*/
1111

12-
module dmd.iasmgcc;
12+
module dmd.iasm.gcc;
1313

1414
import core.stdc.string;
1515

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,24 @@ version (NoBackend)
3030
}
3131
else version (IN_GCC)
3232
{
33-
import dmd.iasmgcc;
33+
version = Asm_GCC;
34+
}
35+
else version (IN_LLVM)
36+
{
37+
version = Asm_GCC;
3438
}
3539
else
3640
{
37-
import dmd.iasmdmd;
38-
import dmd.iasmaarch64;
41+
import dmd.iasm.dmdx86;
42+
import dmd.iasm.dmdaarch64;
3943
version = MARS;
4044
}
4145

46+
version (Asm_GCC)
47+
{
48+
import dmd.iasm.gcc;
49+
}
50+
4251
/************************ AsmStatement ***************************************/
4352

4453
Statement asmSemantic(AsmStatement s, Scope* sc)
@@ -79,7 +88,7 @@ Statement asmSemantic(AsmStatement s, Scope* sc)
7988
? inlineAsmAArch64Semantic(ias, sc)
8089
: inlineAsmSemantic(ias, sc); // X86_64
8190
}
82-
else version (IN_GCC)
91+
else version (Asm_GCC)
8392
{
8493
auto eas = new GccAsmStatement(s.loc, s.tokens);
8594
return gccAsmSemantic(eas, sc);
@@ -98,7 +107,7 @@ void asmSemantic(CAsmDeclaration ad, Scope* sc)
98107
version (NoBackend)
99108
{
100109
}
101-
else version (IN_GCC)
110+
else version (Asm_GCC)
102111
{
103112
return gccAsmSemantic(ad, sc);
104113
}

0 commit comments

Comments
 (0)