32-Bit Instruction Set

EXT8s

Byte-Extract (Static)

Operation:

RA (0x00.00.00 : bnRA) where n = IMM2

Assembler Syntax:

EXT8s %rA,IMM2

Example:

EXT8s %g6,3 ; %g6 gets the 3rd byte of itself

Description:

Extracts one of the four bytes in RA. The byte to-be-extracted is chosen by the

 

immediate value IMM2 (byte 3 being the most-significant byte of RA). The

 

selected byte is written into bits 7..0 of RA, and the more-significant bits 31..8 are

 

set to zero.

Condition Codes:

 

 

Flags: Unaffected

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N

V

Z

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction Format:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Ri2u

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instruction Fields:

 

 

A = Register index of operand RA

 

 

 

 

 

 

 

 

 

 

 

 

 

IMM2

= 2-bit immediate value

 

 

 

 

 

 

 

15

14

13

 

12

11

 

 

10

 

9

8

7

 

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

1

1

 

1

0

 

 

1

 

0

 

0

0

 

 

IMM2

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

50

Altera Corporation

Page 62
Image 62
Excalibur electronic A-MNL-NIOSPROG-01.1 manual Byte-Extract Static, EXT8s %rA,IMM2