Appendix E. Instructions

Table of Contents
E.1. Common instructions
E.2. CRAY J90 and CRAY Y-MP specific instructions
E.3. CRAY C90 specific instructions
E.4. CRAY J90 specific instructions
E.5. CRAY T90 specific instructions
E.6. Bit Matrix multiply instructions
E.7. Special register values and logical operators

This appendix lists symbolic machine instructions for Cray PVP systems. The notes for Appendix E through Section E.7 are as follows:

> > > > > > > > > > > > > >
Notes 

Meaning

C 

Instruction is valid on CRAY C90 systems.

D 

Difference in operation between CRAY T90 mode and CRAY C90 mode.

E 

Generation depends on the value of exp.

F 

Functionality of instruction is different on CRAY T90 systems with IEEE floating-point hardware.

I 

Instruction is only valid on CRAY T90 systems with IEEE floating-point hardware.

J 

Instruction is valid on CRAY J90 systems.

M 

Privileged to monitor mode.

N 

New instruction.

R 

Revised instruction for IEEE floating-point format.

T 

Instruction is valid on CRAY T90 systems.

X 

Valid only on CRAY Y-MP systems running in X-mode (X-mode not available on CRAY C90 systems).

Y 

Instruction is valid on CRAY Y-MP systems running in Y-mode.

E.1. Common instructions

The instructions listed in Appendix E are available on Cray PVP systems as specified in the notes column. If the notes column is empty, the instruction is valid on all Cray PVP systems.

Table E-1. Table 17. Common symbolic machine instructions

Opcode

Notes

CAL

 

Unit

Function

000000

 

ERR

 

-

Error exit.

0010 jk

M

CA,A j

A k

-

Sets Current Address ( CA) register for channel indicated by ( A j) to the value specified in ( A k), activates channel.

001000

 

PASS

 

-

Pass instruction.

0011 jk

M

CL,A j

A k

_

Sets Channel Limit ( CL) register for channel specified by ( A j) to address specified by ( A k).

0012 j 0

M

CI,A j

 

_

Clears interrupt flag and error flag for channel specified by ( A j).

0012 j 1

M

MC,A j

 

_

Clears interrupt and error flags for channel indicated by ( A j). If ( A j) represents an output channel, sets device master clear. If ( A j) represents an input channel, clears device ready-held.

0013 j 0

M

XA

A j

_

Enters XA register with ( A j).

0014 j 0

M

RT

S j

-

Loads RTC register with ( S j).

0014 j 1

M

SIPI

A j

-

Sets interprocessor interrupt request to CPU ( A j); 03 ( A j)3 7 on CRAY Y-MP systems.

001401

M

SIPI

 

-

Sets interprocessor interrupt request of CPU 0.

001402

M

CIPI

 

-

Clears interprocessor interrupt.

0014 j 3

M

CLN

A j

-

Loads Cluster Number ( CLN) register with ( A j); 0 < ( A j) < 9 10 on CRAY Y-MP systems, 0 < ( A j) < 17 10 on CRAY C90 systems.

0014 j 4

M

PCI

S j

-

Loads Interrupt Interval (II) register with ( S j).

001405

M

CCI

 

-

Clears clock interrupt.

001406

M

ECI

 

-

Enables programmable clock interrupt.

001407

M

DCI

 

-

Disables programmable clock interrupt.

001500

M,C,J, Y

  

-

Clears all performance monitor counters.

00200 k

 

VL

A k

-

Transmits ( A k) to VL (maximum VL = 128 in C90-mode, 64 in Y-mode).

002000

 

VL

1

-

Enters 1 into VL.

002100

 

EFI

 

-

Enables interrupt on floating-point error.

002200

 

DFI

 

-

Disables interrupt on floating-point error.

002300

 

ERI

 

-

Enables interrupt on operand range error.

002400

 

DRI

 

-

Disables interrupt on operand range error.

002500

 

DBM

 

-

Disables bidirectional memory transfers.

002600

 

EBM

 

-

Enables bidirectional memory transfers.

002700

 

CMR

 

-

Completes memory references.

0030 j 0

 

VM

S i

-

Transmits ( S j) to VM register.

003000

 

VM

0

-

Clears VM register.

0034 jk

 

SM jk

