summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
Commit message (Expand)AuthorAgeFilesLines
* IC: green tests (#17311)Andreas Rumpf2021-03-191-1/+1
* semLambda removed, semProcAux reworked (#17379)Saem Ghani2021-03-171-6/+13
* Remove declPragmas from lambdas [backport:1.0] (#16966)hlaaftana2021-02-091-6/+7
* fix #16752: threadvar now works with importcpp types; osx now uses native TLS...Timothee Cour2021-01-271-1/+3
* `--hintAsError` (#16763)Timothee Cour2021-01-201-0/+1
* IC: next steps (#16632)Andreas Rumpf2021-01-121-3/+3
* IC: next steps (#16550)Andreas Rumpf2021-01-071-0/+4
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-6/+4
* refactorings to prepare the compiler for IC (#15935)Andreas Rumpf2020-12-171-1/+3
* cmdline: improve command processing (#16056)Timothee Cour2020-11-261-1/+1
* fix #12558 (#15864)flywind2020-11-091-1/+5
* EnumUtils, speed up findStr in compiler (#15777)cooldome2020-11-031-1/+1
* Use modern enums in compiler (#15775)cooldome2020-11-021-7/+7
* closes #7658 (#15784)flywind2020-10-301-3/+6
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-4/+4
* implements https://github.com/nim-lang/RFCs/issues/260 (#15505)Andreas Rumpf2020-10-071-10/+20
* implements https://github.com/nim-lang/RFCs/issues/258 (#15503)Andreas Rumpf2020-10-061-0/+9
* fixes #15430, pop pragma takes invalid input (#15449)shirleyquirk2020-10-011-1/+3
* .noalias annotation; frontend support (#15419)Andreas Rumpf2020-09-281-2/+6
* Expand hoisted default params in sem (#15270)Clyybber2020-09-051-3/+3
* Big compiler Cleanup (#14777)Clyybber2020-08-281-3/+3
* Use typeflag insteadClyybber2020-08-101-2/+4
* Make explicit {.nimcall.} a seperate calling conventionClyybber2020-08-081-3/+3
* fixes #14458 [backport:1.2] (#14756)Andreas Rumpf2020-06-221-1/+1
* `nim doc --backend:js`, `nim doc --doccmd:-d:foo`, `nim r --backend:js`, `--d...Timothee Cour2020-05-111-4/+4
* CT sizeof(+friends) for {.importc, completeStruct.} types, enable ABI static ...Timothee Cour2020-04-231-1/+5
* remove the nilChecks switch; refs #11570Araq2020-04-201-1/+0
* drnim: tiny progress (#13882)Andreas Rumpf2020-04-151-1/+1
* finally de-deprecate the .define and .undef pragmasAndreas Rumpf2020-04-041-2/+0
* new feature: ability to turn specific warnings to errorsAndreas Rumpf2020-04-041-19/+16
* added an .assert pragma and mentioned the pragmas in the changelogAraq2020-04-021-1/+1
* The raises list can now use expressions referencing the generic paramsZahary Karadjov2020-04-011-4/+7
* Replace tfHasRequiresInit with a more accurate mechanismZahary Karadjov2020-04-011-1/+1
* More sophistication; Allow requiresInit to be specified per-fieldZahary Karadjov2020-04-011-3/+7
* First steps, the compiler can boot with enforced requiresInitZahary Karadjov2020-04-011-1/+1
* DrNim (Nim compiler with Z3 integration) (#13743)Andreas Rumpf2020-03-311-5/+32
* '.push raises: []' now also affects proc types (#13776)Andreas Rumpf2020-03-291-3/+3
* new feature: --staticBoundChecks:on to enforce static array index checking (#...Andreas Rumpf2020-03-181-2/+5
* sink parameter inference for types that have destructors (#13544)Andreas Rumpf2020-03-041-2/+6
* properly handle note override logic/verbosity/config/cmdline using modifiedyN...Timothee Cour2020-02-271-0/+1
* make goto based exceptions available for 'nim cpp' (#13244)Andreas Rumpf2020-01-251-2/+2
* make case-object transitions explicit, make unknownLineInfo a const, replace ...Jasper Jenkins2020-01-171-1/+1
* fixes #13122 (#13126)Andreas Rumpf2020-01-131-4/+2
* VM: support importc var, ptr/pointer types, cast int <=> ptr/pointer (#12877)Timothee Cour2020-01-051-0/+2
* fix #12985 {.push.} now does not apply to generic instantiations (#12986)Timothee Cour2020-01-021-1/+1
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-011-1/+1
* ARC: cycle detector (#12823)Andreas Rumpf2019-12-171-1/+1
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-61/+61
* implemented a new localPassc pragma (#12706)Andreas Rumpf2019-11-221-1/+6
* fixes and changes the recently introduced 'alignas' to be 'align' (#12666)Andreas Rumpf2019-11-151-2/+2
ral.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Mu - linux/ex14.subx</title>
<meta name="Generator" content="Vim/8.1">
<meta name="plugin-version" content="vim8.1_v1">
<meta name="syntax" content="none">
<meta name="settings" content="number_lines,use_css,no_foldcolumn,expand_tabs,line_ids,prevent_copy=">
<meta name="colorscheme" content="minimal-dark">
<style type="text/css">
<!--
pre { font-family: monospace; color: #000000; background-color: #a8a8a8; }
body { font-size:12pt; font-family: monospace; color: #000000; background-color: #a8a8a8; }
a { color:inherit; }
* { font-size:12pt; font-size: 1em; }
.subxComment { color: #005faf; }
.subxS1Comment { color: #0000af; }
.subxS2Comment { color: #8a8a8a; }
.LineNr { }
.Constant { color: #008787; }
.SpecialChar { color: #d70000; }
.Normal { color: #000000; background-color: #a8a8a8; padding-bottom: 1px; }
-->
</style>

<script type='text/javascript'>
<!--

/* function to open any folds containing a jumped-to line before jumping to it */
function JumpToLine()
{
  var lineNum;
  lineNum = window.location.hash;
  lineNum = lineNum.substr(1); /* strip off '#' */

  if (lineNum.indexOf('L') == -1) {
    lineNum = 'L'+lineNum;
  }
  var lineElem = document.getElementById(lineNum);
  /* Always jump to new location even if the line was hidden inside a fold, or
   * we corrected the raw number to a line ID.
   */
  if (lineElem) {
    lineElem.scrollIntoView(true);
  }
  return true;
}
if ('onhashchange' in window) {
  window.onhashchange = JumpToLine;
}

-->
</script>
</head>
<body onload='JumpToLine();'>
<a href='https://github.com/akkartik/mu/blob/main/linux/ex14.subx'>https://github.com/akkartik/mu/blob/main/linux/ex14.subx</a>
<pre id='vimCodeElement'>
<span id="L1" class="LineNr"> 1 </span><span class="subxComment"># Multiply 2 numbers.</span>
<span id="L2" class="LineNr"> 2 </span><span class="subxComment">#</span>
<span id="L3" class="LineNr"> 3 </span><span class="subxComment"># To run:</span>
<span id="L4" class="LineNr"> 4 </span><span class="subxComment">#   $ bootstrap/bootstrap translate ex14.subx -o ex14</span>
<span id="L5" class="LineNr"> 5 </span><span class="subxComment">#   $ bootstrap/bootstrap run ex14</span>
<span id="L6" class="LineNr"> 6 </span><span class="subxComment"># Expected result:</span>
<span id="L7" class="LineNr"> 7 </span><span class="subxComment">#   $ echo $?</span>
<span id="L8" class="LineNr"> 8 </span><span class="subxComment">#   6</span>
<span id="L9" class="LineNr"> 9 </span>
<span id="L10" class="LineNr">10 </span>== code
<span id="L11" class="LineNr">11 </span><span class="subxComment">#   instruction                     effective address                                                   register    displacement    immediate</span>
<span id="L12" class="LineNr">12 </span><span class="subxS1Comment"># . op          subop               mod             rm32          base        index         scale       r32</span>
<span id="L13" class="LineNr">13 </span><span class="subxS1Comment"># . 1-3 bytes   3 bits              2 bits          3 bits        3 bits      3 bits        2 bits      2 bits      0/1/2/4 bytes   0/1/2/4 bytes</span>
<span id="L14" class="LineNr">14 </span>
<span id="L15" class="LineNr">15 </span><span class="SpecialChar">Entry</span>:
<span id="L16" class="LineNr">16 </span>    b8/copy-to-eax  1/imm32
<span id="L17" class="LineNr">17 </span>    b9/copy-to-ecx  2/imm32
<span id="L18" class="LineNr">18 </span>    bb/copy-to-ebx  3/imm32
<span id="L19" class="LineNr">19 </span>
<span id="L20" class="LineNr">20 </span>    69/multiply                     3/mod/direct    1/rm32/ecx   <span class="Normal"> . </span>         <span class="Normal"> . </span>           <span class="Normal"> . </span>          3/r32/ebx                   3/imm32           <span class="subxComment"># ebx = ecx * 3</span>
<span id="L21" class="LineNr">21 </span>
<span id="L22" class="LineNr">22 </span><span class="Constant">$exit</span>:
<span id="L23" class="LineNr">23 </span>    <span class="subxComment"># exit(ebx)</span>
<span id="L24" class="LineNr">24 </span>    e8/call  <a href='000init.subx.html#L18'>syscall_exit</a>/disp32
<span id="L25" class="LineNr">25 </span>
<span id="L26" class="LineNr">26 </span><span class="subxS2Comment"># . . vim&#0058;nowrap:textwidth=0</span>
</pre>
</body>
</html>
<!-- vim: set foldmethod=manual : -->