dmd.backend.cgen

Compiler implementation of the D programming language.

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.

cgen_prelinnum
void cgen_prelinnum(code** pc, Srcpos srcpos)

Prepend line number to existing code.

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
dt_t* dt_get_nzeros(uint n)
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
gen
code* gen(code* c, code* cs)

Add code to end of linked list. Note that unused operands are garbage. gen1() and gen2() are shortcut routines. Input: c -> linked list that code is to be added to end of cs -> data for the code

gen1
code* gen1(code* c, opcode_t op)
Undocumented in source. Be warned that the author may not have intended to support it.
gen2
code* gen2(code* c, opcode_t op, uint rm)
Undocumented in source. Be warned that the author may not have intended to support it.
gen2sib
code* gen2sib(code* c, opcode_t op, uint rm, uint sib)
Undocumented in source. Be warned that the author may not have intended to support it.
genadjfpu
code* genadjfpu(code* c, int offset)

Generate 'instruction' which tells the scheduler that the fpu stack has changed.

genc
code* genc(code* c, opcode_t op, uint ea, uint FL1, targ_size_t EV1, uint FL2, targ_size_t EV2)

Generate code.

genc2
code* genc2(code* c, opcode_t op, uint ea, targ_size_t EV2)
Undocumented in source. Be warned that the author may not have intended to support it.
gencodelem
void gencodelem(CodeBuilder cdb, elem* e, regm_t* pretregs, bool constflag)

Clean stack after call to codelem().

genlinnum
code* genlinnum(code* c, Srcpos srcpos)

Generate 'instruction' which is actually a line number.

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

searchfixlist
void searchfixlist(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

cgstate
CGstate cgstate;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

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.

FixupArray
struct FixupArray
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Meta