dmd.backend.cod2

Compiler implementation of the D programming language.

Members

Functions

REGSIZE
int REGSIZE()
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
cdabs
void cdabs(CodeBuilder cdb, elem* e, regm_t* pretregs)

Absolute value operator

cdbswap
void cdbswap(CodeBuilder cdb, elem* e, regm_t* pretregs)

Bswap operator

cdcom
void cdcom(CodeBuilder cdb, elem* e, regm_t* pretregs)

Complement operator

cdcomma
void cdcomma(CodeBuilder cdb, elem* e, regm_t* pretregs)

Comma operator OPcomma

cdcond
void cdcond(CodeBuilder cdb, elem* e, regm_t* pretregs)

?: operator

cdctor
void cdctor(CodeBuilder cdb, elem* e, regm_t* pretregs)

C++ constructor.

cddctor
void cddctor(CodeBuilder cdb, elem* e, regm_t* pretregs)

D constructor. OPdctor

cdddtor
void cdddtor(CodeBuilder cdb, elem* e, regm_t* pretregs)

D destructor. OPddtor

cddiv
void cddiv(CodeBuilder cdb, elem* e, regm_t* pretregs)

Handle divide, modulo and remquo. Note that modulo isn't defined for doubles.

cddtor
void cddtor(CodeBuilder cdb, elem* e, regm_t* pretregs)

OPdtor

cderr
void cderr(CodeBuilder cdb, elem* e, regm_t* pretregs)
Undocumented in source. Be warned that the author may not have intended to support it.
cdhalt
void cdhalt(CodeBuilder cdb, elem* e, regm_t* pretregs)
cdind
void cdind(CodeBuilder cdb, elem* e, regm_t* pretregs)

Perform a 'star' reference (indirection).

cdinfo
void cdinfo(CodeBuilder cdb, elem* e, regm_t* pretregs)
Undocumented in source. Be warned that the author may not have intended to support it.
cdloglog
void cdloglog(CodeBuilder cdb, elem* e, regm_t* pretregs)

Do && and || operators. Generate: (evaluate e1 and e2, if true goto cnop1) cnop3: NOP cg: [save reg code] ;if we must preserve reg CLR reg ;false result (set Z also) JMP cnop2

cdmark
void cdmark(CodeBuilder cdb, elem* e, regm_t* pretregs)
Undocumented in source. Be warned that the author may not have intended to support it.
cdmemcmp
void cdmemcmp(CodeBuilder cdb, elem* e, regm_t* pretregs)

Generate code for memcmp(s1,s2,n) intrinsic.

cdmemcpy
void cdmemcpy(CodeBuilder cdb, elem* e, regm_t* pretregs)

Generate code for memcpy(s1,s2,n) intrinsic. OPmemcpy / \ s1 OPparam / \ s2 n

cdmemset
void cdmemset(CodeBuilder cdb, elem* e, regm_t* pretregs)

Generate code for memset(s,value,numbytes) intrinsic. (s OPmemset (numbytes OPparam value))

cdmul
void cdmul(CodeBuilder cdb, elem* e, regm_t* pretregs)

Handle multiply.

cdneg
void cdneg(CodeBuilder cdb, elem* e, regm_t* pretregs)

OPneg, OPsqrt, OPsin, OPcos, OPrint

cdnot
void cdnot(CodeBuilder cdb, elem* e, regm_t* pretregs)

Handle OPnot and OPbool. Generate: c: [evaluate e1] cfalse: [save reg code] clr reg jmp cnop ctrue: [save reg code] clr reg inc reg cnop: nop

cdorth
void cdorth(CodeBuilder cdb, elem* e, regm_t* pretregs)

Handle operators which are more or less orthogonal ( + - & | ^ )

cdpost
void cdpost(CodeBuilder cdb, elem* e, regm_t* pretregs)

Post increment and post decrement.

cdrelconst
void cdrelconst(CodeBuilder cdb, elem* e, regm_t* pretregs)

Get the address of. Is also called by cdstreq() to set up pointer to a structure.

cdsetjmp
void cdsetjmp(CodeBuilder cdb, elem* e, regm_t* pretregs)
Undocumented in source. Be warned that the author may not have intended to support it.
cdshift
void cdshift(CodeBuilder cdb, elem* e, regm_t* pretregs)

Generate code for shift left or shift right (OPshl,OPshr,OPashr,OProl,OPror).

cdstrcmp
void cdstrcmp(CodeBuilder cdb, elem* e, regm_t* pretregs)

Generate code for strcmp(s1,s2) intrinsic.

cdstrcpy
void cdstrcpy(CodeBuilder cdb, elem* e, regm_t* pretregs)

Generate code for strcpy(s1,s2) intrinsic.

cdstreq
void cdstreq(CodeBuilder cdb, elem* e, regm_t* pretregs)

Do structure assignments. This should be fixed so that (s1 = s2) is rewritten to (&s1 = &s2). Mebbe call cdstreq() for double assignments???

cdstrlen
void cdstrlen(CodeBuilder cdb, elem* e, regm_t* pretregs)

Generate code for intrinsic strlen().

cdvoid
void cdvoid(CodeBuilder cdb, elem* e, regm_t* pretregs)
choose_multiplier
bool choose_multiplier(int N, ulong d, int prec, ulong* pm, int* pshpost)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
getoffset
void getoffset(CodeBuilder cdb, elem* e, reg_t reg)

Load the offset portion of the address represented by e into reg.

idxregm
regm_t idxregm(code* c)

Determine index registers used by addressing mode. Index is rm of modregrm field.

movOnly
bool movOnly(elem* e)
opdouble
void opdouble(CodeBuilder cdb, elem* e, regm_t* pretregs, uint clib)

Gen code for call to floating point routine.

udiv_coefficients
bool udiv_coefficients(int N, ulong d, int* pshpre, ulong* pm, int* pshpost)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Static variables

cdcmp_flag
int cdcmp_flag;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
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.
segfl
ubyte[FLMAX] segfl;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
stackfl
bool[FLMAX] stackfl;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Meta