Difference between revisions of "Instruction Set/rescue"

From Mill Computing Wiki
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1:Line 1:
 
{{DISPLAYTITLE:rescue}}
 
{{DISPLAYTITLE:rescue}}
<div style="font-size:80%;line-height:90%;margin-bottom:2em">[[Speculation|realizing]]&nbsp;&nbsp;[[Encoding|flow stream]]&nbsp;&nbsp;[[Decode|flow block]]&nbsp;&nbsp;[[Phasing|conform phase]]&nbsp;&nbsp; operation&nbsp;&nbsp;<br />
+
<div style="font-size:80%;line-height:90%;margin-bottom:2em">[[Speculation|speculable]]&nbsp;&nbsp;[[Encoding|flow stream]]&nbsp;&nbsp;[[Decode|flow block]]&nbsp;&nbsp;[[Phasing|rescue phase]]&nbsp;&nbsp; operation&nbsp;&nbsp;<br />
 
'''native on:''' [[Cores|all]]<br />
 
'''native on:''' [[Cores|all]]<br />
 
</div>
 
</div>
Line 7:Line 7:
  
 
This is an optimization of the [[Instruction_Set/conform|conform]] operation used whenever the belt arguments don't need to be reordered. It only uses a bitmask to select which belt items to be saved to the front of the belt and thus is a much shorter encoding.<br />
 
This is an optimization of the [[Instruction_Set/conform|conform]] operation used whenever the belt arguments don't need to be reordered. It only uses a bitmask to select which belt items to be saved to the front of the belt and thus is a much shorter encoding.<br />
For this reason it is also more suitable to rescue belt items from falling off the end of the belt and be discarded within an [[EBB]] for the next instuction. There is no need to reorder the items for different targets, the ordering can be fully statically scheduled in the operand indices themselves for the one possible case.
+
For this reason it is also more suitable to rescue belt items from falling off the end of the belt and be discarded within an [[EBB]] for the next instruction. There is no need to reorder the items for different targets, the ordering can be fully statically scheduled in the operand indices themselves for the one possible case.
 +
 
 +
Rescue invalidates all values that are not rescued.
  
 
Since belt items further in the back are much more likely to need rescuing the bit mask to select the belt items to be moved to the front actually starts from the back of the belt to allow for smaller manifest constants.
 
Since belt items further in the back are much more likely to need rescuing the bit mask to select the belt items to be moved to the front actually starts from the back of the belt to allow for smaller manifest constants.
Line 14:Line 16:
  
 
----
 
----
<code style="font-size:130%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">args</span></i>) &#8594; [[Domains|ops]] r<sub>0</sub> ...</code>
+
<code style="font-size:130%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#constant|constant]]</span> <span title="manifest constant">args</span></i>) &#8594; [[Domains|ops]] 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>
Line 34:Line 36:
 
             constant">ops</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">ops</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">ops</span></i>)</code>
 
             constant">ops</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">ops</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">ops</span></i>)</code>
 
<br />
 
<br />
 +
'''encoding:'''
 +
<code style="font-size:100%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">args</span></i>)</code>
 +
,
 +
<code style="font-size:100%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">lit0</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">off0</span></i>)</code>
 +
,
 +
<code style="font-size:100%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">lit0</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">lit1</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest
 +
            constant">off0</span></i>)</code>
 +
,
 +
<code style="font-size:100%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">lit0</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">lit1</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">lit2</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">off0</span></i>)</code>
 +
<br />
 +
 
