Difference between revisions of "Instruction Set/retn"

From Mill Computing Wiki
Jump to: navigation, search
m (Protected "Instruction Set/retn": generated ([Edit=<protect-level-bot>] (indefinite) [Move=<protect-level-bot>] (indefinite)))
Line 4:Line 4:
 
</div>
 
</div>
  
return from function
+
Returns values and control to the caller.
 +
 
 +
The Mill architecture supports multiple return values not only on operations but for all functions, as many as there are belt positions. Still most will only have one or none at all, because that is what languages were and are designed for.
 +
 
 +
Return not only returns from the most recent [[Instruction_Set/call|call]] operation and ends a frame, but also from the most recent [[Instruction_Set/inner|inner]] operation and exits a loop. This depends on whether it was a call or an inner that has been executed most recently. The [[Spiller]] keeps track of that.
 +
 
 +
<b>related operations:</b> [[Instruction_Set/call|call]], [[Instruction_Set/inner|inner]], [[Instruction_Set/retntr|retntr]], [[Instruction_Set/retnfl|retnfl]]
 +
 
 
----
 
----
 
<code style="font-size:130%"><b style="color:#050">retn</b>()</code>
 
<code style="font-size:130%"><b style="color:#050">retn</b>()</code>
Line 64:Line 71:
  
 
----
 
----
<code style="font-size:130%"><b style="color:#050">retn</b>(<span style="color:#009">[[Domains#op|op]]</span> <span title="late-evaluated operand from belt">v</span>) &#8594; [[Domains|op]] r<sub>0</sub></code>
+
<code style="font-size:130%"><b style="color:#050">retn</b>(<span style="color:#009">[[Domains#op|op]]</span> <span title="late-evaluated operand from belt">Another</span>) &#8594; [[Domains|op]] r<sub>0</sub></code>
 
<div style="font-size:80%;line-height:90%;margin-bottom:2em">'''operands:''' [[Operands#likeInv|like Inv :]]
 
<div style="font-size:80%;line-height:90%;margin-bottom:2em">'''operands:''' [[Operands#likeInv|like Inv :]]
 
</div>
 
</div>

Revision as of 17:45, 4 February 2015

realizing  exu stream  flowSkinny block  transfer phase   operation  

native on: all

Returns values and control to the caller.

The Mill architecture supports multiple return values not only on operations but for all functions, as many as there are belt positions. Still most will only have one or none at all, because that is what languages were and are designed for.

Return not only returns from the most recent call operation and ends a frame, but also from the most recent inner operation and exits a loop. This depends on whether it was a call or an inner that has been executed most recently. The Spiller keeps track of that.

related operations: call, inner, retntr, retnfl


retn()

operands: like Inv :


alternate encoding: skinny

Core In Slots Latencies
Tin f0 1
Copper f0 1
Silver f0 1
Gold f0 1
Decimal8 f0 1
Decimal16 f0 1

retn(ops vs) → ops r0 ...

operands: like Inv :


encoding: retn(off vs, count c) , retn(off vs, count c, lit vs) , retn(off vs, count c, lit vs, lit vs) , retn(off vs, count c, lit vs, lit vs, lit vs)

Core In Slots Latencies
Tin F0 1
Copper F0 F1 1
Silver F0 F1 F2 1
Gold F0 F1 F2 F3 1
Decimal8 F0 F1 F2 1
Decimal16 F0 F1 F2 1

retn(op Another) → op r0

operands: like Inv :


alternate encoding: skinny

Core In Slots Latencies
Tin f0 1
Copper f0 1
Silver f0 1
Gold f1 1
Decimal8 f0 1
Decimal16 f0 1


Instruction Set, alphabetical, Instruction Set by Category, Instruction Set, sortable, filterable