dmd.backend.code

Define registers, register masks, and the CPU instruction linked list

Compiler implementation of the D programming language.

Public Imports

dmd.backend.nteh
public import dmd.backend.nteh;
Undocumented in source.
dmd.backend.cgen
public import dmd.backend.cgen;
Undocumented in source.
dmd.backend.cgcod
public import dmd.backend.cgcod;
Undocumented in source.
dmd.backend.cod1
public import dmd.backend.cod1;
Undocumented in source.
dmd.backend.cod2
public import dmd.backend.cod2;
Undocumented in source.
dmd.backend.cod3
public import dmd.backend.cod3;
Undocumented in source.
dmd.backend.cod4
public import dmd.backend.cod4;
Undocumented in source.
dmd.backend.cod5
public import dmd.backend.cod5;
Undocumented in source.
dmd.backend.cgxmm
public import dmd.backend.cgxmm;
Undocumented in source.
dmd.backend.cg87
public import dmd.backend.cg87;
Undocumented in source.

Members

Enums

NTEH_try
anonymousenum NTEH_try

As we generate code, collect information about what parts of NT exception handling we need.

Functions

addtofixlist (from dmd.backend.cgen)
size_t addtofixlist(Symbol* s, targ_size_t offset, int seg, targ_size_t val, int flags) via public import dmd.backend.cgen : outfixlist, addtofixlist;

Add to the fix list.

cgreg_assign (from dmd.backend.cgreg)
int cgreg_assign(Symbol* retsym) via public import dmd.backend.cgreg : cgreg_init, cgreg_term, cgreg_reset, cgreg_used, cgreg_spillreg_prolog, cgreg_spillreg_epilog, cgreg_assign, cgreg_unregister;
Undocumented in source.
cgreg_init (from dmd.backend.cgreg)
void cgreg_init() via public import dmd.backend.cgreg : cgreg_init, cgreg_term, cgreg_reset, cgreg_used, cgreg_spillreg_prolog, cgreg_spillreg_epilog, cgreg_assign, cgreg_unregister;
cgreg_reset (from dmd.backend.cgreg)
void cgreg_reset() via public import dmd.backend.cgreg : cgreg_init, cgreg_term, cgreg_reset, cgreg_used, cgreg_spillreg_prolog, cgreg_spillreg_epilog, cgreg_assign, cgreg_unregister;
cgreg_spillreg_epilog (from dmd.backend.cgreg)
void cgreg_spillreg_epilog(block* b, Symbol* s, CodeBuilder cdbstore, CodeBuilder cdbload) via public import dmd.backend.cgreg : cgreg_init, cgreg_term, cgreg_reset, cgreg_used, cgreg_spillreg_prolog, cgreg_spillreg_epilog, cgreg_assign, cgreg_unregister;

Determine block epilog code - it's either assignments to register, or storing register back in memory.

cgreg_spillreg_prolog (from dmd.backend.cgreg)
void cgreg_spillreg_prolog(block* b, Symbol* s, CodeBuilder cdbstore, CodeBuilder cdbload) via public import dmd.backend.cgreg : cgreg_init, cgreg_term, cgreg_reset, cgreg_used, cgreg_spillreg_prolog, cgreg_spillreg_epilog, cgreg_assign, cgreg_unregister;

Determine block prolog code for s - it's either assignments to register, or storing register back in memory.

cgreg_term (from dmd.backend.cgreg)
void cgreg_term() via public import dmd.backend.cgreg : cgreg_init, cgreg_term, cgreg_reset, cgreg_used, cgreg_spillreg_prolog, cgreg_spillreg_epilog, cgreg_assign, cgreg_unregister;
cgreg_unregister (from dmd.backend.cgreg)
void cgreg_unregister(regm_t conflict) via public import dmd.backend.cgreg : cgreg_init, cgreg_term, cgreg_reset, cgreg_used, cgreg_spillreg_prolog, cgreg_spillreg_epilog, cgreg_assign, cgreg_unregister;

The register variables in this mask can not be in registers. "Unregister" them.

cgreg_used (from dmd.backend.cgreg)
void cgreg_used(uint bi, regm_t used) via public import dmd.backend.cgreg : cgreg_init, cgreg_term, cgreg_reset, cgreg_used, cgreg_spillreg_prolog, cgreg_spillreg_epilog, cgreg_assign, cgreg_unregister;

