MSR (register)
Move general-purpose register to System register
This instruction allows the PE to write an
AArch64 System register from a general-purpose register.
1
1
0
1
0
1
0
1
0
0
0
1
MSR (<systemreg>|S<op0>_<op1>_<Cn>_<Cm>_<op2>), <Xt>
AArch64.CheckSystemAccess('1':o0, op1, CRn, CRm, op2, Rt, L);
constant integer t = UInt(Rt);
constant integer sys_op0 = 2 + UInt(o0);
constant integer sys_op1 = UInt(op1);
constant integer sys_op2 = UInt(op2);
constant integer sys_crn = UInt(CRn);
constant integer sys_crm = UInt(CRm);
<systemreg>
Is a System register name, encoded in "o0:op1:CRn:CRm:op2".
The System register names are defined in 'AArch64 System Registers' in the System Register XML.
<op0>
Is an unsigned immediate,
<op1>
Is a 3-bit unsigned immediate, in the range 0 to 7, encoded in the "op1" field.
<Cn>
Is a name 'Cn', with 'n' in the range 0 to 15, encoded in the "CRn" field.
<Cm>
Is a name 'Cm', with 'm' in the range 0 to 15, encoded in the "CRm" field.
<op2>
Is a 3-bit unsigned immediate, in the range 0 to 7, encoded in the "op2" field.
<Xt>
Is the 64-bit name of the general-purpose source register, encoded in the "Rt" field.
AArch64.SysRegWrite(sys_op0, sys_op1, sys_crn, sys_crm, sys_op2, t);