1,TS

-

Tests and sets semaphore jk, 0 < jk37 8. (Bit 2 2 of j=0.)

0036 jk

 

SM jk

0

-

Clears semaphore jk, 0 < jk37 8. (Bit 2 2 of j=0.)

0037 jk

 

SM jk

1

-

Sets semaphore jk, 0 < jk37 8. (Bit 2 2 of j=0.)

004000

 

EX

 

-

Normal exit.

0050 jk

 

J

B jk

-

Jumps to ( B jk).

006 ijkm

 

J

exp

-

Jumps to exp.

007 ijkm

C,J,Y

R

exp

-

Return jump to exp; set B00 to ( P)+2.

010 ijkm

C,J,Y

JAZ

exp

-

Jumps to exp if ( A0)=0.

011 ijkm

C,J,Y

JAN

exp

-

Jumps to exp if ( A0) ≠ 0.

012 ijkm

C,J,Y

JAP

exp

-

Jumps to exp if ( A0) positive; includes ( A0)=0.

013 ijkm

C,J,Y

JAM

exp

-

Jumps to exp if ( A0) negative.

014 ijkm

C,J,Y

JSZ

exp

-

Jumps to exp if ( S0)=0.

015 ijkm

C,J,Y

JSN

exp

-

Jumps to exp if ( S0) ≠ 0.

016 ijkm

C,J,Y

JSP

exp

-

Jumps to exp if ( S0) positive; includes ( S0)=0.

017 ijkm

C,J,Y

JSM

exp

-

Jumps to exp if ( S0) negative.

020 i 00 nm

E

A i

exp

-

Transmits exp to A i.

021 i 00 nm

 

A i

exp

-

Transmits ones complement of exp to A i.

022 ijk

E

A i

exp

-

Transmits exp to A i.

023 ij 0

 

A i

S j

-

Transmits ( S j) to A i.

023 i 01

 

A i

VL

-

Transmits ( VL) to A i.

024 ijk

 

A i

B jk

-

Transmits ( B jk) to A i.

025 ijk

 

B jk

A i

-

Transmits ( A i) to B jk.

026 ij 0

 

A i

PS j

Pop/LZ

Population count of ( S j) to A i.

026 ij 1

 

A i

QS j

Pop/LZ

Population count parity of ( S j) to A i.

026 ij 7

 

A i

SB j

-

Transmits ( SB j) to A i.

027 ij 0

 

A i

ZS j

Pop/LZ

Leading zero count of ( S j) to A i.

027 ij 7

 

SB j

A i

-

Transmits ( A i) to SB j.

030 ijk

 

A i

A j +A k

A Int Add

Integer sum of ( A j) and ( A k) to A i.

030 ij 0

 

A i

A j +1

A Int Add

Integer sum of ( A j) and 1 to A i.

030 i 0 k

 

A i

A k

A Int Add

Transmits ( A k) to A i.

031 ijk

 

A i

A j -A k

A Int add

Integer difference of ( A j) less ( Ak) to A i.

031 ij 0

 

A i

A j -1

A Int Add

Integer difference of ( A j) less 1 to A i.

031 i 00

 

A i

-1

A Int Add

Enters -1 into A i.

031 i 0 k

 

A i

-A k

A Int Add

Transmits the negative of ( A k) to A i.

032 ijk

 

A i

A j *A k

A Int Mult

Integer product of ( A j) and ( A k) to A i.

033 i 00

 

A i

CI

-

Channel number of highest priority interrupt request to A i.

033 ij 0

 

A i

CA,A j

-

Address of channel ( A j) to A i ( j≠ 0).

033 ij 1

 

A i

CE,Aj

-

Error flag of channel ( A j) to A i ( j≠ 0, k=1); if C90 mode, include Done flag.

034 ijk

 

B jk ,A i

,A0

Memory

Loads ( A i) words from memory starting at address ( A0) to B registers starting at register jk.

034 ijk

 

B jk ,A i

0,A0

Memory

Loads ( A i) words from memory starting at address ( A0) to B registers starting at register jk.

035 ijk

 

,A0

B jk ,A i

Memory

Stores ( A i) words from B registers starting at register jk to memory starting at address ( A0).

035 ijk

 

0,A0

B jk ,A i

