This commit is contained in:
Kartik Agaram 2021-05-09 09:46:46 -07:00
parent d91595e31c
commit 96b6d623a6
2 changed files with 6 additions and 6 deletions

View File

@ -140,9 +140,9 @@ if ('onhashchange' in window) {
<span id="L81" class="LineNr"> 81 </span>
<span id="L82" class="LineNr"> 82 </span><span class="muComment"># special routines for multiplying and dividing fixed-point numbers</span>
<span id="L83" class="LineNr"> 83 </span>
<span id="L84" class="LineNr"> 84 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='mandelbrot-fixed.mu.html#L84'>multiply-fixed</a></span> a: int, b: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="Special">&lt;-</span> copy a
<span id="L86" class="LineNr"> 86 </span> result <span class="Special">&lt;-</span> multiply b
<span id="L84" class="LineNr"> 84 </span><span class="PreProc">fn</span> <span class="muFunction"><a href='mandelbrot-fixed.mu.html#L84'>multiply-fixed</a></span> a-f: int, b-f: int<span class="PreProc"> -&gt; </span>_/<span class="Constant">eax</span>: int <span class="Delimiter">{</span>
<span id="L85" class="LineNr"> 85 </span> <span class="PreProc">var</span> result/<span class="Constant">eax</span>: int <span class="Special">&lt;-</span> copy a-f
<span id="L86" class="LineNr"> 86 </span> result <span class="Special">&lt;-</span> multiply b-f
<span id="L87" class="LineNr"> 87 </span> <span class="Delimiter">{</span>
<span id="L88" class="LineNr"> 88 </span> <span class="PreProc">break-if-not-overflow</span>
<span id="L89" class="LineNr"> 89 </span> <a href='501draw-text.mu.html#L481'>abort</a> <span class="Constant">&quot;multiply-fixed: overflow&quot;</span>

View File

@ -81,9 +81,9 @@ fn test-fixed-conversion {
# special routines for multiplying and dividing fixed-point numbers
fn multiply-fixed a: int, b: int -> _/eax: int {
var result/eax: int <- copy a
result <- multiply b
fn multiply-fixed a-f: int, b-f: int -> _/eax: int {
var result/eax: int <- copy a-f
result <- multiply b-f
{
break-if-not-overflow
abort "multiply-fixed: overflow"