mr

Move Register

mr RA, RS

Copies contents of RS to RA. (Alias for 'or RA, RS, RS').

Encoding

Binary Layout
31
0:5
RS
6:10
RA
11:15
RS
16:20
444
21:30
/
31
 
Format X-form
Opcode 0x7C000378
Extension Base

Operands

  • RA
    Target
  • RS
    Source

Example

mr r4, r3

Related

More in Base

Reference

Description

Move Register. Extended mnemonic for OR (or RA,RS,RS). Copies the contents of register RS into register RA.

Operation

RA ← RS

Programming Note

The `mr` instruction is commonly used to copy values between general-purpose registers. It does not require any special alignment or privilege level. However, be cautious when using this instruction in performance-critical sections as it may introduce pipeline stalls if the destination register is already in use.