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
x87 FPU code generation
Compiler implementation of the D programming language.
Functions
Name | Description |
---|---|
cdconvt87(cdb, e, pretregs)
|
Operators OPc_r and OPc_i |
cdd_u32(cdb, e, pretregs)
|
Do the following opcodes: OPd_u32 |
cdd_u64(cdb, e, pretregs)
|
Do the following opcodes: OPd_u64 OPld_u64 |
cdind87(cdb, e, pretregs)
|
|
cdnegass87(cdb, e, pretregs)
|
OPnegass |
cdrndtol(cdb, e, pretregs)
|
Do OPrndtol. |
cdscale(cdb, e, pretregs)
|
Do OPscale, OPyl2x, OPyl2xp1. |
cdtoprec(cdb, e, pretregs)
|
Round 80 bit precision to 32 or 64 bits. OPtoprec |
cg87_reset()
|
Reset statics for another .obj file. |
cload87(cdb, e, outretregs)
|
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(). |
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. |
comsub87(cdb, e, outretregs)
|
Reload common subexpression. |
eq87(cdb, e, pretregs)
|
Perform an assignment to a long double/double/float. |
fixresult87(cdb, e, retregs, outretregs, isReturnValue)
|
Given the result of an expression is in retregs, generate necessary code to return result in outretregs. |
fixresult_complex87(cdb, e, retregs, outretregs, isReturnValue)
|
Given the result of an expression is in retregs, generate necessary code to return result in outretregs. |
genfwait(cdb)
|
Decide if we need to gen an FWAIT. |
gensaverestore87(regm, cdbsave, cdbrestore)
|
Save/restore ST0 or ST01 |
load87(cdb, e, eoffset, outretregs, 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. |
loadPair87(cdb, e, outretregs)
|
Load OPpair or OPrpair into mST01 |
neg87(cdb, e, pretregs)
|
Unary -, absolute value, square root, sine, cosine |
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. |
opass87(cdb, e, pretregs)
|
Perform +=, -=, *= and /= for doubles. |
pop87()
|
Pop 8087 stack. |
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. |
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 |
xchg87(i, j)
|
Exchange two entries in 8087 stack. |
Structs
Name | Description |
---|---|
Dconst
|
Enums
Name | Description |
---|---|
CW
|
87 Control Word rounding modes |
Global variables
Name | Type | Description |
---|---|---|
oprev
|
const(ubyte[9])
|
Generate in-line 8087 code for the following operators: add min mul div cmp |
Authors
License
Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.