Registers used in block bi.

cgsched_block (from dmd.backend.cgsched)
void cgsched_block(block* b) via public import dmd.backend.cgsched : cgsched_block;

Entry point

code_calloc (from dmd.backend.dcode)
code* code_calloc() via public import dmd.backend.dcode : code_calloc, code_free, code_term, code_chunk_alloc, code_list;

PUBLIC FUNCTIONS ******************

code_chunk_alloc (from dmd.backend.dcode)
code* code_chunk_alloc() via public import dmd.backend.dcode : code_calloc, code_free, code_term, code_chunk_alloc, code_list;

PUBLIC FUNCTIONS ******************

code_free (from dmd.backend.dcode)
void code_free(code* cstart) via public import dmd.backend.dcode : code_calloc, code_free, code_term, code_chunk_alloc, code_list;

PUBLIC FUNCTIONS ******************

code_term (from dmd.backend.dcode)
void code_term() via public import dmd.backend.dcode : code_calloc, code_free, code_term, code_chunk_alloc, code_list;

PUBLIC FUNCTIONS ******************

findreg (from dmd.backend.cgcod)
reg_t findreg(regm_t regm, int line, const(char)* file) via public import dmd.backend.cgcod : retsize, findreg;
Undocumented in source.
iasm_regs
regm_t iasm_regs(block* bp)

Get registers used by a given block

mach_seg_data_isCode (from dmd.backend.machobj)
int mach_seg_data_isCode(seg_data sd) via public import dmd.backend.machobj : mach_seg_data_isCode;

Returns !=0 if this segment is a code segment.

outfixlist (from dmd.backend.cgen)
void outfixlist() via public import dmd.backend.cgen : outfixlist, addtofixlist;

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

regimmed_set
void regimmed_set(int reg, targ_size_t e)

Set value in regimmed for reg. NOTE: For 16 bit generator, this is always a (targ_short) sign-extended value.

Static functions

mscoff_seg_data_isCode (from dmd.backend.mscoffobj)
int mscoff_seg_data_isCode(seg_data sd) via public import dmd.backend.mscoffobj : mscoff_seg_data_isCode;

Returns !=0 if this segment is a code segment.

Static variables

BPRM (from dmd.backend.cg)
int BPRM; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;
Undocumented in source.
DOUBLEREGS (from dmd.backend.cg)
regm_t DOUBLEREGS; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;
Undocumented in source.
FLOATREGS (from dmd.backend.cg)
regm_t FLOATREGS; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;
Undocumented in source.
FLOATREGS2 (from dmd.backend.cg)
regm_t FLOATREGS2; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;
Undocumented in source.
STACKALIGN (from dmd.backend.cg)
int STACKALIGN; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;
Undocumented in source.
SegData (from dmd.backend.cgobj)
Rarray!(seg_data*) SegData; via public import dmd.backend.cgobj : SegData;
Undocumented in source.
TARGET_STACKALIGN (from dmd.backend.cg)
int TARGET_STACKALIGN; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;
Undocumented in source.
code_list (from dmd.backend.dcode)
code* code_list; via public import dmd.backend.dcode : code_calloc, code_free, code_term, code_chunk_alloc, code_list;

PUBLIC FUNCTIONS ******************

cseg (from dmd.backend.cg)
int cseg; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;
Undocumented in source.
framehandleroffset (from dmd.backend.cg)
targ_size_t framehandleroffset; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;

////////////////// GLOBALS /////////////////////

localsize (from dmd.backend.cg)
targ_size_t localsize; via public import dmd.backend.cg : BPRM, FLOATREGS, FLOATREGS2, DOUBLEREGS, localsize, framehandleroffset, cseg, STACKALIGN, TARGET_STACKALIGN;
Undocumented in source.
retsize (from dmd.backend.cgcod)
targ_size_t retsize; via public import dmd.backend.cgcod : retsize, findreg;
Undocumented in source.

Structs

CGstate
struct CGstate

Code Generator State **************

FuncParamRegs
struct FuncParamRegs
LocalSection
struct LocalSection

Local sections on the stack

REGSAVE
struct REGSAVE

Register save state.

_Declaration
struct _Declaration

Code data type

Unions

evc
union evc
Undocumented in source.

Meta