Memory

Stores ( A i) words from B registers starting at register jk to memory starting at address ( A0).

036 ijk

 

T jk ,A i

,A0

Memory

Loads ( A i) words from memory starting at address ( A0) to T registers starting at register jk.

036 ijk

 

T jk ,A i

0,A0

Memory

Loads ( A i) words from memory starting at address ( A0) to T registers starting at register jk.

037 ijk

 

,A0

T jk ,A i

Memory

Stores ( A i) words from T registers starting at register jk to memory starting at address ( A0).

037 ijk

 

0,A0

T jk ,A i

Memory

Stores ( A i) words from T registers starting at register jk to memory starting at address ( A0).

040 i 00 nm

 

S i

exp

-

Enters exp into S i.

041 i 00 nm

 

S i

# exp

-

Enter ones complement of exp into S i.

041 i 00 nm

 

S i

- exp

-

Enters twos complement of exp into S i.

042 ijk

 

S i

< exp

Logical

Forms ones mask in S i exp bits from the right; jk field gets 64 - exp.

042 ijk

 

S i

#> exp

Logical

Forms zeros mask in S i exp bits from the left; jk field gets exp.

042 i 77

 

S i

1

Logical

Enters 1 into S i.

042 i 00

 

S i

-1

Logical

Enters -1 into S i.

043 i 00

 

S i

0

Logical

Clears S i.

043 ijk

 

S i

> exp

Logical

Forms ones mask in S i, exp bits from the left; jk field gets exp.

043 ijk

 

S i

#< exp

Logical

Forms zeros mask in S i, exp bits from the right; jk field gets 64 - exp.

044 ijk

 

S i

S j &S k

Logical

Logical product of ( S j) and ( S k) to S i.

044 ij 0

 

S i

S j &SB

Logical

Sign bit of ( S j) to S i; j≠ 0 .

044 ij 0

 

S i

SB&S j

Logical

Sign bit of ( S j) to S i; j≠ 0.

045 ijk

 

S i

#S k &S j

Logical

Logical product of ( S j) and ones complement of ( S k) to S i.

045 ij 0

 

S i

#SB&S j

Logical

( S j) with sign bit cleared to S i.

046 ijk

 

S i

S j \S k

Logical

Logical difference of ( S j) and ( S k) to S i.

046 ij 0

 

S i

S j \SB

Logical

Enters ( S j) into S i with sign bit toggled; j≠ 0.

046 ij 0

 

S i

SB\S j

Logical

Enters ( S j) into S i with sign bit toggled; j≠ 0.

047 ijk

 

S i

#S j \S k

Logical

Logical equivalence of ( S j) and ( S k) to S i.

047 ij 0

 

S i

#S j \SB

Logical

Logical equivalence of ( S j) and sign bit to S i; j≠ 0 .

047 ij 0

 

Si

#SB\S j

Logical

Logical equivalence of sign bit and ( S j) to S i; j≠ 0.

047 i 0 k

 

S i

#S k

Logical

Transmits ones complement of ( S k) to S i.

047 i 00

 

S i

#SB

Logical

Enters ones complement of sign bit into S i.

050 ijk

 

S i

S j !S i &S k

Logical

Scalar merge of ( S i) and ( S j) to S i.

050 ij 0

 

S i

S j !S i &SB

Logical

Scalar merge of ( S i) and sign bit of ( S j) to S i.

051 ijk

 

S i

S j !S k

Logical

Logical sum of ( S j) and ( S k) to S i.

051 ij 0

 

S i

S j !SB

Logical

Logical sum of ( S j) and sign bit to S i; j≠ 0 .

051 ij 0

 

S i

SB!S j

Logical

Logical sum of sign bit and ( S j) to S i; j≠ 0.

051 i 0k

 

S i

S k

Logical

Transmits ( S k) to S i.

051 i 00

 

S i

SB

Logical

Enters sign bit into S i.

052 ijk

 

S0

S i < exp

Shift

Shifts ( S i) left exp places to S0.

053 ijk

 

S0

S i > exp

Shift

Shifts ( S i) right exp places to S0.

054 ijk

 

S i

S i < exp

Shift

Shifts ( S i) left exp places to S i.

055 ijk

 

S i

S i > exp

Shift

