View source code
Display the source code in dmd/backend/cg87.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.cg87

Compiler implementation of the D programming language.

Functions

NameDescription
cdconvt87(cdb, e, pretregs) Operators OPc_r and OPc_i
cdconvt87(cdb, e, pretregs) Operators OPc_r and OPc_i
cdd_u32(cdb, e, pretregs) Do the following opcodes: OPd_u32
cdd_u32(cdb, e, pretregs) Do the following opcodes: OPd_u32
cdd_u64(cdb, e, pretregs) Do the following opcodes: OPd_u64 OPld_u64
cdd_u64(cdb, e, pretregs) Do the following opcodes: OPd_u64 OPld_u64
cdind87(cdb, e, pretregs)
cdind87(cdb, e, pretregs)
cdnegass87(cdb, e, pretregs) OPnegass
cdnegass87(cdb, e, pretregs) OPnegass
cdrndtol(cdb, e, pretregs) Do OPrndtol.
cdrndtol(cdb, e, pretregs) Do OPrndtol.
cdscale(cdb, e, pretregs) Do OPscale, OPyl2x, OPyl2xp1.
cdscale(cdb, e, pretregs) Do OPscale, OPyl2x, OPyl2xp1.
cg87_reset() Reset statics for another .obj file.
cg87_reset() Reset statics for another .obj file.
cload87(cdb, e, pretregs) Load complex operand into ST01 or flags or both.
cload87(cdb, e, pretregs) Load complex operand into ST01 or flags or both.
cmporder87(e) Determine if a compare is to be done forwards (return 0) or backwards (return 1). Must follow same logic as load87().
cmporder87(e) Determine if a compare is to be done forwards (return 0) or backwards (return 1). Must follow same logic as load87().
cnvt87(cdb, e, pretregs) Do the following opcodes: OPd_s16 OPd_s32 OPd_u16 OPd_s64
cnvt87(cdb, e, pretregs) Do the following opcodes: OPd_s16 OPd_s32 OPd_u16 OPd_s64
complex_eq87(cdb, e, pretregs) Perform an assignment to a long double/double/float.
complex_eq87(cdb, e, pretregs) Perform an assignment to a long double/double/float.
comsub87(cdb, e, pretregs) Reload common subexpression.
comsub87(cdb, e, pretregs) Reload common subexpression.
eq87(cdb, e, pretregs) Perform an assignment to a long double/double/float.
eq87(cdb, e, pretregs) Perform an assignment to a long double/double/float.
fixresult87(cdb, e, retregs, pretregs) Given the result of an expression is in retregs, generate necessary code to return result in *pretregs.
fixresult87(cdb, e, retregs, pretregs) Given the result of an expression is in retregs, generate necessary code to return result in *pretregs.
fixresult_complex87(cdb, e, retregs, pretregs) Given the result of an expression is in retregs, generate necessary code to return result in *pretregs.
fixresult_complex87(cdb, e, retregs, pretregs) Given the result of an expression is in retregs, generate necessary code to return result in *pretregs.
genfwait(cdb) Decide if we need to gen an FWAIT.
genfwait(cdb) Decide if we need to gen an FWAIT.
gensaverestore87(regm, cdbsave, cdbrestore) Save/restore ST0 or ST01
gensaverestore87(regm, cdbsave, cdbrestore) Save/restore ST0 or ST01
load87(cdb, e, eoffset, pretregs, eleft, op) If op == -1, load expression e into ST0. else compute (eleft op e), eleft is in ST0. Must follow same logic as cmporder87();
load87(cdb, e, eoffset, pretregs, eleft, op) If op == -1, load expression e into ST0. else compute (eleft op e), eleft is in ST0. Must follow same logic as cmporder87();
loadconst(e, im) Determine if there is a special 8087 instruction to load constant e.
loadconst(e, im) Determine if there is a special 8087 instruction to load constant e.
loadPair87(cdb, e, pretregs) Load OPpair or OPrpair into mST01
loadPair87(cdb, e, pretregs) Load OPpair or OPrpair into mST01
neg87(cdb, e, pretregs) Unary -, absolute value, square root, sine, cosine
neg87(cdb, e, pretregs) Unary -, absolute value, square root, sine, cosine
neg_complex87(cdb, e, pretregs) Unary - for complex operands
neg_complex87(cdb, e, pretregs) Unary - for complex operands
note87(e, offset, i) Note elem e as being in ST(i) as being a value we want to keep.
note87(e, offset, i) Note elem e as being in ST(i) as being a value we want to keep.
opass87(cdb, e, pretregs) Perform +=, -=, *= and /= for doubles.
opass87(cdb, e, pretregs) Perform +=, -=, *= and /= for doubles.
pop87() Pop 8087 stack.
pop87() Pop 8087 stack.
post87(cdb, e, pretregs) Take care of OPpostinc and OPpostdec.
post87(cdb, e, pretregs) Take care of OPpostinc and OPpostdec.
push87(cdb) Push 8087 stack. Generate and return any code necessary to preserve anything that might run off the end of the stack.
push87(cdb) Push 8087 stack. Generate and return any code necessary to preserve anything that might run off the end of the stack.
save87(cdb) Save in memory any values in the 8087 that we want to keep.
save87(cdb) Save in memory any values in the 8087 that we want to keep.
save87regs(cdb, n) Save any noted values that would be destroyed by n pushes
save87regs(cdb, n) Save any noted values that would be destroyed by n pushes
xchg87(i, j) Exchange two entries in 8087 stack.
xchg87(i, j) Exchange two entries in 8087 stack.

Structs

NameDescription
Dconst
Dconst
NDP When we need to temporarilly save 8087 registers, we record information about the save into an array of NDP structs:
NDP When we need to temporarilly save 8087 registers, we record information about the save into an array of NDP structs:

Global variables

NameTypeDescription
oprev const(ubyte[9]) Generate in-line 8087 code for the following operators: add min mul div cmp
oprev const(ubyte[9]) Generate in-line 8087 code for the following operators: add min mul div cmp

Authors

Walter Bright

License

Boost License 1.0