Difference between revisions of "Instruction Set/lea"

From Mill Computing Wiki
Jump to: navigation, search
m (Protected "Instruction Set/lea": generated ([Edit=<protect-level-bot>] (indefinite) [Move=<protect-level-bot>] (indefinite)))
Line 6:Line 6:
 
Load Effective Address.
 
Load Effective Address.
  
Allows you to do address arithmetic the same way the [[Instruciton_Set/load|load]] and [[Instruciton_Set/store|store]] operations, and to some degree the [[Instruciton_Set/call|call]] and [[Instruciton_Set/inner|inner]] operation, do.<br />
+
Allows you to do address arithmetic the same way the [[Instruction_Set/load|load]] and [[Instruction_Set/store|store]] operations, and to some degree the [[Instruction_Set/call|call]] and [[Instruction_Set/inner|inner]] operation, do.<br />
 
Produces pointers that in turn can then be used as base pointers for loads, stores and calls.
 
Produces pointers that in turn can then be used as base pointers for loads, stores and calls.
 +
 +
There are several different addressing modes. The general formula for computing addresses is
 +
<code>base+offset+(scale*index)</code>.<br />
 +
Base can come from a number of special [[Register]]s or the belt. Offset is always an inline constant. Those two are always present, although a zero offset doesn't take any space at all.<br />
 +
Scale and index are optional and alway appear together. The scale is a compile time constant, the index is always from the belt.
 +
 +
<b>related operations:</b>  [[Instruction_Set/load|load]], [[Instruction_Set/store|store]], [[Instruction_Set/loadf|loadf]], [[Instruction_Set/loadd|loadd]], [[Instruction_Set/call|call]], [[Instruction_Set/inner|inner]]
  
 
----
 
----

Revision as of 23:33, 20 January 2015

realizing  flow stream  flow block  compute phase   operation  

native on: all

Load Effective Address.

Allows you to do address arithmetic the same way the load and store operations, and to some degree the call and inner operation, do.
Produces pointers that in turn can then be used as base pointers for loads, stores and calls.

There are several different addressing modes. The general formula for computing addresses is base+offset+(scale*index).
Base can come from a number of special Registers or the belt. Offset is always an inline constant. Those two are always present, although a zero offset doesn't take any space at all.
Scale and index are optional and alway appear together. The scale is a compile time constant, the index is always from the belt.

related operations: load, store, loadf, loadd, call, inner


lea(base b, off o)

operands: like Inv :


Core In Slots Latencies
Tin F0 2
Copper F0 F1 2
Silver F0 F1 F2 F3 2
Gold F0 F1 F2 F3 F4 F5 F6 F7 2
Decimal8 F0 F1 F2 F3 2
Decimal16 F0 F1 F2 F3 2

lea(base b, off o, u i, scale s)

operands: like Inv :


Core In Slots Latencies
Tin F0 2
Copper F0 F1 2
Silver F0 F1 F2 F3 2
Gold F0 F1 F2 F3 F4 F5 F6 F7 2
Decimal8 F0 F1 F2 F3 2
Decimal16 F0 F1 F2 F3 2

lea(p b, off o) → op r0

operands: like AllocStack xx:p


Core In Slots Latencies
Tin F0 2
Copper F0 F1 2
Silver F0 F1 F2 F3 2
Gold F0 F1 F2 F3 F4 F5 F6 F7 2
Decimal8 F0 F1 F2 F3 2
Decimal16 F0 F1 F2 F3 2

lea(p b, off o, u i, scale s)

operands: like Inv :


Core In Slots Latencies
Tin F0 2
Copper F0 F1 2
Silver F0 F1 F2 F3 2
Gold F0 F1 F2 F3 F4 F5 F6 F7 2
Decimal8 F0 F1 F2 F3 2
Decimal16 F0 F1 F2 F3 2

lea(lbl l)

operands: like Inv :


Core In Slots Latencies
Tin F0 2
Copper F0 F1 2
Silver F0 F1 F2 F3 2
Gold F0 F1 F2 F3 F4 F5 F6 F7 2
Decimal8 F0 F1 F2 F3 2
Decimal16 F0 F1 F2 F3 2


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