mrs

Move System Register

MRS <Xt>, <system_reg>

Moves system register to general-purpose register.

Details

Reads the value of a system register and copies it to the 64-bit general-purpose register Xt. No condition flags are affected. This is an AArch64-only instruction that requires appropriate privilege level (EL0 or higher depending on register access permissions) and generates an exception if the register is not accessible at the current privilege level.

Pseudocode Operation

Xt ← SystemRegister[imm15]

Example

MRS x3, system_reg

Encoding

Binary Layout
1101010100
1
1
o0
op1
CRn
CRm
op2
Rt
 
Format System
Opcode 0xD5300000
Extension System

Operands

  • Xt
    Transfer 64-bit integer register (load/store)
  • system_reg
    Sys Reg

Reference (Arm A64 ISA)

Instruction Forms

Encoding Instruction ISA Bit pattern
0xD5300000 MRS <Xt>, (<systemreg>|S<op0>_<op1>_<Cn>_<Cm>_<op2>) A64 1101010100 | 1 | 1 | o0 | op1 | CRn | CRm | op2 | Rt

Description

Move System Register to general-purpose register allows the PE to read an AArch64 System register into a general-purpose register.

Operation

AArch64.SysRegRead(sys_op0, sys_op1, sys_crn, sys_crm, sys_op2, t);