Branches, exception generating and system instructions
fixed bit field field the encoding fixes should be
| 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 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | CRm | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | |||
| opc | |||||||||||||||||||||||||||||||
11010101000000110011xxxx10011111
let nXS : bool = false;
alias : DSBAlias = undefined;
match CRm {
0b0000 => {
alias = DSBAlias_SSBB
},
0b0100 => {
alias = DSBAlias_PSSBB
},
_ => {
alias = DSBAlias_DSB
}
};
let alias = alias;
domain : MBReqDomain = undefined;
match CRm[3 .. 2] {
0b00 => {
domain = MBReqDomain_OuterShareable
},
0b01 => {
domain = MBReqDomain_Nonshareable
},
0b10 => {
domain = MBReqDomain_InnerShareable
},
0b11 => {
domain = MBReqDomain_FullSystem
}
};
types : MBReqTypes = undefined;
match CRm[1 .. 0] {
0b00 => {
types = MBReqTypes_All;
domain = MBReqDomain_FullSystem
},
0b01 => {
types = MBReqTypes_Reads
},
0b10 => {
types = MBReqTypes_Writes
},
0b11 => {
types = MBReqTypes_All
}
};
execute_aarch64_instrs_system_barriers_dsb(alias, domain, nXS, types)
| 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 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | imm2 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | |
11010101000000110011xx1000111111
The Sail has no decode_dsb_aarch64_instrs_system_barriers_dsb_nxs: ScarletNX's extract of sail-arm keeps what its roots reach, and none reaches it.
nXS : bool = nXS__arg;
match alias {
DSBAlias_SSBB => {
SpeculativeStoreBypassBarrierToVA()
},
DSBAlias_PSSBB => {
SpeculativeStoreBypassBarrierToPA()
},
DSBAlias_DSB => {
if HaveTME() & TSTATE.depth > 0 then {
FailTransaction(TMFailure_ERR, false)
};
if not_bool(nXS) & HaveFeatXS() then {
nXS = ((PSTATE.EL == EL0 | PSTATE.EL == EL1) & IsHCRXEL2Enabled()) & HCRX_EL2[FnXS] == 0b1
};
DataSynchronizationBarrier(domain, types, nXS)
},
_ => {
Unreachable()
}
}
Made from ScarletNX's Sail at 166ad3910f80. sail-arm's definitions are Arm's ASL in Sail (BSD 3-Clause Clear, license); ScarletNX's fixups are GPL-3.0-or-later.