Mercurial > projects > ddmd
diff dmd/backend/iasm.d @ 140:31c086f76669
dmd.lib now only contains the backend
backward references from the backend to the frontend are implemented in ddmd
win32_lib.mak is replaced by a patch
also fixed VisualD project file predefined versions
author | Trass3r |
---|---|
date | Tue, 14 Sep 2010 01:54:48 +0200 |
parents | af1bebfd96a4 |
children | 3900af2e73a0 |
line wrap: on
line diff
--- a/dmd/backend/iasm.d Tue Sep 14 01:13:58 2010 +0200 +++ b/dmd/backend/iasm.d Tue Sep 14 01:54:48 2010 +0200 @@ -36,6 +36,7 @@ import dmd.backend.Config; import dmd.backend.targ_types; import dmd.backend.elem; +import dmd.backend.block; import dmd.Util; import std.stdio : writef, writefln; @@ -4466,3 +4467,22 @@ (szReg[1] == 't' || szReg[1] == 'T')); } } + +extern(C) +{ + // backward reference from backend + + extern int refparam; + + /********************************** + * Return mask of registers used by block bp. + */ + regm_t iasm_regs(block *bp) + { + debug if (debuga) + printf("Block iasm regs = 0x%X\n", bp.usIasmregs); + + refparam |= bp.bIasmrefparam; + return bp.usIasmregs; + } +} \ No newline at end of file