View source code
							
							
						
								Display the source code in dmd/backend/x86/cod2.d from which thispage was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create aBugzilla 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 usinglocal clone.
							
						Module dmd.backend.x86.cod2
Code generation 2
Includes
- math operators (+ - * / %) and functions (abs, cos, sqrt) - 'string' functions (strlen, memcpy, memset) - pointers (address of / dereference) - struct assign, constructor, destructor
Compiler implementation of the D programming language.
Documentation
https://dlang.org/phobos/dmd_backend_x86_cod2.html
Coverage
https://codecov.io/gh/dlang/dmd/src/master/compiler/src/dmd/backend/x86/cod2.d
Functions
| Name | Description | 
|---|---|
| 
									cdabs(cg, cdb, e, pretregs)
								 | Absolute value operator, OPabs | 
| 
									cdbswap(cg, cdb, e, pretregs)
								 | Bswap operator | 
| 
									cdcom(cg, cdb, e, pretregs)
								 | Complement operator | 
| 
									cdcomma(cg, cdb, e, pretregs)
								 | Comma operator OPcomma | 
| 
									cdcond(cg, cdb, e, pretregs)
								 | ?: operator | 
| 
									cdctor(cg, cdb, e, pretregs)
								 | C++ constructor. | 
| 
									cddctor(cg, cdb, e, pretregs)
								 | D constructor. OPdctor | 
| 
									cdddtor(cg, cdb, e, pretregs)
								 | D destructor. OPddtor | 
| 
									cddiv(cg, cdb, e, pretregs)
								 | Handle divide, modulo and remquo. Note that modulo isn't defined for doubles. | 
| 
									cddtor(cg, cdb, e, pretregs)
								 | OPdtor | 
| 
									cdhalt(cg, cdb, e, pretregs)
								 | |
| 
									cdind(cg, cdb, e, pretregs)
								 | Perform a 'star' reference (indirection). | 
| 
									cdloglog(cg, cdb, e, pretregs)
								 | Do && and || operators. | 
| 
									cdmemcmp(cg, cdb, e, pretregs)
								 | Generate code for memcmp(s1,s2,n) intrinsic. | 
| 
									cdmemcpy(cg, cdb, e, pretregs)
								 | Generate code for memcpy(s1,s2,n) intrinsic. OPmemcpy / \ s1 OPparam / \ s2 n | 
| 
									cdmemset(cg, cdb, e, pretregs)
								 | Generate code for memset(s,value,numbytes) intrinsic. (s OPmemset (numbytes OPparam value)) | 
| 
									cdmul(cg, cdb, e, pretregs)
								 | Handle multiply. | 
| 
									cdneg(cg, cdb, e, pretregs)
								 | OPneg, OPsqrt, OPsin, OPcos, OPrint | 
| 
									cdnot(cg, cdb, e, pretregs)
								 | Handle OPnot and OPbool. | 
| 
									cdorth(cg, cdb, e, pretregs)
								 | Handle operators which are more or less orthogonal ( + - & | ^ ) | 
| 
									cdpost(cg, cdb, e, pretregs)
								 | Post increment and post decrement. | 
| 
									cdrelconst(cg, cdb, e, pretregs)
								 | Get the address of. Is also called by cdstreq() to set up pointer to a structure. | 
| 
									cdshift(cg, cdb, e, pretregs)
								 | Generate code for shift left or shift right (OPshl,OPshr,OPashr,OProl,OPror). | 
| 
									cdstrcmp(cg, cdb, e, pretregs)
								 | Generate code for strcmp(s1,s2) intrinsic. | 
| 
									cdstrcpy(cg, cdb, e, pretregs)
								 | Generate code for strcpy(s1,s2) intrinsic. | 
| 
									cdstreq(cg, cdb, e, pretregs)
								 | Do structure assignments. This should be fixed so that (s1 = s2) is rewritten to (&s1 = &s2). Mebbe call cdstreq() for double assignments??? | 
| 
									cdstrlen(cg, cdb, e, pretregs)
								 | Generate code for intrinsic strlen(). | 
| 
									cdvoid(cg, cdb, e, pretregs)
								 | |
| 
									getoffset(cg, cdb, e, reg)
								 | Load the offset portion of the address represented by e into reg. | 
| 
									idxregm(c)
								 | Determine index registers used by addressing mode. Index is rm of modregrm field. | 
| 
									movOnly(e)
								 | |
| 
									opdouble(cdb, e, pretregs, clib)
								 | Gen code for call to floating point routine. | 
Authors
License
					Copyright © 1999-2025 by the D Language Foundation | Page generated by ddox.