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

Function dmd.backend.cod2.cdloglog

Do && and || operators.

void cdloglog (
  ref dmd.backend.codebuilder.CodeBuilder cdb,
  elem* e,
  uint* pretregs
) nothrow @trusted;

Generate

(evaluate e1 and e2, if true goto cnop1)

cnop3

NOP

cg

[save reg code] ;if we must preserve reg CLR reg ;false result (set Z also) JMP cnop2

cnop1

NOP ;if e1 evaluates to true [save reg code] ;preserve reg

MOV reg,1 ;true result or CLR reg ;if return result in flags INC reg

cnop2

NOP ;mark end of code

Authors

Walter Bright

License

Boost License 1.0