32-Bit Instruction Set

ST8d

Store 8-Bit Data To Memory (Computed Byte-Pointer Address)

Operation:

Assembler Syntax: Example:

Not preceded by PFX:

bnMem32[align32(RA)] bnR0 where n = RA[1..0]

Preceded by PFX:

bnMem32[align32(RA + σ(K) × 4))] bnR0 where n = RA[1..0]

ST8d [%rA],%r0

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

2

32-Bit Instruction Set

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N

 

V

Z

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Altera Corporation

93

Page 105
Image 105
Excalibur electronic A-MNL-NIOSPROG-01.1 manual Store 8-Bit Data To Memory Computed Byte-Pointer Address, ST8d %rA,%r0