dmd.backend.cgen

Generate code instructions

Members

Functions

addtofixlist
size_t addtofixlist(Symbol* s, targ_size_t offset, int seg, targ_size_t val, int flags)

Add to the fix list.

cat
code* cat(code* c1, code* c2)

Concatenate two code lists together. Return pointer to result.

code_last
code* code_last(code* c)

Find last code in list.

code_orflag
void code_orflag(code* c, uint flag)

Set flag bits on last code in list.

code_orrex
void code_orrex(code* c, uint rex)

Set rex bits on last code in list.

dt_get_nzeros (from dmd.backend.dt)
dt_t* dt_get_nzeros(uint n) via public import dmd.backend.dt : dt_get_nzeros;

Temporary hack to initialize a dt_t* for C.

gencodelem
void gencodelem(CodeBuilder cdb, elem* e, regm_t* pretregs, bool constflag)

Clean stack after call to codelem().

gennop
code* gennop(code* c)

Generate 'nop'

outfixlist
void outfixlist()

End of module. Output fixups as references to external Symbols.

reghasvalue
bool reghasvalue(regm_t regm, targ_size_t value, reg_t preg)

Determine if one of the registers in regm has value in it.

regwithvalue
void regwithvalue(CodeBuilder cdb, regm_t regm, targ_size_t value, reg_t preg, regm_t flags)

Load a register from the mask regm with value. Output: preg = the register selected

Static variables

cgstate (from dmd.backend.cgcod)
CGstate cgstate; via public import dmd.backend.cgcod : cgstate;
Undocumented in source.

Structs

Fixup
struct Fixup

When we don't know whether a function symbol is defined or not within this module, we stuff it in an array of references to be fixed up later.

Meta