View source code
Display the source code in dmd/backend/cod4.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module dmd.backend.cod4

Compiler implementation of the D programming language.

Mostly code generation for assignment operators.

Documentation

https://dlang.org/phobos/dmd_backend_cod4.html

Coverage

https://codecov.io/gh/dlang/dmd/src/master/src/dmd/backend/cod4.d

Functions

NameDescription
cdaddass(cdb, e, pretregs) Generate code for += -= &= |= ^= negass
cdasm(cdb, e, pretregs) Generate code for an asm elem.
cdbscan(cdb, e, pretregs) Generate code for OPbsf and OPbsr.
cdbt(cdb, e, pretregs) Generate code for OPbt, OPbtc, OPbtr, OPbts
cdbtst(cdb, e, pretregs) Generate code for OPbtst
cdbyteint(cdb, e, pretregs) Convert byte to int. For OPu8_16 and OPs8_16.
cdcmp(cdb, e, pretregs) Generate code for compares. Handles lt,gt,le,ge,eqeq,ne for all data types.
cdcmpxchg(cdb, e, pretregs) Generate code for OPcmpxchg
cdcnvt(cdb, e, pretregs) Do conversions. Depends on OPd_s32 and CLIB.dbllng being in sequence.
cddivass(cdb, e, pretregs) Generate code for /= %=
cdeq(cdb, e, pretregs) Generate code for an assignment.
cdfar16(cdb, e, pretregs) Generate code for OPnp_f16p and OPf16p_np.
cdlngsht(cdb, e, pretregs) Convert long to short (OP32_16). Get offset of far pointer (OPoffset). Convert int to byte (OP16_8). Convert long long to long (OP64_32). OP128_64
cdmsw(cdb, e, pretregs) Get top 32 bits of 64 bit value (I32) or top 16 bits of 32 bit value (I16) or top 64 bits of 128 bit value (I64). OPmsw
cdmulass(cdb, e, pretregs) Generate code for *=
cdpair(cdb, e, pretregs) Generate code for OPpair, OPrpair.
cdpopcnt(cdb, e, pretregs) OPpopcnt operator
cdport(cdb, e, pretregs) Handle operators OPinp and OPoutp.
cdprefetch(cdb, e, pretregs) Generate code for OPprefetch
cdshass(cdb, e, pretregs) Generate code for <<= and >>=
cdshtlng(cdb, e, pretregs) Convert short to long. For OPs16_32, OPu16_32, OPnp_fp, OPu32_64, OPs32_64, OPu64_128, OPs64_128
doinreg(s, e) Determine if expression e can be evaluated directly into register variable s. Have to be careful about things like x=x+x+x, and x=a+x.
longcmp(cdb, e, jcond, fltarg, targ) Generate code for signed compare of longs.
modEA(cdb, c) Return code for saving common subexpressions if EA turns out to be a register. This is called just before modifying an EA.

Authors

Walter Bright

License

Boost License 1.0