Excalibur electronic A-MNL-NIOSPROG-01.1 Sts, Store 32-bit Data To Memory Stack Addressing Mode

Models: A-MNL-NIOSPROG-01.1

1 122
Download 122 pages 44.67 Kb
Page 108
Image 108

32-Bit Instruction Set

STS

Store 32-bit Data To Memory (Stack Addressing Mode)

Operation:

 

 

 

 

Mem32[align32(%sp + (IMM8 × 4))] RA

 

 

 

 

 

 

 

Assembler Syntax:

 

 

STS [%sp,IMM8],%rA

 

 

 

 

 

 

 

 

Example:

 

 

 

 

STS [%sp,17],%i5 ; store %i5 at stack + 68

 

 

 

 

 

 

 

 

 

 

 

 

 

 

; first register can only be %sp

 

 

Description:

 

 

 

 

Stores the 32-bit value in RA to memory. Data is always written to 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. STS allows

 

 

 

 

 

 

single-instruction access to any data word at a known offset in a 1Kbyte range

 

 

 

 

 

 

above %sp.

 

 

 

 

 

 

 

 

 

 

 

Condition Codes:

 

 

Flags: Unaffected

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N

V

Z

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction Format:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ri8

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction Fields:

 

 

A = Register index for 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

0

 

 

 

 

 

 

IMM8

 

 

 

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

96

Altera Corporation

Page 108
Image 108
Excalibur electronic A-MNL-NIOSPROG-01.1 manual Sts, Store 32-bit Data To Memory Stack Addressing Mode, STS %sp,IMM8,%rA