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

下载
页码 122
Altera Corporation
93
32323232
32-Bit Instruction Set
2
3
2
-B
it In
st
ru
ctio
n
Se
t
ST8d
 Store 8-Bit Data To Memory (Computed Byte-Pointer Address)
Operation:
Not preceded by PFX:
bn
Mem32[align32(RA)]
bn
R0 where n = RA[1..0]
Preceded by PFX:    
bn
Mem32[align32(RA +
σ(K) × 4))] ←
bn
R0 where n = RA[1..0]
Assembler Syntax:
ST8d [%rA],%r0
Example:
Not preceded by PFX:
FILL8 %r0,%g7 ; duplicate low byte of %g7 across %r0
ST8d [%o3],%r0 ; store %o3[1..0]th byte from
               ; %r0 to [%o3]
               ; second operand can only be %r0
Preceded by PFX:
FILL8 %r0,%g3
PFX 5
ST8d [%o3],%r0 ; same as above, offset
               ; 20 bytes in memory
Description:
Not preceded by PFX:
Stores one of the four bytes of %r0 to memory at the byte-address given by RA. 
The two bits RA[1..0] select which byte in %r0 get stored (byte 3 is the most-
significant).
ST8d may be used in combination with FILL8 to implement a two-instruction byte-
store operation. Given a byte held in bits 7..0 of any register %rX, the following 
sequence writes this byte to memory at the byte-address given by RA:
FILL8 %r0,%rX
ST8d [%rA],%r0
Preceded by PFX:
The value in K is sign-extended and used as a word-scaled, signed offset. This 
offset is added to the base-address RA and data is written to the resulting byte-
address.
Condition Codes:
Flags: Unaffected
Instruction Format:
Rw
Instruction Fields:
A = Register index of operand RA
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0
1
1
1
1
1
1
0
0
0
0
A
N
V
Z
C