Encoding:

MSA

011110

0100

df/n

rs

wd

ELM

011001

6

4

6

5

5

6

Format:

INSERT.df 

GPR Insert Element

INSERT.B wd[n],rs

MSA

GPR Insert Element

INSERT.H wd[n],rs

MSA

GPR Insert Element

INSERT.W wd[n],rs

MSA

GPR Insert Element

INSERT.D wd[n],rs

MIPS64, MSA

GPR Insert Element

Purpose:

GPR Insert Element

GPR value copied to vector element.

Description:

wd[n] = rs

Set element n in vector wd to GPR rs value. All other elements in vector wd are unchanged. If the source GPR is wider than the destination data format, the destination's elements will be set to the least significant bits of the GPR.

The operands and results are values in data format df.

Restrictions:

No data-dependent exceptions are possible.

Operation:

INSERT.B
   WR[wd]8n+7..8n = GPR[rs]7..0
INSERT.H
   WR[wd]16n+15..16n = GPR[rs]15..0
INSERT.W
   WR[wd]32n+31..32n = GPR[rs]31..0
INSERT.D
   WR[wd]64n+63..64n = GPR[rs]63..0

Exceptions:

Reserved Instruction Exception, MSA Disabled Exception.