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.

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. If so, return !=0 and set *preg to which register it is.

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

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