Shifts ( S i) right exp places to S i.

056 ijk

 

S i

S i ,S j <A k

Shift

Shifts ( S i) and ( S j) left ( A k) places to S i.

056 ij 0

 

S i

S i ,S j < 1

Shift

Shifts ( S i) and ( S j) left one place to S i.

056 i 0 k

 

S i

S i <A k

Shift

Shifts ( S i) left ( A k) places to S i.

057 ijk

 

S i

S j ,S i >A k

Shift

Shifts ( S j) and ( S i) right ( A k) places to S i.

057 ij 0

 

S i

S j ,S i >1

Shift

Shifts ( S j) and ( S i) right one place to S i.

057 i 0 k

 

S i

S i >A k

Shift

Shifts ( S i) right ( A k) places to S i.

060 ijk

 

S i

S j +S k

Int Add

Integer sum of ( S j) and ( S k) to S i.

060 ij 0

C,Y

S i

S j +S0

Int Add

Integer sum of ( S j) and the sign bit to S i.

061 ijk

 

S i

S j -S k

Int Add

Integer difference of ( S j) less ( S k) to S i.

061 ij 0

C,Y

S i

S j -S0

Int Add

Integer difference of ( S j) less the sign bit to S i.

061 i 0 k

 

S i

-S k

Int Add

Transmits negative of ( S k) to S i.

062 ijk

 

S i

S j +FS k

Fp Add

Floating-point sum of ( S j) and ( S k) to S i.

062 i 0 k

 

S i

+FS k

Fp Add

Normalizes ( S k) to S i.

063 ijk

 

S i

S j -FS k

Fp Add

Floating-point difference of ( S j) less ( S k) to S i.

063 i 0 k

 

S i

-FS k

Fp Add

Transmits the negative of ( S k) as a normalized floating-point value to S i.

064 ijk

 

S i

S j *FS k

Fp Mult

Floating-point product of ( S j) and ( S k) to S i.

065 ijk

 

S i

S j *HS k

Fp Mult

Half-precision, rounded, floating-point product of ( S i) and ( S k) to S i.

066 ijk

 

S i

S j *RS k

Fp Mult

Rounded, floating-point product of ( S j) and ( S k) to S i.

067 ijk

 

S i

S j *IS k

Fp Mult

2 minus floating-point product of ( S j) and ( S k) to S i.

070 ij 0

 

S i

/HS j

Fp Rcpl

Floating-point reciprocal approximation of ( S j) to S i.

071 i 0 k

 

S i

A k

-

Transmits ( A k) to S i with no sign extension.

071 i 1 k

 

S i

+A k

-

Transmits ( A k) to S i with sign extension.

071 i 2 k

 

S i

+FA k

-

Transmits ( A k) to S i as an unnormalized floating-point value.

071 i 30

 

S i

0. 6

-

Transmits 0. 75*(2 48) to S i as a normalized floating-point constant.

071 i 40

 

S i

0. 4

-

Transmits 0. 5 to S i as a normalized floating-point constant.

071 i 50

 

S i

1.

-

Transmits 1. 0 to S i as a normalized floating-point constant.

071 i 60

 

S i

2.

-

Transmits 2. 0 to S i as a normalized floating-point constant.

071 i 70

 

S i

4.

-

Transmits 4. 0 to S i as a normalized floating-point constant.

072 i 00

 

S i

RT

-

Transmits ( RTC) to S i.

072 i 02

 

S i

SM

-

Transmits semaphores to S i.

072 ij 3

 

S i

ST j

-

Transmits ( ST j) register to S i.

073 i 00

 

S i

VM

-

Transmits ( VM) to S i.

073 i 02

 

SM

S i

-

Loads semaphores from S i.

073 i 01

 

S i

SR0

-

Transmits ( SR0) to S i. This is the only form of the SR j syntax valid on CRAY Y-MP systems.

073 i 05

 

SR0

S i

-

Transmits ( S i) bits 2 48 through 2 52 to SR0.

073 i 21

M,C,Y

S i

SR2

-

Reads PM counters 00 through 17 and increment pointer. If in Y-mode, increments performance counter.

073 i 31

M,C,Y

S i

SR3

-

Reads PM counters 20 through 37 and increment pointer. If in Y-mode, clears all maintenance modes.