{| class="mw-collapsible mw-collapsed wikitable" data-expandtext="&#9656;" data-collapsetext="&#9662;"
 
{| class="mw-collapsible mw-collapsed wikitable" data-expandtext="&#9656;" data-collapsetext="&#9662;"
 
! [[Cores|Core]] || [[Slot|In Slots]]|| [[Latency|Latencies]]
 
! [[Cores|Core]] || [[Slot|In Slots]]|| [[Latency|Latencies]]
Line 39:Line 52:
 
| [[Cores/Tin/Encoding#rescue|Tin]] || F0 || 1
 
| [[Cores/Tin/Encoding#rescue|Tin]] || F0 || 1
 
|-
 
|-
| [[Cores/Copper/Encoding#rescue|Copper]] || F0 F1 || 1
+
| [[Cores/Copper/Encoding#rescue|Copper]] || F0 || 1
 
|-
 
|-
 
| [[Cores/Silver/Encoding#rescue|Silver]] || F0 F1 F2 || 1
 
| [[Cores/Silver/Encoding#rescue|Silver]] || F0 F1 F2 || 1
 
|-
 
|-
| [[Cores/Gold/Encoding#rescue|Gold]] || F0 F1 F2 F3 || 1
+
| [[Cores/Gold/Encoding#rescue|Gold]] || F0 || 1
|-
+
| [[Cores/Decimal8/Encoding#rescue|Decimal8]] || F0 F1 F2 || 1
+
|-
+
| [[Cores/Decimal16/Encoding#rescue|Decimal16]] || F0 F1 F2 || 1
+
 
|}
 
|}
  
 
----
 
----
<code style="font-size:130%"><b style="color:#050">rescue</b>(<span style="color:#009">[[Domains#ops|ops]]</span> <span title="one or more conform arguments from conforms window">args</span>) &#8594; [[Domains|ops]] r<sub>0</sub> ...</code>
+
<code style="font-size:130%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">args</span></i>) &#8594; [[Domains|ops]] 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>
Line 76:Line 85:
 
| [[Cores/Tin/Encoding#rescue|Tin]] || F0 || 1
 
| [[Cores/Tin/Encoding#rescue|Tin]] || F0 || 1
 
|-
 
|-
| [[Cores/Copper/Encoding#rescue|Copper]] || F0 F1 || 1
+
| [[Cores/Copper/Encoding#rescue|Copper]] || F0 || 1
 
|-
 
|-
 
| [[Cores/Silver/Encoding#rescue|Silver]] || F0 F1 F2 || 1
 
| [[Cores/Silver/Encoding#rescue|Silver]] || F0 F1 F2 || 1
 
|-
 
|-
| [[Cores/Gold/Encoding#rescue|Gold]] || F0 F1 F2 F3 || 1
+
| [[Cores/Gold/Encoding#rescue|Gold]] || F0 || 1
 +
|}
 +
 
 +
----
 +
<code style="font-size:130%"><b style="color:#050">rescue</b>() &#8594; [[Domains|ops]] r<sub>0</sub> ...</code>
 +
<div style="font-size:80%;line-height:90%;margin-bottom:2em">'''operands:''' [[Operands#likeInv|like Inv :]]
 +
</div>
 +
<br />
 +
 
 +
'''encoding:'''
 +
<code style="font-size:100%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">ops</span></i>, <i><span style="color:#009">[[Immediates#count|count]]</span> <span title="morsel-sized count of polyadic args">c</span></i>)</code>
 +
<br />
 +
'''encoding:'''
 +
<code style="font-size:100%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">ops</span></i>, <i><span style="color:#009">[[Immediates#count|count]]</span> <span title="morsel-sized count of polyadic args">c</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest
 +
            constant">ops</span></i>)</code>
 +
<br />
 +
'''encoding:'''
 +
<code style="font-size:100%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">ops</span></i>, <i><span style="color:#009">[[Immediates#count|count]]</span> <span title="morsel-sized count of polyadic args">c</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest
 +
            constant">ops</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">ops</span></i>)</code>
 +
<br />
 +
'''encoding:'''
 +
<code style="font-size:100%"><b style="color:#050">rescue</b>(<i><span style="color:#009">[[Immediates#off|off]]</span> <span title="manifest constant">ops</span></i>, <i><span style="color:#009">[[Immediates#count|count]]</span> <span title="morsel-sized count of polyadic args">c</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest
 +
            constant">ops</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">ops</span></i>, <i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">ops</span></i>)</code>
 +
<br />
 +
{| class="mw-collapsible mw-collapsed wikitable" data-expandtext="&#9656;" data-collapsetext="&#9662;"
 +
! [[Cores|Core]] || [[Slot|In Slots]]|| [[Latency|Latencies]]
 
|-
 
|-
| [[Cores/Decimal8/Encoding#rescue|Decimal8]] || F0 F1 F2 || 1
+
| [[Cores/Tin/Encoding#rescue|Tin]] || F0 || 1
 +
|-
 +
| [[Cores/Copper/Encoding#rescue|Copper]] || F0 || 1
 +
|-
 +
| [[Cores/Silver/Encoding#rescue|Silver]] || F0 F1 F2 || 1
 
|-
 
|-
| [[Cores/Decimal16/Encoding#rescue|Decimal16]] || F0 F1 F2 || 1
+
| [[Cores/Gold/Encoding#rescue|Gold]] || F0 || 1
 
|}
 
|}
  
  
 
[[Instruction_Set|Instruction Set, alphabetical]], [[Instruction Set by Category]], [http://millcomputing.com/instructions.html?collapse=7#ops Instruction Set, sortable, filterable]
 
[[Instruction_Set|Instruction Set, alphabetical]], [[Instruction Set by Category]], [http://millcomputing.com/instructions.html?collapse=7#ops Instruction Set, sortable, filterable]

Latest revision as of 13:24, 23 February 2021

speculable  flow stream  flow block  rescue phase   operation  

native on: all

Move belt items to the front of the belt.

This is an optimization of the conform operation used whenever the belt arguments don't need to be reordered. It only uses a bitmask to select which belt items to be saved to the front of the belt and thus is a much shorter encoding.
For this reason it is also more suitable to rescue belt items from falling off the end of the belt and be discarded within an EBB for the next instruction. There is no need to reorder the items for different targets, the ordering can be fully statically scheduled in the operand indices themselves for the one possible case.

Rescue invalidates all values that are not rescued.

Since belt items further in the back are much more likely to need rescuing the bit mask to select the belt items to be moved to the front actually starts from the back of the belt to allow for smaller manifest constants.

related operations: conform


rescue(constant args) → ops r0 ...

operands: like Inv :


encoding: rescue(off ops, count c)
encoding: rescue(off ops, count c, lit ops)
encoding: rescue(off ops, count c, lit ops, lit ops)
encoding: rescue(off ops, count c, lit ops, lit ops, lit ops)
encoding: rescue(off args) , rescue(off lit0, lit off0) , rescue(off lit0, lit lit1, lit off0) , rescue(off lit0, lit lit1, lit lit2, lit off0)

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

rescue(off args) → ops r0 ...

operands: like Inv :


encoding: rescue(off ops, count c)
encoding: rescue(off ops, count c, lit ops)
encoding: rescue(off ops, count c, lit ops, lit ops)
encoding: rescue(off ops, count c, lit ops, lit ops, lit ops)

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

rescue() → ops r0 ...

operands: like Inv :


encoding: rescue(off ops, count c)
encoding: rescue(off ops, count c, lit ops)
encoding: rescue(off ops, count c, lit ops, lit ops)
encoding: rescue(off ops, count c, lit ops, lit ops, lit ops)

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


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