mtvsrd

Move To VSR Doubleword

mtvsrd XT, RA

Moves 64 bits from a GPR to a VSR.

Details

Moves a 64-bit value from general-purpose register RA into the left-most doubleword element of VSX register XT. The entire 64-bit content of RA is copied to bits 0-63 of the target VSX register; the right doubleword element (bits 64-127) is left undefined. This VSX extension instruction does not affect condition registers.

Pseudocode Operation

XT[0:63] ← RA
XT[64:127] ← undefined

Programming Note

The mtvsrd instruction is commonly used to transfer data from a general-purpose register to the first doubleword of a vector-scalar register. Ensure that the appropriate privilege level (FP or VEC) is enabled in the MSR register, otherwise, an exception will be raised. Note that the second doubleword of the VSR is zeroed out during this operation.

Example

mtvsrd vs1, r4

Encoding

Binary Layout
31
0
XT
6
RA
11
0
16
179
21
 
Format XX1-form
Opcode 0x7C000166
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target VSR
  • RA
    Source GPR