| (old) | htmldiff from- | (new) |
Move immediate value to Special Register moves an immediate value to selected bits of the PSTATE. For more information, see Process state, PSTATE.
The bits that can be written by this instruction are:
This instruction is used by the aliases SMSTART, and SMSTOP.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | op1 | 0 | 1 | 0 | 0 | CRm | op2 | 1 | 1 | 1 | 1 | 1 | |||||||
MSR <pstatefield>, #<imm>
if op1 == '000' && op2 == '000' then SEE "CFINV";
if op1 == '000' && op2 == '001' then SEE "XAFLAG";
if op1 == '000' && op2 == '010' then SEE "AXFLAG";
AArch64.CheckSystemAccess('00', op1, '0100', CRm, op2, '11111', '0');
bits(2) min_EL;
boolean need_secure = FALSE;
case op1 of
when '00x'
min_EL = EL1;
when '010'
min_EL = EL1;
when '011'
min_EL = EL0;
when '100'
min_EL = EL2;
when '101'
if !HaveVirtHostExt() then
UNDEFINED;
min_EL = EL2;
when '110'
min_EL = EL3;
when '111'
min_EL = EL1;
need_secure = TRUE;
if (UInt(PSTATE.EL) < UInt(min_EL) || (need_secure && CurrentSecurityState() != SS_Secure)) then
UNDEFINED;
PSTATEField field;
case op1:op2 of
when '000 011'
if !HaveUAOExt() then UNDEFINED;
field = PSTATEField_UAO;
when '000 100'
if !HavePANExt() then UNDEFINED;
field = PSTATEField_PAN;
when '000 101' field = PSTATEField_SP;
when '001 000'
case CRm of
when '000x'
if !HaveFeatNMI() then UNDEFINED;
field = PSTATEField_ALLINT;
when '001x'
if !IsFeatureImplemented(FEAT_EBEP) then UNDEFINED;
field = if ! HaveFeatEBEP() then UNDEFINED;
field = PSTATEField_PM;
otherwise
UNDEFINED;
when '011 010'
if !HaveDITExt() then UNDEFINED;
field = PSTATEField_DIT;
when '011 011'
case CRm of
when '001x'
if !HaveSME() then UNDEFINED;
field = PSTATEField_SVCRSM;
when '010x'
if !HaveSME() then UNDEFINED;
field = PSTATEField_SVCRZA;
when '011x'
if !HaveSME() then UNDEFINED;
field = PSTATEField_SVCRSMZA;
otherwise
UNDEFINED;
when '011 100'
if !HaveMTEExt() then UNDEFINED;
field = PSTATEField_TCO;
when '011 110' field = PSTATEField_DAIFSet;
when '011 111' field = PSTATEField_DAIFClr;
when '011 001'
if !HaveSSBSExt() then UNDEFINED;
field = PSTATEField_SSBS;
otherwise UNDEFINED;
// Check that an AArch64 MSR/MRS access to the DAIF flags is permitted
if PSTATE.EL == EL0 && field IN {PSTATEField_DAIFSet, PSTATEField_DAIFClr} then
if IsInHost() || SCTLR_EL1.UMA == '0' then
if EL2Enabled() && HCR_EL2.TGE == '1' then
AArch64.SystemAccessTrap(EL2, 0x18);
else
AArch64.SystemAccessTrap(EL1;
otherwise UNDEFINED;, 0x18);
| <pstatefield> |
Is a PSTATE field name. For the MSR instruction, this is
encoded in
|
| Alias | Is preferred when |
|---|---|
| SMSTART | op1 == '011' && CRm == '0xx1' && op2 == '011' |
| SMSTOP | op1 == '011' && CRm == '0xx0' && op2 == '011' |
case field of
when PSTATEField_SSBS
PSTATE.SSBS = CRm<0>;
when PSTATEField_SP
PSTATE.SP = CRm<0>;
when PSTATEField_DAIFSet
PSTATE.D = PSTATE.D OR CRm<3>;
PSTATE.A = PSTATE.A OR CRm<2>;
PSTATE.I = PSTATE.I OR CRm<1>;
PSTATE.F = PSTATE.F OR CRm<0>;
whenAArch64.CheckDAIFAccess(PSTATEField_DAIFSet);
PSTATE.D = PSTATE.D OR CRm<3>;
PSTATE.A = PSTATE.A OR CRm<2>;
PSTATE.I = PSTATE.I OR CRm<1>;
PSTATE.F = PSTATE.F OR CRm<0>;
when PSTATEField_DAIFClr
AArch64.CheckDAIFAccess(PSTATEField_DAIFClr);
PSTATE.D = PSTATE.D AND NOT(CRm<3>);
PSTATE.D = PSTATE.D AND NOT(CRm<3>);
PSTATE.A = PSTATE.A AND NOT(CRm<2>);
PSTATE.I = PSTATE.I AND NOT(CRm<1>);
PSTATE.F = PSTATE.F AND NOT(CRm<0>);
when PSTATEField_PAN
PSTATE.PAN = CRm<0>;
when PSTATEField_UAO
PSTATE.UAO = CRm<0>;
when PSTATEField_DIT
PSTATE.DIT = CRm<0>;
when PSTATEField_TCO
PSTATE.TCO = CRm<0>;
when PSTATEField_ALLINT
if (PSTATE.EL == EL1 && IsHCRXEL2Enabled() && HCRX_EL2.TALLINT == '1' && CRm<0> == '1') then
AArch64.SystemAccessTrap(EL2, 0x18);
PSTATE.ALLINT = CRm<0>;
when PSTATEField_SVCRSM
CheckSMEAccess();
SetPSTATE_SM(CRm<0>);
when PSTATEField_SVCRZA
CheckSMEAccess();
SetPSTATE_ZA(CRm<0>);
when PSTATEField_SVCRSMZA
CheckSMEAccess();
SetPSTATE_SM(CRm<0>);
SetPSTATE_ZA(CRm<0>);
when PSTATEField_PM
PSTATE.PM = CRm<0>;
Internal version only: isa v33.64v33.62, AdvSIMD v29.12, pseudocode v2023-06_relno_diffs_2023_06_RC2, sve v2023-06_relshoji_no_diff_2023_06_RC1
; Build timestamp: 2023-07-04T192023-06-23T19:4234
Copyright © 2010-2023 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.
| (old) | htmldiff from- | (new) |