074 ijk

 

S i

T jk

-

Transmits ( T jk) to S i.

075 ijk

 

T jk

S i

-

Transmits ( S i) to T jk.

076 ijk

 

S i

V j ,A k

-

Transmits ( V j , element ( A k)) to S i.

077 ijk

 

V i ,A k

S j

-

Transmits ( S j) to V i element ( A k).

077 i 0 k

 

V i ,A k

0

-

Clears element ( A k) of register V i.

100 i 00 nm

 

A i

exp ,0

Memory

Loads from ( exp) to A i.

100 i 00 nm

 

A i

exp ,

Memory

Loads from ( exp) to A i.

10 hi 0000

 

A i

,A h

Memory

Loads from ( Ah) to Ai.

11 hi 00 nm

 

exp ,A h

A i

Memory

Stores ( A i) to ( A h)+ exp; A hp 0.

110 i 00 nm

 

exp ,0

A i

Memory

Stores ( A i) to exp.

110 i 00 nm

 

exp ,

A i

Memory

Stores ( A i) to exp.

11 hi 0000

 

,A h

A i

Memory

Stores ( A i) to ( A h).

12 hi 00 nm

 

S i

exp ,A h

Memory

Loads from (( A h)+ exp) to S i; A hp 0.

120 i 00 nm

 

S i

exp ,0

Memory

Loads from ( exp) to S i.

120 i 00 nm

 

S i

exp ,

Memory

Loads from ( exp) to S i.

12 hi 0000

 

S i

,A h

Memory

Loads from ( A h) to S i.

13 hi 00 nm

 

exp ,A h

S i

Memory

Stores ( S i) to ( A h)+ exp; A hp 0.

130 i 00 nm

 

exp ,0

S i

Memory

Stores ( S i) to exp.

130 i 00 nm

 

exp ,

S i

Memory

Stores ( S i) to exp.

13 hi 0000

 

,A h

S i

Memory

Stores ( S i) to ( A h).

140 ijk

 

V i

S j &V k

Logical

Logical products of ( S j) and ( V k) to V i.

141 ijk

 

V i

V j &V k

Logical

Logical products of ( V j) and ( V k) to V i.

142 ijk

 

V i

S j !V k

Logical

Logical sums of ( S j) and ( V k) to V i.

142 i 0 k

 

V i

V k

Logical

Transmits ( V k) to V i.

143 ijk

 

V i

V j !V k

Logical

Logical sums of ( V j) and ( V k) to V i.

144 ijk

 

V i

S j \V k

Logical

Logical differences of ( S j) and ( V k) to V i.

145 ijk

 

V i

V j \V k

Logical

Logical differences of ( V j) and ( V k) to V i.

145 iii

 

V i

0

Logical

Clears V i.

146 ijk

 

V i

S j !V k &VM

Logical

Vector merge of ( S j) and ( V k) to V i.

146 i 0 k

 

V i

#VM&V k

Logical

Vector merge of ( V k) and zero to V i.

147 ijk

 

V i

V j !V k &VM

Logical

Vector merge of ( V j) and ( V k) to V i.

150 ijk

 

V i

V j < A k

Shift

Shifts ( V j) left ( A k) places to V i.

150 ij 0

 

V i

V j <1

Shift

Shifts ( V j) left one place to V i.

151 ijk

 

V i

V j >A k

Shift

Shifts ( V j) right ( A k) places to V i.

151 ij 0

 

V i

V j >1

Shift

Shifts ( V j) right one place to V i.

152 ijk

 

V i

V j ,V j <A k

Shift

Double-shifts ( V j) left ( A k) places to V i.

152 ij 0

 

V i

V j ,V j <1

Shift

Double-shifts ( V j) left one place to V i.

153 ijk

 

V i

V j ,V j >A k

Shift

Double-shifts ( V j) right ( A k) places to V i.

153 ij 0

 

V i

V j ,V j >1

Shift

Double-shifts ( V j) right one place to V i.

154 ijk

 

V i

S j +V k

Int Add

Integer sums of ( S j) and ( V k) to V i.

155 ijk

 

V i

V j +V k

Int Add

Integer sums of ( V j) and ( V k) to V i.

156 ijk

 

V i

