Excalibur electronic A-MNL-NIOSPROG-01.1 DJ Equipment User Manual


 
Altera Corporation 93
3232323232-Bit Instruction Set
2
32-Bit Instruction
Set
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
1514131211109876543210
01111110000 A
NVZC
−−−−