Excalibur electronic A-MNL-NIOSPROG-01.1 用户手册

下载
页码 122
Altera Corporation
61
32323232
32-Bit Instruction Set
2
3
2
-B
it In
st
ru
ctio
n
Se
t
LDS
Load 32-bit Data From Memory (Stack Addressing Mode)
Operation:
RA
← Mem32[align32(%sp + (IMM8 × 4))]
Assembler Syntax:
LDS %rA,[%sp,IMM8]
Example:
LDS %o1,[%sp,3] ; load %o1 from stack + 12
                ; second register can only be %sp
Description:
Loads a 32-bit data value from memory into RA. Data is always read from a word-
aligned address given by bits 31..2 of %sp (the two LSBs of %sp are ignored) plus 
an 8-bit, unsigned, word-scaled offset given by IMM8.
Conventionally, software uses %o6 (aka %sp) as a stack-pointer. LDS allows 
single-instruction access to any  data word at a known offset in a 1Kbyte range 
above %sp.
Condition Codes:
Flags: Unaffected
Instruction Format:
Ri8
Instruction Fields:
A = Register index of operand RA
IMM8 = 8-bit immediate value
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
 1
1
1
IMM8
A
N
V
Z
C