S j -V k

Int Add

Integer differences of ( S j) and ( V k) to V i.

156 i 0 k

 

V i

-V k

Int Add

Transmits twos complement of ( V k) to V i

157 ijk

 

V i

V j -V k

Int Add

Integer differences of ( V j) less ( V k) to V i.

160 ijk

 

V i

S j *FV k

Fp Mult

Floating-point products of ( S j) and ( V k) to V i.

161 ijk

 

V i

V j *FV k

Fp Mult

Floating-point products of ( V j) and ( V k) to V i.

162 ijk

 

V i

S j *HV k

Fp Mult

Half-precision, rounded, floating-point products of ( S j) and ( V k) to V i.

163 ijk

 

V i

V j *HV k

Fp Mult

Half-precision, rounded, floating-point products of ( V j) and ( V k) to V i.

164 ijk

 

V i

S j *RV k

Fp Mult

Rounded floating-point products of ( S j) and ( V k) to V i.

165 ijk

 

V i

V j *RV k

Fp Mult

Rounded floating-point products of ( V j) and ( V k) to V i.

166 ijk

 

V i

S j *V k

Fp Mult

32-bit integer product of ( S j) and ( V k) to V i.

167 ijk

 

V i

V j *IV k

Fp Mult

Two minus floating-point products of ( V j) and ( V k) to V i.

170 ijk

 

V i

S j +FV k

Fp Add

Floating-point sums of ( S j) and ( V k) to V i.

170 i 0 k

 

V i

+FV k

Fp Add

Normalizes ( V k) to V i.

171 ijk

 

V i

V j +FV k

Fp Add

Floating-point sums of ( V j) and ( V k) to V i.

172 ijk

 

V i

S j -FV k

Fp Add

Floating-point differences of ( S j) less ( V k) to V i.

172 i 0 k

 

V i

-FV k

Fp Add

Transmits normalized negative of ( V k) to V i.

173 ijk

 

V i

V j -FV k

Fp Add

Floating-point differences of ( V j) less ( V k) to V i.

174 ij 0

 

V i

/HV j

Fp Rcpl

Floating-point reciprocal approximations of ( V j) to V i.

174 ij 1

 

V i

PV j

V Pop

Population count of ( V j) to V i.

174 ij 2

 

V i

QV j

V Pop

Population count parities of ( V j) to V i.

1750 j 0

 

VM

V j ,Z

V Logical

Sets VM bits for zero elements of V j.

1750 j 1

 

VM

V j ,N

V Logical

Sets VM bits for nonzero elements of V j.

1750 j 2

 

VM

V j ,P

V Logical

Sets VM bits for positive elements of V j.

1750 j 3

 

VM

V j ,M

V Logical

Sets VM bits for negative elements of V j.

175 ij 4

 

V i ,VM

V j ,Z

V Logical

Sets VM bits for zero elements of V j, and register V i to the compressed indices of V j for zero elements of V j.

175 ij 5

 

V i ,VM

V j ,N

V Logical

Sets VM bits for nonzero elements of V j, and register V i to the compressed indices of V j for nonzero elements of V j.

175 ij 6

 

Vi ,VM

V j ,P

V Logical

Sets VM bits for positive elements of V j, and register V i to the compressed indices of V j for positive elements of V j.

175 ij 7

 

V i ,VM

V j ,M

V Logical

Sets VM bits for negative elements of V j, and register V i to the compressed indices of V j for negative elements of V j.

176 i 0 k

 

V i

,A0,A k

Memory

Loads ( VL) words from memory starting at ( A0) incrementing by ( A k) and load into V i.

176 i 00

 

V i

,A0,1

Memory

Loads ( VL) words from consecutive memory addresses starting with ( A0) and load into V i.

176 i 1 k

 

V i

,A0,V k

Memory

Reads ( VL) words to V i from ( A0) + ( V k)

1770 jk

 

,A0,A k

V j

Memory

Stores ( VL) words from ( V j) to memory starting at ( A0) incrementing by ( A k).

1770 j 0

 

,A0,1

V j

Memory

Stores ( V j) to memory in consecutive addresses starting with ( A0).

1771 jk

 

,A0,V k

V j

Memory

Stores ( VL) words from V j to ( A0) + ( V k).