feat(compiler): translate owned scalable memory operations
This commit is contained in:
1 parent
5141a9e5e3
commit
12ebe2022b
55 files changed
+18393
-226
No files matched your search
@@ -1,5 +1,6 @@
|
||||
//! Shared scalable operands. Instruction families own allocation and mode checks.
|
||||
|
||||
pub mod execution;
|
||||
pub mod features;
|
||||
pub mod profile;
|
||||
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
//! Source-derived obligations for a prepared scalable body.
|
||||
//!
|
||||
//! This metadata describes the architectural source helper, rather than a
|
||||
//! cached permission decision. The CPU owner evaluates it against the actual
|
||||
//! controls and exclusively borrowed state immediately before native entry.
|
||||
|
||||
use super::{ElementSize, features::FeatureRequirement};
|
||||
use crate::GuestAddress;
|
||||
|
||||
pub const SCALABLE_EXECUTION_REQUIREMENTS_VERSION: u32 = 2;
|
||||
|
||||
/// Source-derived helper obligation. Known sequences retain literal source
|
||||
/// helper spelling; explicitly guarded specializations retain their reviewed
|
||||
/// equivalent helper sequence under the named authoritative state guard.
|
||||
/// Nested checks, their ordering and conditional semantics belong to the
|
||||
/// shared source-control evaluator; they are never expanded into booleans here.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum ScalableAccessCheck {
|
||||
SveEnabled,
|
||||
NonStreamingSveEnabled,
|
||||
StreamingSveEnabled,
|
||||
StreamingSveAndZaEnabled,
|
||||
SmeEnabled,
|
||||
SmeAndZaEnabled,
|
||||
SmeZt0Enabled,
|
||||
}
|
||||
|
||||
/// Unknown source facts decline checked qualification. An empty known sequence
|
||||
/// is reserved for an explicitly audited source that calls no scalable helper.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum ScalableAccessRequirements {
|
||||
Known(Box<[ScalableAccessCheck]>),
|
||||
/// Reviewed equivalence specialized to actual FEAT_SME and actual SM=1.
|
||||
/// The consumer must validate both facts before evaluating any contained
|
||||
/// helper. Failure is a conservative Unsupported decline before effects,
|
||||
/// never an inferred source SM=0 trap. The same actual owners stay borrowed
|
||||
/// through the native body and checked finalization.
|
||||
StreamingSmeSpecialization(Box<[ScalableAccessCheck]>),
|
||||
Unqualified,
|
||||
}
|
||||
|
||||
/// Maximum architectural guest memory quantity reached by this instruction.
|
||||
/// Host read/RMW envelopes and total vector/block bytes are separate concepts.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum GuestMemoryQuantity {
|
||||
None,
|
||||
Maximum(ElementSize),
|
||||
Unqualified,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct InstructionExecutionRequirements {
|
||||
pc: GuestAddress,
|
||||
/// Conjunction of the existing decoder's clauses. Each clause retains its
|
||||
/// own ALL and ANY sets; flattening ANY sets would change the condition.
|
||||
feature_clauses: Box<[FeatureRequirement]>,
|
||||
access: ScalableAccessRequirements,
|
||||
guest_memory_quantity: GuestMemoryQuantity,
|
||||
}
|
||||
|
||||
impl InstructionExecutionRequirements {
|
||||
pub(crate) fn new(
|
||||
pc: GuestAddress,
|
||||
feature_clauses: Vec<FeatureRequirement>,
|
||||
access: ScalableAccessRequirements,
|
||||
guest_memory_quantity: GuestMemoryQuantity,
|
||||
) -> Self {
|
||||
Self {
|
||||
pc,
|
||||
feature_clauses: feature_clauses.into_boxed_slice(),
|
||||
access,
|
||||
guest_memory_quantity,
|
||||
}
|
||||
}
|
||||
|
||||
pub const fn pc(&self) -> GuestAddress {
|
||||
self.pc
|
||||
}
|
||||
|
||||
pub fn feature_clauses(&self) -> &[FeatureRequirement] {
|
||||
&self.feature_clauses
|
||||
}
|
||||
|
||||
pub fn access(&self) -> &ScalableAccessRequirements {
|
||||
&self.access
|
||||
}
|
||||
|
||||
pub const fn guest_memory_quantity(&self) -> GuestMemoryQuantity {
|
||||
self.guest_memory_quantity
|
||||
}
|
||||
}
|
||||
|
||||
/// Immutable source order, including prefixes and branches that the complete
|
||||
/// prepared body may execute. This is independent of memory-service flags.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct ScalableExecutionRequirements {
|
||||
instructions: Box<[InstructionExecutionRequirements]>,
|
||||
}
|
||||
|
||||
impl ScalableExecutionRequirements {
|
||||
pub(crate) fn new(instructions: Vec<InstructionExecutionRequirements>) -> Self {
|
||||
Self {
|
||||
instructions: instructions.into_boxed_slice(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn instructions(&self) -> &[InstructionExecutionRequirements] {
|
||||
&self.instructions
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ pub mod integer_dots;
|
||||
pub mod integer_matrix;
|
||||
pub mod integer_vector;
|
||||
pub mod length;
|
||||
pub mod memory;
|
||||
pub mod movement;
|
||||
pub mod tables;
|
||||
|
||||
@@ -15,12 +16,16 @@ pub enum Operand {
|
||||
IntegerMatrix(integer_matrix::Operand),
|
||||
IntegerVector(integer_vector::Operand),
|
||||
Length(length::Operand),
|
||||
Memory(memory::Operand),
|
||||
Movement(movement::Operand),
|
||||
Tables(tables::Operand),
|
||||
}
|
||||
|
||||
#[allow(clippy::result_unit_err)]
|
||||
pub fn decode(word: u32) -> Option<Result<Operand, ()>> {
|
||||
if let Some(operand) = memory::decode(word) {
|
||||
return Some(Ok(Operand::Memory(operand)));
|
||||
}
|
||||
if let Some(operand) = tables::decode(word) {
|
||||
return Some(Ok(Operand::Tables(operand)));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,461 @@
|
||||
//! SME memory operands; execution requires the shared streaming-state profile.
|
||||
use crate::aarch64::{
|
||||
Register, register,
|
||||
scalable::{
|
||||
ElementSize,
|
||||
execution::{GuestMemoryQuantity, ScalableAccessCheck, ScalableAccessRequirements},
|
||||
},
|
||||
};
|
||||
|
||||
const VECTOR_GROUP_MASK: u32 = 0xff80_0000;
|
||||
const VECTOR_GROUP_CLASS: u32 = 0xa100_0000;
|
||||
const IMMEDIATE_BIT: u32 = 1 << 22;
|
||||
const STORE_BIT: u32 = 1 << 21;
|
||||
const IMMEDIATE_RESERVED_BIT: u32 = 1 << 20;
|
||||
const FOUR_REGISTERS_BIT: u32 = 1 << 15;
|
||||
const FOUR_REGISTERS_RESERVED_BIT: u32 = 1 << 2;
|
||||
const NON_TEMPORAL_BIT: u32 = 1 << 3;
|
||||
const HIGH_REGISTER_BIT: u32 = 1 << 4;
|
||||
const SIZE_SHIFT: u32 = 13;
|
||||
const SIZE_MASK: u32 = 3;
|
||||
const PREDICATE_SHIFT: u32 = 10;
|
||||
const PREDICATE_MASK: u32 = 7;
|
||||
const COUNTER_PREDICATE_BASE: u8 = 8;
|
||||
const BASE_SHIFT: u32 = 5;
|
||||
const REGISTER_MASK: u32 = 31;
|
||||
const OFFSET_SHIFT: u32 = 16;
|
||||
const IMMEDIATE_BITS: u32 = 4;
|
||||
const IMMEDIATE_MASK: u32 = (1 << IMMEDIATE_BITS) - 1;
|
||||
const TWO_REGISTER_LOW_MASK: u32 = 7;
|
||||
const FOUR_REGISTER_LOW_MASK: u32 = 3;
|
||||
const HIGH_REGISTER_BASE: u8 = 16;
|
||||
const TILE_MASK: u32 = 0xffe0_0010;
|
||||
const TILE_BYTE_CLASS: u32 = 0xe000_0000;
|
||||
const TILE_HALFWORD_CLASS: u32 = 0xe040_0000;
|
||||
const TILE_WORD_CLASS: u32 = 0xe080_0000;
|
||||
const TILE_DOUBLEWORD_CLASS: u32 = 0xe0c0_0000;
|
||||
const TILE_QUADWORD_CLASS: u32 = 0xe1c0_0000;
|
||||
const ZA_VECTOR_MASK: u32 = 0xffff_9c10;
|
||||
const ZA_VECTOR_CLASS: u32 = 0xe100_0000;
|
||||
const ZT_MASK: u32 = 0xffff_fc1f;
|
||||
const ZT_CLASS: u32 = 0xe11f_8000;
|
||||
const SLICE_SELECTOR_SHIFT: u32 = 13;
|
||||
const SLICE_SELECTOR_MASK: u32 = 3;
|
||||
const SLICE_SELECTOR_BASE: u8 = 12;
|
||||
const VERTICAL_BIT: u32 = 1 << 15;
|
||||
const TILE_SELECTOR_BITS: u32 = 4;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Direction {
|
||||
Load,
|
||||
Store,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Offset {
|
||||
/// Signed units of the complete transferred vector group, not bytes.
|
||||
VectorGroups(i8),
|
||||
/// X31 denotes ZR; scale equals the transferred element size.
|
||||
Register(Register),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Address {
|
||||
pub base: Register,
|
||||
pub offset: Offset,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct VectorGroup {
|
||||
pub first: u8,
|
||||
pub count: u8,
|
||||
pub stride: u8,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct VectorTransfer {
|
||||
pub direction: Direction,
|
||||
pub non_temporal: bool,
|
||||
pub element: ElementSize,
|
||||
pub registers: VectorGroup,
|
||||
/// PN8..PN15 supplies a predicate-as-counter encoding in its low 16 bits.
|
||||
pub predicate: u8,
|
||||
pub address: Address,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct TileTransfer {
|
||||
pub direction: Direction,
|
||||
pub element: ElementSize,
|
||||
pub tile: u8,
|
||||
pub vertical: bool,
|
||||
/// W12..W15; slice = (UInt(Ws) + immediate) modulo SVL/element_bits.
|
||||
pub slice_register: u8,
|
||||
pub slice_offset: u8,
|
||||
/// Ordinary P0..P7, unlike the multi-vector PN operands.
|
||||
pub predicate: u8,
|
||||
pub address: Address,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct ZaVectorTransfer {
|
||||
pub direction: Direction,
|
||||
pub base: Register,
|
||||
pub vector_register: u8,
|
||||
/// Unsigned SVL-byte memory offset and additive ZA-vector selector.
|
||||
pub offset: u8,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct ZtTransfer {
|
||||
pub direction: Direction,
|
||||
pub base: Register,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Operand {
|
||||
Vectors(VectorTransfer),
|
||||
Tile(TileTransfer),
|
||||
ZaVector(ZaVectorTransfer),
|
||||
Zt(ZtTransfer),
|
||||
}
|
||||
|
||||
impl Operand {
|
||||
/// Architectural Mem element quantity, independent of total vector bytes.
|
||||
/// Whole-ZA and ZT0 transfers issue byte accesses in the source operation.
|
||||
pub(crate) const fn guest_memory_quantity(&self) -> GuestMemoryQuantity {
|
||||
let element = match self {
|
||||
Self::Vectors(transfer) => transfer.element,
|
||||
Self::Tile(transfer) => transfer.element,
|
||||
Self::ZaVector(_) | Self::Zt(_) => ElementSize::Byte,
|
||||
};
|
||||
GuestMemoryQuantity::Maximum(element)
|
||||
}
|
||||
|
||||
/// Exact top-level access helpers from the pinned source Operation section.
|
||||
/// The shared CPU owner evaluates their nested checks against actual state.
|
||||
pub(crate) fn execution_access_requirements(&self) -> ScalableAccessRequirements {
|
||||
use ScalableAccessCheck::{
|
||||
SmeAndZaEnabled, SmeEnabled, SmeZt0Enabled, StreamingSveAndZaEnabled,
|
||||
StreamingSveEnabled,
|
||||
};
|
||||
|
||||
match self {
|
||||
Self::Vectors(_) => ScalableAccessRequirements::Known(Box::new([StreamingSveEnabled])),
|
||||
Self::Tile(_) => {
|
||||
ScalableAccessRequirements::Known(Box::new([StreamingSveAndZaEnabled]))
|
||||
}
|
||||
Self::ZaVector(_) => ScalableAccessRequirements::Known(Box::new([SmeAndZaEnabled])),
|
||||
Self::Zt(_) => ScalableAccessRequirements::Known(Box::new([SmeEnabled, SmeZt0Enabled])),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn decode(word: u32) -> Option<Operand> {
|
||||
if word & VECTOR_GROUP_MASK != VECTOR_GROUP_CLASS {
|
||||
return decode_za(word);
|
||||
}
|
||||
let immediate = word & IMMEDIATE_BIT != 0;
|
||||
let four = word & FOUR_REGISTERS_BIT != 0;
|
||||
if (immediate && word & IMMEDIATE_RESERVED_BIT != 0)
|
||||
|| (four && word & FOUR_REGISTERS_RESERVED_BIT != 0)
|
||||
{
|
||||
return None;
|
||||
}
|
||||
let offset = if immediate {
|
||||
let raw = ((word >> OFFSET_SHIFT) & IMMEDIATE_MASK) as i8;
|
||||
let shift = i8::BITS - IMMEDIATE_BITS;
|
||||
Offset::VectorGroups((raw << shift) >> shift)
|
||||
} else {
|
||||
Offset::Register(register((word >> OFFSET_SHIFT) & REGISTER_MASK, false))
|
||||
};
|
||||
let low_mask = if four {
|
||||
FOUR_REGISTER_LOW_MASK
|
||||
} else {
|
||||
TWO_REGISTER_LOW_MASK
|
||||
};
|
||||
let first = (word & low_mask) as u8
|
||||
+ if word & HIGH_REGISTER_BIT != 0 {
|
||||
HIGH_REGISTER_BASE
|
||||
} else {
|
||||
0
|
||||
};
|
||||
Some(Operand::Vectors(VectorTransfer {
|
||||
direction: if word & STORE_BIT != 0 {
|
||||
Direction::Store
|
||||
} else {
|
||||
Direction::Load
|
||||
},
|
||||
non_temporal: word & NON_TEMPORAL_BIT != 0,
|
||||
element: match (word >> SIZE_SHIFT) & SIZE_MASK {
|
||||
0 => ElementSize::Byte,
|
||||
1 => ElementSize::Halfword,
|
||||
2 => ElementSize::Word,
|
||||
_ => ElementSize::Doubleword,
|
||||
},
|
||||
registers: VectorGroup {
|
||||
first,
|
||||
count: if four { 4 } else { 2 },
|
||||
stride: if four { 4 } else { 8 },
|
||||
},
|
||||
predicate: COUNTER_PREDICATE_BASE + ((word >> PREDICATE_SHIFT) & PREDICATE_MASK) as u8,
|
||||
address: Address {
|
||||
base: register((word >> BASE_SHIFT) & REGISTER_MASK, true),
|
||||
offset,
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
fn direction(word: u32) -> Direction {
|
||||
if word & STORE_BIT != 0 {
|
||||
Direction::Store
|
||||
} else {
|
||||
Direction::Load
|
||||
}
|
||||
}
|
||||
|
||||
fn decode_za(word: u32) -> Option<Operand> {
|
||||
let base = register((word >> BASE_SHIFT) & REGISTER_MASK, true);
|
||||
let direction = direction(word);
|
||||
if word & ZT_MASK & !STORE_BIT == ZT_CLASS {
|
||||
return Some(Operand::Zt(ZtTransfer { direction, base }));
|
||||
}
|
||||
let slice_register =
|
||||
SLICE_SELECTOR_BASE + ((word >> SLICE_SELECTOR_SHIFT) & SLICE_SELECTOR_MASK) as u8;
|
||||
if word & ZA_VECTOR_MASK & !STORE_BIT == ZA_VECTOR_CLASS {
|
||||
return Some(Operand::ZaVector(ZaVectorTransfer {
|
||||
direction,
|
||||
base,
|
||||
vector_register: slice_register,
|
||||
offset: (word & IMMEDIATE_MASK) as u8,
|
||||
}));
|
||||
}
|
||||
let element = match word & TILE_MASK & !STORE_BIT {
|
||||
TILE_BYTE_CLASS => ElementSize::Byte,
|
||||
TILE_HALFWORD_CLASS => ElementSize::Halfword,
|
||||
TILE_WORD_CLASS => ElementSize::Word,
|
||||
TILE_DOUBLEWORD_CLASS => ElementSize::Doubleword,
|
||||
TILE_QUADWORD_CLASS => ElementSize::Quadword,
|
||||
_ => return None,
|
||||
};
|
||||
let offset_bits = TILE_SELECTOR_BITS - element.bytes().trailing_zeros();
|
||||
Some(Operand::Tile(TileTransfer {
|
||||
direction,
|
||||
element,
|
||||
tile: ((word & IMMEDIATE_MASK) >> offset_bits) as u8,
|
||||
vertical: word & VERTICAL_BIT != 0,
|
||||
slice_register,
|
||||
slice_offset: (word & ((1 << offset_bits) - 1)) as u8,
|
||||
predicate: ((word >> PREDICATE_SHIFT) & PREDICATE_MASK) as u8,
|
||||
address: Address {
|
||||
base,
|
||||
offset: Offset::Register(register((word >> OFFSET_SHIFT) & REGISTER_MASK, false)),
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn vector_group_fields_preserve_nonconsecutive_registers_and_counter_role() {
|
||||
for four in [false, true] {
|
||||
for high in [false, true] {
|
||||
for low in 0..=if four {
|
||||
FOUR_REGISTER_LOW_MASK
|
||||
} else {
|
||||
TWO_REGISTER_LOW_MASK
|
||||
} {
|
||||
for size in 0..=SIZE_MASK {
|
||||
for predicate in 0..=PREDICATE_MASK {
|
||||
let word = VECTOR_GROUP_CLASS
|
||||
| (size << SIZE_SHIFT)
|
||||
| (predicate << PREDICATE_SHIFT)
|
||||
| (REGISTER_MASK << BASE_SHIFT)
|
||||
| low
|
||||
| if four { FOUR_REGISTERS_BIT } else { 0 }
|
||||
| if high { HIGH_REGISTER_BIT } else { 0 };
|
||||
let Some(Operand::Vectors(transfer)) = decode(word) else {
|
||||
panic!("allocated vector group {word:08x}");
|
||||
};
|
||||
assert_eq!(
|
||||
transfer.registers,
|
||||
VectorGroup {
|
||||
first: low as u8 + if high { HIGH_REGISTER_BASE } else { 0 },
|
||||
count: if four { 4 } else { 2 },
|
||||
stride: if four { 4 } else { 8 },
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
transfer.predicate,
|
||||
COUNTER_PREDICATE_BASE + predicate as u8
|
||||
);
|
||||
assert_eq!(transfer.element.bytes(), 1 << size);
|
||||
assert_eq!(transfer.address.base, Register::Sp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn signed_group_offsets_and_register_zero_are_distinct() {
|
||||
for raw in 0..=IMMEDIATE_MASK {
|
||||
let Some(Operand::Vectors(transfer)) =
|
||||
decode(VECTOR_GROUP_CLASS | IMMEDIATE_BIT | (raw << OFFSET_SHIFT))
|
||||
else {
|
||||
panic!()
|
||||
};
|
||||
let expected = if raw < (1 << (IMMEDIATE_BITS - 1)) {
|
||||
raw as i8
|
||||
} else {
|
||||
raw as i8 - (1 << IMMEDIATE_BITS)
|
||||
};
|
||||
assert_eq!(transfer.address.offset, Offset::VectorGroups(expected));
|
||||
}
|
||||
let Some(Operand::Vectors(transfer)) =
|
||||
decode(VECTOR_GROUP_CLASS | (REGISTER_MASK << OFFSET_SHIFT))
|
||||
else {
|
||||
panic!()
|
||||
};
|
||||
assert_eq!(transfer.address.offset, Offset::Register(Register::Zero));
|
||||
assert!(decode(VECTOR_GROUP_CLASS | IMMEDIATE_BIT | IMMEDIATE_RESERVED_BIT).is_none());
|
||||
assert!(
|
||||
decode(VECTOR_GROUP_CLASS | FOUR_REGISTERS_BIT | FOUR_REGISTERS_RESERVED_BIT).is_none()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn za_tiles_split_the_low_selector_by_element_width() {
|
||||
for (class, bytes) in [
|
||||
(TILE_BYTE_CLASS, 1_u8),
|
||||
(TILE_HALFWORD_CLASS, 2),
|
||||
(TILE_WORD_CLASS, 4),
|
||||
(TILE_DOUBLEWORD_CLASS, 8),
|
||||
(TILE_QUADWORD_CLASS, 16),
|
||||
] {
|
||||
for store in [0, STORE_BIT] {
|
||||
for selector in 0..=IMMEDIATE_MASK {
|
||||
let word = class
|
||||
| store
|
||||
| selector
|
||||
| VERTICAL_BIT
|
||||
| (SLICE_SELECTOR_MASK << SLICE_SELECTOR_SHIFT)
|
||||
| (PREDICATE_MASK << PREDICATE_SHIFT)
|
||||
| (REGISTER_MASK << BASE_SHIFT)
|
||||
| (REGISTER_MASK << OFFSET_SHIFT);
|
||||
let Some(Operand::Tile(tile)) = decode(word) else {
|
||||
panic!()
|
||||
};
|
||||
assert_eq!(tile.element.bytes(), usize::from(bytes));
|
||||
assert_eq!(tile.tile, selector as u8 / (16 / bytes));
|
||||
assert_eq!(tile.slice_offset, selector as u8 % (16 / bytes));
|
||||
assert_eq!(tile.slice_register, 15);
|
||||
assert_eq!(tile.predicate, 7);
|
||||
assert!(tile.vertical);
|
||||
assert_eq!(tile.address.base, Register::Sp);
|
||||
assert_eq!(tile.address.offset, Offset::Register(Register::Zero));
|
||||
}
|
||||
}
|
||||
}
|
||||
for reserved in [0xe100_0000, 0xe140_0000, 0xe180_0000] {
|
||||
assert!(!matches!(decode(reserved), Some(Operand::Tile(_))));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn whole_za_and_zt_transfers_keep_distinct_selector_contracts() {
|
||||
for store in [0, STORE_BIT] {
|
||||
let direction = direction(store);
|
||||
let base = Register::Sp;
|
||||
assert_eq!(
|
||||
decode(ZT_CLASS | store | (REGISTER_MASK << BASE_SHIFT)),
|
||||
Some(Operand::Zt(ZtTransfer { direction, base }))
|
||||
);
|
||||
assert_eq!(
|
||||
decode(
|
||||
ZA_VECTOR_CLASS
|
||||
| store
|
||||
| (REGISTER_MASK << BASE_SHIFT)
|
||||
| (SLICE_SELECTOR_MASK << SLICE_SELECTOR_SHIFT)
|
||||
| IMMEDIATE_MASK
|
||||
),
|
||||
Some(Operand::ZaVector(ZaVectorTransfer {
|
||||
direction,
|
||||
base,
|
||||
vector_register: 15,
|
||||
offset: 15,
|
||||
}))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod execution_access_tests {
|
||||
use super::*;
|
||||
|
||||
const ORIGINAL_SP_BASE: u32 = REGISTER_MASK << BASE_SHIFT;
|
||||
|
||||
#[test]
|
||||
fn source_helpers_preserve_group_and_zt_order() {
|
||||
use ScalableAccessCheck::{
|
||||
SmeAndZaEnabled, SmeEnabled, SmeZt0Enabled, StreamingSveAndZaEnabled,
|
||||
StreamingSveEnabled,
|
||||
};
|
||||
|
||||
let cases: &[(u32, &[ScalableAccessCheck])] = &[
|
||||
(VECTOR_GROUP_CLASS, &[StreamingSveEnabled]),
|
||||
(TILE_BYTE_CLASS, &[StreamingSveAndZaEnabled]),
|
||||
(ZA_VECTOR_CLASS, &[SmeAndZaEnabled]),
|
||||
(ZT_CLASS, &[SmeEnabled, SmeZt0Enabled]),
|
||||
];
|
||||
for &(class, expected) in cases {
|
||||
for direction in [0, STORE_BIT] {
|
||||
for base in [0, ORIGINAL_SP_BASE] {
|
||||
let operand = decode(class | direction | base).expect("valid memory operand");
|
||||
assert_eq!(
|
||||
operand.execution_access_requirements(),
|
||||
ScalableAccessRequirements::Known(expected.into())
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn guest_quantity_uses_elements_and_whole_transfer_bytes() {
|
||||
let mut cases = Vec::new();
|
||||
for element in [
|
||||
ElementSize::Byte,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Word,
|
||||
ElementSize::Doubleword,
|
||||
] {
|
||||
let encoded_size = element.bytes().trailing_zeros() << SIZE_SHIFT;
|
||||
cases.push((VECTOR_GROUP_CLASS | encoded_size, element));
|
||||
}
|
||||
cases.extend([
|
||||
(TILE_BYTE_CLASS, ElementSize::Byte),
|
||||
(TILE_HALFWORD_CLASS, ElementSize::Halfword),
|
||||
(TILE_WORD_CLASS, ElementSize::Word),
|
||||
(TILE_DOUBLEWORD_CLASS, ElementSize::Doubleword),
|
||||
(TILE_QUADWORD_CLASS, ElementSize::Quadword),
|
||||
(ZA_VECTOR_CLASS, ElementSize::Byte),
|
||||
(ZT_CLASS, ElementSize::Byte),
|
||||
]);
|
||||
for (class, element) in cases {
|
||||
for direction in [0, STORE_BIT] {
|
||||
for base in [0, ORIGINAL_SP_BASE] {
|
||||
let operand = decode(class | direction | base).expect("valid memory operand");
|
||||
assert_eq!(
|
||||
operand.guest_memory_quantity(),
|
||||
GuestMemoryQuantity::Maximum(element)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,11 @@ pub mod integer_logic;
|
||||
pub mod integer_predicate_move;
|
||||
pub mod integer_products;
|
||||
pub mod integer_saturation;
|
||||
pub mod memory;
|
||||
pub mod memory_load;
|
||||
pub mod memory_multi;
|
||||
pub mod memory_store;
|
||||
pub mod memory_structure;
|
||||
pub mod predicate_generation;
|
||||
pub mod predicate_logic;
|
||||
pub mod prefix;
|
||||
@@ -35,6 +40,10 @@ pub enum Operand {
|
||||
IntegerPredicateMove(integer_predicate_move::Operand),
|
||||
IntegerProducts(integer_products::Operand),
|
||||
IntegerSaturation(integer_saturation::Operand),
|
||||
MemoryLoad(memory_load::Operand),
|
||||
MemoryMulti(memory_multi::Operand),
|
||||
MemoryStore(memory_store::Operand),
|
||||
MemoryStructure(memory_structure::Operand),
|
||||
PredicateGeneration(predicate_generation::Operand),
|
||||
PredicateLogic(predicate_logic::Operand),
|
||||
Rearrange(rearrange::Operand),
|
||||
@@ -66,6 +75,12 @@ pub fn decode(word: u32) -> Option<Result<Operand, ()>> {
|
||||
.or_else(|| {
|
||||
integer_saturation::decode(word).map(|operand| operand.map(Operand::IntegerSaturation))
|
||||
})
|
||||
.or_else(|| memory_load::decode(word).map(|operand| operand.map(Operand::MemoryLoad)))
|
||||
.or_else(|| memory_multi::decode(word).map(|operand| operand.map(Operand::MemoryMulti)))
|
||||
.or_else(|| memory_store::decode(word).map(|operand| operand.map(Operand::MemoryStore)))
|
||||
.or_else(|| {
|
||||
memory_structure::decode(word).map(|operand| operand.map(Operand::MemoryStructure))
|
||||
})
|
||||
.or_else(|| {
|
||||
predicate_generation::decode(word)
|
||||
.map(|operand| operand.map(Operand::PredicateGeneration))
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
//! Address descriptors shared by streaming SVE memory instructions.
|
||||
|
||||
use crate::aarch64::Register;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Scale {
|
||||
Bytes,
|
||||
VectorBytes { multiply: u8, divide: u8 },
|
||||
PredicateBytes,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Offset {
|
||||
Immediate { value: i16, scale: Scale },
|
||||
Register { index: Register, shift: u8 },
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Address {
|
||||
pub base: Register,
|
||||
pub offset: Offset,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Extension {
|
||||
Zero,
|
||||
Sign,
|
||||
}
|
||||
@@ -0,0 +1,950 @@
|
||||
//! SVE contiguous, replicated and whole-register loads.
|
||||
//!
|
||||
//! Loads stage the complete destination before committing it. Memory faults must
|
||||
//! preserve the old destination, including the upper scalable register bytes.
|
||||
use super::super::register;
|
||||
use super::memory::{Address, Extension, Offset, Scale};
|
||||
use crate::aarch64::scalable::ElementSize;
|
||||
|
||||
const REGISTER_MASK: u32 = 31;
|
||||
const BASE_SHIFT: u32 = 5;
|
||||
const PREDICATE_SHIFT: u32 = 10;
|
||||
const PREDICATE_MASK: u32 = 7;
|
||||
const INDEX_SHIFT: u32 = 16;
|
||||
const DTYPE_SHIFT: u32 = 21;
|
||||
const DTYPE_MASK: u32 = 15;
|
||||
const CONTIGUOUS_IMMEDIATE_MASK: u32 = 0xfe10_e000;
|
||||
const CONTIGUOUS_IMMEDIATE: u32 = 0xa400_a000;
|
||||
const CONTIGUOUS_REGISTER_MASK: u32 = 0xfe00_e000;
|
||||
const CONTIGUOUS_REGISTER: u32 = 0xa400_4000;
|
||||
const NON_TEMPORAL_IMMEDIATE_MASK: u32 = 0xfe70_e000;
|
||||
const NON_TEMPORAL_IMMEDIATE: u32 = 0xa400_e000;
|
||||
const NON_TEMPORAL_REGISTER_MASK: u32 = 0xfe60_e000;
|
||||
const NON_TEMPORAL_REGISTER: u32 = 0xa400_c000;
|
||||
const NON_TEMPORAL_SIZE_SHIFT: u32 = 23;
|
||||
const SIZE_MASK: u32 = 3;
|
||||
const WHOLE_VECTOR_MASK: u32 = 0xffc0_e000;
|
||||
const WHOLE_VECTOR: u32 = 0x8580_4000;
|
||||
const WHOLE_PREDICATE_MASK: u32 = 0xffc0_e010;
|
||||
const WHOLE_PREDICATE: u32 = 0x8580_0000;
|
||||
const WHOLE_IMMEDIATE_HIGH_SHIFT: u32 = 16;
|
||||
const WHOLE_IMMEDIATE_HIGH_MASK: u32 = 63;
|
||||
const WHOLE_IMMEDIATE_LOW_SHIFT: u32 = 10;
|
||||
const WHOLE_IMMEDIATE_LOW_MASK: u32 = 7;
|
||||
const WHOLE_IMMEDIATE_LOW_BITS: u32 = 3;
|
||||
const WHOLE_IMMEDIATE_BITS: u32 = 9;
|
||||
const CONTIGUOUS_IMMEDIATE_BITS: u32 = 4;
|
||||
const BYTE_BYTES: u8 = 1;
|
||||
const HALFWORD_BYTES: u8 = 2;
|
||||
const WORD_BYTES: u8 = 4;
|
||||
const DOUBLEWORD_BYTES: u8 = 8;
|
||||
const PREDICATE_REGISTER_MASK: u32 = 15;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Kind {
|
||||
Contiguous,
|
||||
ReplicateScalar,
|
||||
ReplicateQuad,
|
||||
WholeVector,
|
||||
WholePredicate,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Operand {
|
||||
pub kind: Kind,
|
||||
pub data: u8,
|
||||
pub address: Address,
|
||||
pub predicate: Option<u8>,
|
||||
pub memory_element: ElementSize,
|
||||
pub element: ElementSize,
|
||||
pub extension: Extension,
|
||||
pub non_temporal: bool,
|
||||
pub tag_checked: bool,
|
||||
}
|
||||
|
||||
pub fn decode(word: u32) -> Option<Result<Operand, ()>> {
|
||||
if word & WHOLE_VECTOR_MASK == WHOLE_VECTOR {
|
||||
return Some(Ok(whole(word, Kind::WholeVector)));
|
||||
}
|
||||
if word & WHOLE_PREDICATE_MASK == WHOLE_PREDICATE {
|
||||
return Some(Ok(whole(word, Kind::WholePredicate)));
|
||||
}
|
||||
let immediate = word & CONTIGUOUS_IMMEDIATE_MASK == CONTIGUOUS_IMMEDIATE;
|
||||
let indexed = word & CONTIGUOUS_REGISTER_MASK == CONTIGUOUS_REGISTER;
|
||||
let non_temporal_immediate = word & NON_TEMPORAL_IMMEDIATE_MASK == NON_TEMPORAL_IMMEDIATE;
|
||||
let non_temporal_indexed = word & NON_TEMPORAL_REGISTER_MASK == NON_TEMPORAL_REGISTER;
|
||||
if immediate || indexed || non_temporal_immediate || non_temporal_indexed {
|
||||
let (memory_bytes, element_bytes, extension) =
|
||||
if non_temporal_immediate || non_temporal_indexed {
|
||||
let bytes = BYTE_BYTES << ((word >> NON_TEMPORAL_SIZE_SHIFT) & SIZE_MASK);
|
||||
(bytes, bytes, Extension::Zero)
|
||||
} else {
|
||||
contiguous_sizes((word >> DTYPE_SHIFT) & DTYPE_MASK)
|
||||
};
|
||||
let base = register((word >> BASE_SHIFT) & REGISTER_MASK, true);
|
||||
let offset = if immediate || non_temporal_immediate {
|
||||
Offset::Immediate {
|
||||
value: signed(
|
||||
(word >> INDEX_SHIFT) & DTYPE_MASK,
|
||||
CONTIGUOUS_IMMEDIATE_BITS,
|
||||
),
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: memory_bytes,
|
||||
divide: element_bytes,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
let index = (word >> INDEX_SHIFT) & REGISTER_MASK;
|
||||
if index == REGISTER_MASK {
|
||||
return Some(Err(()));
|
||||
}
|
||||
Offset::Register {
|
||||
index: register(index, false),
|
||||
shift: memory_bytes.trailing_zeros() as u8,
|
||||
}
|
||||
};
|
||||
return Some(Ok(Operand {
|
||||
kind: Kind::Contiguous,
|
||||
data: (word & REGISTER_MASK) as u8,
|
||||
address: Address { base, offset },
|
||||
predicate: Some(((word >> PREDICATE_SHIFT) & PREDICATE_MASK) as u8),
|
||||
memory_element: element_size(memory_bytes),
|
||||
element: element_size(element_bytes),
|
||||
extension,
|
||||
non_temporal: non_temporal_immediate || non_temporal_indexed,
|
||||
tag_checked: indexed
|
||||
|| non_temporal_indexed
|
||||
|| (word >> BASE_SHIFT) & REGISTER_MASK != REGISTER_MASK,
|
||||
}));
|
||||
}
|
||||
decode_replicate(word)
|
||||
}
|
||||
|
||||
fn whole(word: u32, kind: Kind) -> Operand {
|
||||
let immediate = (((word >> WHOLE_IMMEDIATE_HIGH_SHIFT) & WHOLE_IMMEDIATE_HIGH_MASK)
|
||||
<< WHOLE_IMMEDIATE_LOW_BITS)
|
||||
| ((word >> WHOLE_IMMEDIATE_LOW_SHIFT) & WHOLE_IMMEDIATE_LOW_MASK);
|
||||
let data_mask = if kind == Kind::WholePredicate {
|
||||
PREDICATE_REGISTER_MASK
|
||||
} else {
|
||||
REGISTER_MASK
|
||||
};
|
||||
Operand {
|
||||
kind,
|
||||
data: (word & data_mask) as u8,
|
||||
address: Address {
|
||||
base: register((word >> BASE_SHIFT) & REGISTER_MASK, true),
|
||||
offset: Offset::Immediate {
|
||||
value: signed(immediate, WHOLE_IMMEDIATE_BITS),
|
||||
scale: if kind == Kind::WholePredicate {
|
||||
Scale::PredicateBytes
|
||||
} else {
|
||||
Scale::VectorBytes {
|
||||
multiply: BYTE_BYTES,
|
||||
divide: BYTE_BYTES,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
predicate: None,
|
||||
memory_element: ElementSize::Byte,
|
||||
element: ElementSize::Byte,
|
||||
extension: Extension::Zero,
|
||||
non_temporal: false,
|
||||
tag_checked: (word >> BASE_SHIFT) & REGISTER_MASK != REGISTER_MASK,
|
||||
}
|
||||
}
|
||||
|
||||
fn signed(value: u32, bits: u32) -> i16 {
|
||||
((value as i32) << (i32::BITS - bits) >> (i32::BITS - bits)) as i16
|
||||
}
|
||||
|
||||
fn contiguous_sizes(dtype: u32) -> (u8, u8, Extension) {
|
||||
use Extension::{Sign, Zero};
|
||||
// Dtype values encode the complete sign/zero-extending allocation, including
|
||||
// the reversed element-size order of signed loads.
|
||||
const BYTE_TO_BYTE: u32 = 0;
|
||||
const BYTE_TO_HALFWORD: u32 = 1;
|
||||
const BYTE_TO_WORD: u32 = 2;
|
||||
const BYTE_TO_DOUBLEWORD: u32 = 3;
|
||||
const SIGNED_WORD_TO_DOUBLEWORD: u32 = 4;
|
||||
const HALFWORD_TO_HALFWORD: u32 = 5;
|
||||
const HALFWORD_TO_WORD: u32 = 6;
|
||||
const HALFWORD_TO_DOUBLEWORD: u32 = 7;
|
||||
const SIGNED_HALFWORD_TO_DOUBLEWORD: u32 = 8;
|
||||
const SIGNED_HALFWORD_TO_WORD: u32 = 9;
|
||||
const WORD_TO_WORD: u32 = 10;
|
||||
const WORD_TO_DOUBLEWORD: u32 = 11;
|
||||
const SIGNED_BYTE_TO_DOUBLEWORD: u32 = 12;
|
||||
const SIGNED_BYTE_TO_WORD: u32 = 13;
|
||||
const SIGNED_BYTE_TO_HALFWORD: u32 = 14;
|
||||
const DOUBLEWORD_TO_DOUBLEWORD: u32 = 15;
|
||||
match dtype {
|
||||
BYTE_TO_BYTE => (BYTE_BYTES, BYTE_BYTES, Zero),
|
||||
BYTE_TO_HALFWORD => (BYTE_BYTES, HALFWORD_BYTES, Zero),
|
||||
BYTE_TO_WORD => (BYTE_BYTES, WORD_BYTES, Zero),
|
||||
BYTE_TO_DOUBLEWORD => (BYTE_BYTES, DOUBLEWORD_BYTES, Zero),
|
||||
SIGNED_WORD_TO_DOUBLEWORD => (WORD_BYTES, DOUBLEWORD_BYTES, Sign),
|
||||
HALFWORD_TO_HALFWORD => (HALFWORD_BYTES, HALFWORD_BYTES, Zero),
|
||||
HALFWORD_TO_WORD => (HALFWORD_BYTES, WORD_BYTES, Zero),
|
||||
HALFWORD_TO_DOUBLEWORD => (HALFWORD_BYTES, DOUBLEWORD_BYTES, Zero),
|
||||
SIGNED_HALFWORD_TO_DOUBLEWORD => (HALFWORD_BYTES, DOUBLEWORD_BYTES, Sign),
|
||||
SIGNED_HALFWORD_TO_WORD => (HALFWORD_BYTES, WORD_BYTES, Sign),
|
||||
WORD_TO_WORD => (WORD_BYTES, WORD_BYTES, Zero),
|
||||
WORD_TO_DOUBLEWORD => (WORD_BYTES, DOUBLEWORD_BYTES, Zero),
|
||||
SIGNED_BYTE_TO_DOUBLEWORD => (BYTE_BYTES, DOUBLEWORD_BYTES, Sign),
|
||||
SIGNED_BYTE_TO_WORD => (BYTE_BYTES, WORD_BYTES, Sign),
|
||||
SIGNED_BYTE_TO_HALFWORD => (BYTE_BYTES, HALFWORD_BYTES, Sign),
|
||||
DOUBLEWORD_TO_DOUBLEWORD => (DOUBLEWORD_BYTES, DOUBLEWORD_BYTES, Zero),
|
||||
_ => unreachable!("four-bit dtype"),
|
||||
}
|
||||
}
|
||||
|
||||
const SCALAR_REPLICATE_MASK: u32 = 0xffc0_e000;
|
||||
const SCALAR_IMMEDIATE_MASK: u32 = 63;
|
||||
const QUAD_IMMEDIATE_MASK: u32 = 0xfe70_e000;
|
||||
const QUAD_IMMEDIATE: u32 = 0xa400_2000;
|
||||
const QUAD_REGISTER_MASK: u32 = 0xfe60_e000;
|
||||
const QUAD_REGISTER: u32 = 0xa400_0000;
|
||||
const QUAD_BYTES: i16 = 16;
|
||||
const LD1RB_U16: u32 = 0x8440a000;
|
||||
const LD1RB_U32: u32 = 0x8440c000;
|
||||
const LD1RB_U64: u32 = 0x8440e000;
|
||||
const LD1RB_U8: u32 = 0x84408000;
|
||||
const LD1RD_U64: u32 = 0x85c0e000;
|
||||
const LD1RH_U16: u32 = 0x84c0a000;
|
||||
const LD1RH_U32: u32 = 0x84c0c000;
|
||||
const LD1RH_U64: u32 = 0x84c0e000;
|
||||
const LD1RSB_S16: u32 = 0x85c0c000;
|
||||
const LD1RSB_S32: u32 = 0x85c0a000;
|
||||
const LD1RSB_S64: u32 = 0x85c08000;
|
||||
const LD1RSH_S32: u32 = 0x8540a000;
|
||||
const LD1RSH_S64: u32 = 0x85408000;
|
||||
const LD1RSW_S64: u32 = 0x84c08000;
|
||||
const LD1RW_U32: u32 = 0x8540c000;
|
||||
const LD1RW_U64: u32 = 0x8540e000;
|
||||
|
||||
fn decode_replicate(word: u32) -> Option<Result<Operand, ()>> {
|
||||
let quad_immediate = word & QUAD_IMMEDIATE_MASK == QUAD_IMMEDIATE;
|
||||
let quad_register = word & QUAD_REGISTER_MASK == QUAD_REGISTER;
|
||||
let (kind, memory_bytes, element_bytes, extension) = if quad_immediate || quad_register {
|
||||
let bytes = BYTE_BYTES << ((word >> NON_TEMPORAL_SIZE_SHIFT) & SIZE_MASK);
|
||||
(Kind::ReplicateQuad, bytes, bytes, Extension::Zero)
|
||||
} else {
|
||||
let (memory_bytes, element_bytes, extension) = match word & SCALAR_REPLICATE_MASK {
|
||||
LD1RB_U16 => (BYTE_BYTES, HALFWORD_BYTES, Extension::Zero),
|
||||
LD1RB_U32 => (BYTE_BYTES, WORD_BYTES, Extension::Zero),
|
||||
LD1RB_U64 => (BYTE_BYTES, DOUBLEWORD_BYTES, Extension::Zero),
|
||||
LD1RB_U8 => (BYTE_BYTES, BYTE_BYTES, Extension::Zero),
|
||||
LD1RD_U64 => (DOUBLEWORD_BYTES, DOUBLEWORD_BYTES, Extension::Zero),
|
||||
LD1RH_U16 => (HALFWORD_BYTES, HALFWORD_BYTES, Extension::Zero),
|
||||
LD1RH_U32 => (HALFWORD_BYTES, WORD_BYTES, Extension::Zero),
|
||||
LD1RH_U64 => (HALFWORD_BYTES, DOUBLEWORD_BYTES, Extension::Zero),
|
||||
LD1RSB_S16 => (BYTE_BYTES, HALFWORD_BYTES, Extension::Sign),
|
||||
LD1RSB_S32 => (BYTE_BYTES, WORD_BYTES, Extension::Sign),
|
||||
LD1RSB_S64 => (BYTE_BYTES, DOUBLEWORD_BYTES, Extension::Sign),
|
||||
LD1RSH_S32 => (HALFWORD_BYTES, WORD_BYTES, Extension::Sign),
|
||||
LD1RSH_S64 => (HALFWORD_BYTES, DOUBLEWORD_BYTES, Extension::Sign),
|
||||
LD1RSW_S64 => (WORD_BYTES, DOUBLEWORD_BYTES, Extension::Sign),
|
||||
LD1RW_U32 => (WORD_BYTES, WORD_BYTES, Extension::Zero),
|
||||
LD1RW_U64 => (WORD_BYTES, DOUBLEWORD_BYTES, Extension::Zero),
|
||||
_ => return None,
|
||||
};
|
||||
(
|
||||
Kind::ReplicateScalar,
|
||||
memory_bytes,
|
||||
element_bytes,
|
||||
extension,
|
||||
)
|
||||
};
|
||||
let offset = if quad_register {
|
||||
let index = (word >> INDEX_SHIFT) & REGISTER_MASK;
|
||||
if index == REGISTER_MASK {
|
||||
return Some(Err(()));
|
||||
}
|
||||
Offset::Register {
|
||||
index: register(index, false),
|
||||
shift: memory_bytes.trailing_zeros() as u8,
|
||||
}
|
||||
} else {
|
||||
let value = if quad_immediate {
|
||||
signed(
|
||||
(word >> INDEX_SHIFT) & DTYPE_MASK,
|
||||
CONTIGUOUS_IMMEDIATE_BITS,
|
||||
) * QUAD_BYTES
|
||||
} else {
|
||||
((word >> INDEX_SHIFT) & SCALAR_IMMEDIATE_MASK) as i16 * i16::from(memory_bytes)
|
||||
};
|
||||
Offset::Immediate {
|
||||
value,
|
||||
scale: Scale::Bytes,
|
||||
}
|
||||
};
|
||||
Some(Ok(Operand {
|
||||
kind,
|
||||
data: (word & REGISTER_MASK) as u8,
|
||||
address: Address {
|
||||
base: register((word >> BASE_SHIFT) & REGISTER_MASK, true),
|
||||
offset,
|
||||
},
|
||||
predicate: Some(((word >> PREDICATE_SHIFT) & PREDICATE_MASK) as u8),
|
||||
memory_element: element_size(memory_bytes),
|
||||
element: element_size(element_bytes),
|
||||
extension,
|
||||
non_temporal: false,
|
||||
tag_checked: quad_register || (word >> BASE_SHIFT) & REGISTER_MASK != REGISTER_MASK,
|
||||
}))
|
||||
}
|
||||
|
||||
fn element_size(bytes: u8) -> ElementSize {
|
||||
match bytes {
|
||||
BYTE_BYTES => ElementSize::Byte,
|
||||
HALFWORD_BYTES => ElementSize::Halfword,
|
||||
WORD_BYTES => ElementSize::Word,
|
||||
DOUBLEWORD_BYTES => ElementSize::Doubleword,
|
||||
_ => unreachable!("allocated SVE load element size"),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::aarch64::Register;
|
||||
|
||||
// Canonical fixed words and sizes are independent pinned XML facts.
|
||||
const CANONICAL: [(u32, Kind, ElementSize, ElementSize, Extension, bool); 66] = [
|
||||
(
|
||||
0xa420a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa440a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa460a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa400a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa4204000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa4404000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa4604000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa4004000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa5e0a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Doubleword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa5e04000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Doubleword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa4a0a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa4c0a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa4e0a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa4a04000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa4c04000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa4e04000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0x8440a000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x8440c000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x8440e000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x84408000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x85c0e000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Doubleword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x84c0a000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x84c0c000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x84c0e000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa4002000,
|
||||
Kind::ReplicateQuad,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa4000000,
|
||||
Kind::ReplicateQuad,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa5802000,
|
||||
Kind::ReplicateQuad,
|
||||
ElementSize::Doubleword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa5800000,
|
||||
Kind::ReplicateQuad,
|
||||
ElementSize::Doubleword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa4802000,
|
||||
Kind::ReplicateQuad,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa4800000,
|
||||
Kind::ReplicateQuad,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa5002000,
|
||||
Kind::ReplicateQuad,
|
||||
ElementSize::Word,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa5000000,
|
||||
Kind::ReplicateQuad,
|
||||
ElementSize::Word,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0x85c0c000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Halfword,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x85c0a000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Word,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x85c08000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x8540a000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Word,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x85408000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x84c08000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Word,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x8540c000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Word,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x8540e000,
|
||||
Kind::ReplicateScalar,
|
||||
ElementSize::Word,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa5c0a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Halfword,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa5a0a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Word,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa580a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa5c04000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Halfword,
|
||||
Extension::Sign,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa5a04000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Word,
|
||||
Extension::Sign,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa5804000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa520a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Word,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa500a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa5204000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Word,
|
||||
Extension::Sign,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa5004000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa480a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Word,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa4804000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Word,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Sign,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa540a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Word,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa560a000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Word,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa5404000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Word,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa5604000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Word,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa400e000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa400c000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa580e000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Doubleword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa580c000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Doubleword,
|
||||
ElementSize::Doubleword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa480e000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa480c000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Halfword,
|
||||
ElementSize::Halfword,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0xa500e000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Word,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0xa500c000,
|
||||
Kind::Contiguous,
|
||||
ElementSize::Word,
|
||||
ElementSize::Word,
|
||||
Extension::Zero,
|
||||
true,
|
||||
),
|
||||
(
|
||||
0x85800000,
|
||||
Kind::WholePredicate,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
(
|
||||
0x85804000,
|
||||
Kind::WholeVector,
|
||||
ElementSize::Byte,
|
||||
ElementSize::Byte,
|
||||
Extension::Zero,
|
||||
false,
|
||||
),
|
||||
];
|
||||
|
||||
#[test]
|
||||
fn canonical_sizes_aliases_and_reserved_indices() {
|
||||
for (fixed, kind, memory_element, element, extension, indexed) in CANONICAL {
|
||||
let data = if kind == Kind::WholePredicate {
|
||||
PREDICATE_REGISTER_MASK
|
||||
} else {
|
||||
REGISTER_MASK
|
||||
};
|
||||
let word = fixed | (REGISTER_MASK << BASE_SHIFT) | data;
|
||||
let operand = decode(word).unwrap().unwrap();
|
||||
assert_eq!(operand.kind, kind);
|
||||
assert_eq!(operand.memory_element, memory_element);
|
||||
assert_eq!(operand.element, element);
|
||||
assert_eq!(operand.extension, extension);
|
||||
assert_eq!(operand.data, data as u8);
|
||||
assert_eq!(operand.address.base, Register::Sp);
|
||||
assert_eq!(operand.tag_checked, indexed);
|
||||
if indexed {
|
||||
assert!(matches!(
|
||||
operand.address.offset,
|
||||
Offset::Register {
|
||||
index: Register::X(0),
|
||||
..
|
||||
}
|
||||
));
|
||||
assert_eq!(decode(word | (REGISTER_MASK << INDEX_SHIFT)), Some(Err(())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn signed_vector_offsets_and_whole_predicate_split_immediate() {
|
||||
let contiguous = decode(CONTIGUOUS_IMMEDIATE | (DTYPE_MASK << INDEX_SHIFT))
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
contiguous.address.offset,
|
||||
Offset::Immediate {
|
||||
value: -1,
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: BYTE_BYTES,
|
||||
divide: BYTE_BYTES
|
||||
}
|
||||
}
|
||||
);
|
||||
let whole =
|
||||
decode(WHOLE_PREDICATE | (WHOLE_IMMEDIATE_HIGH_MASK << WHOLE_IMMEDIATE_HIGH_SHIFT))
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
whole.address.offset,
|
||||
Offset::Immediate {
|
||||
value: -8,
|
||||
scale: Scale::PredicateBytes
|
||||
}
|
||||
);
|
||||
let whole = decode(
|
||||
WHOLE_PREDICATE
|
||||
| (WHOLE_IMMEDIATE_HIGH_MASK << WHOLE_IMMEDIATE_HIGH_SHIFT)
|
||||
| (WHOLE_IMMEDIATE_LOW_MASK << WHOLE_IMMEDIATE_LOW_SHIFT),
|
||||
)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
whole.address.offset,
|
||||
Offset::Immediate {
|
||||
value: -1,
|
||||
scale: Scale::PredicateBytes
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn replicate_offsets_use_bytes_and_scalar_unsigned_range() {
|
||||
let scalar = decode(LD1RD_U64 | (SCALAR_IMMEDIATE_MASK << INDEX_SHIFT))
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
scalar.address.offset,
|
||||
Offset::Immediate {
|
||||
value: SCALAR_IMMEDIATE_MASK as i16 * i16::from(DOUBLEWORD_BYTES),
|
||||
scale: Scale::Bytes
|
||||
}
|
||||
);
|
||||
let quad = decode(QUAD_IMMEDIATE | (DTYPE_MASK << INDEX_SHIFT))
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
quad.address.offset,
|
||||
Offset::Immediate {
|
||||
value: -QUAD_BYTES,
|
||||
scale: Scale::Bytes
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unrelated_allocations_are_not_loads() {
|
||||
const NOP: u32 = 0xd503_201f;
|
||||
const STORE_CONTIGUOUS: u32 = 0xe400_e000;
|
||||
for word in [0, u32::MAX, NOP, STORE_CONTIGUOUS] {
|
||||
assert_eq!(decode(word), None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
//! SME2/SVE2.1 contiguous transfers governed by predicate-as-counter registers.
|
||||
use super::super::{Register, register};
|
||||
use super::memory::{Address, Offset, Scale};
|
||||
use crate::aarch64::scalable::{
|
||||
ElementSize,
|
||||
execution::{GuestMemoryQuantity, ScalableAccessCheck, ScalableAccessRequirements},
|
||||
};
|
||||
|
||||
const CLASS_MASK: u32 = 0xff80_0000;
|
||||
const CLASS_VALUE: u32 = 0xa000_0000;
|
||||
const IMMEDIATE_ADDRESS: u32 = 1 << 22;
|
||||
const STORE: u32 = 1 << 21;
|
||||
const IMMEDIATE_RESERVED: u32 = 1 << 20;
|
||||
const FOUR_REGISTERS: u32 = 1 << 15;
|
||||
const ELEMENT_SHIFT: u32 = 13;
|
||||
const ELEMENT_MASK: u32 = 3;
|
||||
const PREDICATE_SHIFT: u32 = 10;
|
||||
const PREDICATE_MASK: u32 = 7;
|
||||
const FIRST_COUNTER_REGISTER: u8 = 8;
|
||||
const BASE_SHIFT: u32 = 5;
|
||||
const REGISTER_MASK: u32 = 31;
|
||||
const OFFSET_SHIFT: u32 = 16;
|
||||
const IMMEDIATE_MASK: u32 = 15;
|
||||
const IMMEDIATE_SIGN: i8 = 8;
|
||||
const IMMEDIATE_MODULUS: i8 = 16;
|
||||
const NON_TEMPORAL: u32 = 1;
|
||||
const QUAD_RESERVED: u32 = 1 << 1;
|
||||
const PAIR_REGISTER_MASK: u32 = 30;
|
||||
const QUAD_REGISTER_MASK: u32 = 28;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Operand {
|
||||
pub loading: bool,
|
||||
pub non_temporal: bool,
|
||||
pub element: ElementSize,
|
||||
pub registers: u8,
|
||||
pub first: u8,
|
||||
pub predicate: u8,
|
||||
pub address: Address,
|
||||
}
|
||||
|
||||
impl Operand {
|
||||
/// Register-offset forms check tags even when their base is SP.
|
||||
pub const fn tag_checked(self) -> bool {
|
||||
matches!(self.address.offset, Offset::Register { .. })
|
||||
|| !matches!(self.address.base, Register::Sp)
|
||||
}
|
||||
}
|
||||
|
||||
/// Both source helper branches have identical effects under actual SME and SM=1.
|
||||
/// The canonical owner checks all specialization guards before any helper.
|
||||
pub(crate) fn execution_access_requirements(_operand: &Operand) -> ScalableAccessRequirements {
|
||||
ScalableAccessRequirements::StreamingSmeSpecialization(Box::new([
|
||||
ScalableAccessCheck::StreamingSveEnabled,
|
||||
]))
|
||||
}
|
||||
|
||||
/// Maximum guest Mem element, separate from tuple size and host envelopes.
|
||||
pub(crate) const fn guest_memory_quantity(operand: &Operand) -> GuestMemoryQuantity {
|
||||
GuestMemoryQuantity::Maximum(operand.element)
|
||||
}
|
||||
|
||||
/// Reserved tuple alignment and immediate fields decline without another decode.
|
||||
#[allow(clippy::result_unit_err)]
|
||||
pub fn decode(word: u32) -> Option<Result<Operand, ()>> {
|
||||
if word & CLASS_MASK != CLASS_VALUE {
|
||||
return None;
|
||||
}
|
||||
let immediate = word & IMMEDIATE_ADDRESS != 0;
|
||||
let quad = word & FOUR_REGISTERS != 0;
|
||||
if (immediate && word & IMMEDIATE_RESERVED != 0) || (quad && word & QUAD_RESERVED != 0) {
|
||||
return Some(Err(()));
|
||||
}
|
||||
let offset = if immediate {
|
||||
let raw = ((word >> OFFSET_SHIFT) & IMMEDIATE_MASK) as i8;
|
||||
Offset::Immediate {
|
||||
value: i16::from(if raw & IMMEDIATE_SIGN != 0 {
|
||||
raw - IMMEDIATE_MODULUS
|
||||
} else {
|
||||
raw
|
||||
}),
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: if quad { 4 } else { 2 },
|
||||
divide: 1,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
Offset::Register {
|
||||
index: register((word >> OFFSET_SHIFT) & REGISTER_MASK, false),
|
||||
shift: ((word >> ELEMENT_SHIFT) & ELEMENT_MASK) as u8,
|
||||
}
|
||||
};
|
||||
Some(Ok(Operand {
|
||||
loading: word & STORE == 0,
|
||||
non_temporal: word & NON_TEMPORAL != 0,
|
||||
element: match (word >> ELEMENT_SHIFT) & ELEMENT_MASK {
|
||||
0 => ElementSize::Byte,
|
||||
1 => ElementSize::Halfword,
|
||||
2 => ElementSize::Word,
|
||||
_ => ElementSize::Doubleword,
|
||||
},
|
||||
registers: if quad { 4 } else { 2 },
|
||||
first: (word
|
||||
& if quad {
|
||||
QUAD_REGISTER_MASK
|
||||
} else {
|
||||
PAIR_REGISTER_MASK
|
||||
}) as u8,
|
||||
predicate: FIRST_COUNTER_REGISTER + ((word >> PREDICATE_SHIFT) & PREDICATE_MASK) as u8,
|
||||
address: Address {
|
||||
base: register((word >> BASE_SHIFT) & REGISTER_MASK, true),
|
||||
offset,
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn complete_allocated_width_direction_hint_address_and_tuple_combinations() {
|
||||
for loading in [false, true] {
|
||||
for non_temporal in [false, true] {
|
||||
for element in 0..=ELEMENT_MASK {
|
||||
for quad in [false, true] {
|
||||
for immediate in [false, true] {
|
||||
for first in (0..32).step_by(if quad { 4 } else { 2 }) {
|
||||
for predicate in 0..=PREDICATE_MASK {
|
||||
let word = CLASS_VALUE
|
||||
| if loading { 0 } else { STORE }
|
||||
| if non_temporal { NON_TEMPORAL } else { 0 }
|
||||
| (element << ELEMENT_SHIFT)
|
||||
| if quad { FOUR_REGISTERS } else { 0 }
|
||||
| if immediate { IMMEDIATE_ADDRESS } else { 0 }
|
||||
| (predicate << PREDICATE_SHIFT)
|
||||
| (REGISTER_MASK << BASE_SHIFT)
|
||||
| first;
|
||||
let operand = decode(word).unwrap().unwrap();
|
||||
assert_eq!(operand.loading, loading);
|
||||
assert_eq!(operand.non_temporal, non_temporal);
|
||||
assert_eq!(operand.element.bytes(), 1 << element);
|
||||
assert_eq!(operand.registers, if quad { 4 } else { 2 });
|
||||
assert_eq!(operand.first, first as u8);
|
||||
assert_eq!(
|
||||
operand.predicate,
|
||||
FIRST_COUNTER_REGISTER + predicate as u8
|
||||
);
|
||||
assert_eq!(operand.address.base, Register::Sp);
|
||||
assert_eq!(operand.tag_checked(), !immediate);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn signed_tuple_offsets_and_zero_register_offsets_remain_distinct() {
|
||||
for raw in 0..=IMMEDIATE_MASK {
|
||||
let operand = decode(CLASS_VALUE | IMMEDIATE_ADDRESS | (raw << OFFSET_SHIFT))
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
operand.address.offset,
|
||||
Offset::Immediate {
|
||||
value: i16::from(if raw >= IMMEDIATE_SIGN as u32 {
|
||||
raw as i8 - IMMEDIATE_MODULUS
|
||||
} else {
|
||||
raw as i8
|
||||
}),
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: 2,
|
||||
divide: 1
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
let operand = decode(CLASS_VALUE | (REGISTER_MASK << OFFSET_SHIFT))
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
operand.address.offset,
|
||||
Offset::Register {
|
||||
index: Register::Zero,
|
||||
shift: 0
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reserved_fields_are_explicit_and_other_classes_do_not_match() {
|
||||
assert_eq!(
|
||||
decode(CLASS_VALUE | FOUR_REGISTERS | QUAD_RESERVED),
|
||||
Some(Err(()))
|
||||
);
|
||||
assert_eq!(
|
||||
decode(CLASS_VALUE | IMMEDIATE_ADDRESS | IMMEDIATE_RESERVED),
|
||||
Some(Err(()))
|
||||
);
|
||||
for bit in 23..32 {
|
||||
assert_eq!(decode(CLASS_VALUE ^ (1 << bit)), None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,659 @@
|
||||
//! Contiguous and whole scalable stores, and scalar-address prefetch hints.
|
||||
//!
|
||||
//! Mode/feature checks precede execution. Rm31 is unallocated, base31 is SP,
|
||||
//! and structured source tuples wrap modulo the architectural Z register count.
|
||||
use super::memory::{Address, Offset, Scale};
|
||||
use crate::aarch64::{
|
||||
register,
|
||||
scalable::{
|
||||
ElementSize,
|
||||
execution::{GuestMemoryQuantity, ScalableAccessCheck, ScalableAccessRequirements},
|
||||
},
|
||||
};
|
||||
|
||||
const GROUPED_IMMEDIATE_MASK: u32 = 0xfe10_e000;
|
||||
const GROUPED_IMMEDIATE_CLASS: u32 = 0xe410_e000;
|
||||
const GROUPED_REGISTER_MASK: u32 = 0xfe00_e000;
|
||||
const GROUPED_REGISTER_CLASS: u32 = 0xe400_6000;
|
||||
const MEMORY_SIZE_SHIFT: u32 = 23;
|
||||
const TUPLE_COUNT_SHIFT: u32 = 21;
|
||||
const TUPLE_COUNT_MASK: u32 = 3;
|
||||
|
||||
const REGISTER_MASK: u32 = 31;
|
||||
const BASE_SHIFT: u32 = 5;
|
||||
const PREDICATE_SHIFT: u32 = 10;
|
||||
const PREDICATE_MASK: u32 = 7;
|
||||
const OFFSET_SHIFT: u32 = 16;
|
||||
const IMMEDIATE_BITS: u32 = 4;
|
||||
const IMMEDIATE_MASK: u32 = (1 << IMMEDIATE_BITS) - 1;
|
||||
const SIZE_SHIFT: u32 = 21;
|
||||
const SIZE_MASK: u32 = 3;
|
||||
const WORD_SIZE_MASK: u32 = 1;
|
||||
const BYTE_BYTES: u8 = 1;
|
||||
const WORD_BYTES: u8 = 4;
|
||||
const WHOLE_VECTOR_MASK: u32 = 0xffc0_e000;
|
||||
const WHOLE_VECTOR_CLASS: u32 = 0xe580_4000;
|
||||
const WHOLE_PREDICATE_MASK: u32 = 0xffc0_e010;
|
||||
const WHOLE_PREDICATE_CLASS: u32 = 0xe580_0000;
|
||||
const PREFETCH_IMMEDIATE_MASK: u32 = 0xffc0_8010;
|
||||
const PREFETCH_IMMEDIATE_CLASS: u32 = 0x85c0_0000;
|
||||
const PREFETCH_REGISTER_MASK: u32 = 0xfe60_e010;
|
||||
const PREFETCH_REGISTER_CLASS: u32 = 0x8400_c000;
|
||||
const HINT_MASK: u32 = 15;
|
||||
const WHOLE_LOW_BITS: u32 = 3;
|
||||
const WHOLE_OFFSET_BITS: u32 = 9;
|
||||
const PREFETCH_OFFSET_BITS: u32 = 6;
|
||||
const IMMEDIATE_SIZE_SHIFT: u32 = 13;
|
||||
const REGISTER_SIZE_SHIFT: u32 = 23;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Store {
|
||||
pub source: u8,
|
||||
pub predicate: u8,
|
||||
pub address: Address,
|
||||
pub element: ElementSize,
|
||||
pub memory_element: ElementSize,
|
||||
pub register_count: u8,
|
||||
pub non_temporal: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum WholeTarget {
|
||||
Vector(u8),
|
||||
Predicate(u8),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct WholeStore {
|
||||
pub target: WholeTarget,
|
||||
pub address: Address,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Prefetch {
|
||||
pub hint: u8,
|
||||
pub predicate: u8,
|
||||
pub address: Address,
|
||||
pub element: ElementSize,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Operand {
|
||||
Store(Store),
|
||||
Whole(WholeStore),
|
||||
Prefetch(Prefetch),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
enum Element {
|
||||
Encoded,
|
||||
Word,
|
||||
Fixed(u8),
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
struct Form {
|
||||
mask: u32,
|
||||
value: u32,
|
||||
memory_bytes: u8,
|
||||
element: Element,
|
||||
register_count: u8,
|
||||
register_offset: bool,
|
||||
non_temporal: bool,
|
||||
}
|
||||
|
||||
const FORMS: &[Form] = &[
|
||||
Form {
|
||||
mask: 0xff90e000,
|
||||
value: 0xe400e000,
|
||||
memory_bytes: 1,
|
||||
element: Element::Encoded,
|
||||
register_count: 1,
|
||||
register_offset: false,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xff80e000,
|
||||
value: 0xe4004000,
|
||||
memory_bytes: 1,
|
||||
element: Element::Encoded,
|
||||
register_count: 1,
|
||||
register_offset: true,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xfff0e000,
|
||||
value: 0xe5e0e000,
|
||||
memory_bytes: 8,
|
||||
element: Element::Fixed(8),
|
||||
register_count: 1,
|
||||
register_offset: false,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xffe0e000,
|
||||
value: 0xe5e04000,
|
||||
memory_bytes: 8,
|
||||
element: Element::Fixed(8),
|
||||
register_count: 1,
|
||||
register_offset: true,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xff90e000,
|
||||
value: 0xe480e000,
|
||||
memory_bytes: 2,
|
||||
element: Element::Encoded,
|
||||
register_count: 1,
|
||||
register_offset: false,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xff80e000,
|
||||
value: 0xe4804000,
|
||||
memory_bytes: 2,
|
||||
element: Element::Encoded,
|
||||
register_count: 1,
|
||||
register_offset: true,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xffd0e000,
|
||||
value: 0xe540e000,
|
||||
memory_bytes: 4,
|
||||
element: Element::Word,
|
||||
register_count: 1,
|
||||
register_offset: false,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xffc0e000,
|
||||
value: 0xe5404000,
|
||||
memory_bytes: 4,
|
||||
element: Element::Word,
|
||||
register_count: 1,
|
||||
register_offset: true,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xfff0e000,
|
||||
value: 0xe4400000,
|
||||
memory_bytes: 16,
|
||||
element: Element::Fixed(16),
|
||||
register_count: 2,
|
||||
register_offset: false,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xffe0e000,
|
||||
value: 0xe4600000,
|
||||
memory_bytes: 16,
|
||||
element: Element::Fixed(16),
|
||||
register_count: 2,
|
||||
register_offset: true,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xfff0e000,
|
||||
value: 0xe4800000,
|
||||
memory_bytes: 16,
|
||||
element: Element::Fixed(16),
|
||||
register_count: 3,
|
||||
register_offset: false,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xffe0e000,
|
||||
value: 0xe4a00000,
|
||||
memory_bytes: 16,
|
||||
element: Element::Fixed(16),
|
||||
register_count: 3,
|
||||
register_offset: true,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xfff0e000,
|
||||
value: 0xe4c00000,
|
||||
memory_bytes: 16,
|
||||
element: Element::Fixed(16),
|
||||
register_count: 4,
|
||||
register_offset: false,
|
||||
non_temporal: false,
|
||||
},
|
||||
Form {
|
||||
mask: 0xffe0e000,
|
||||
value: 0xe4e00000,
|
||||
memory_bytes: 16,
|
||||
element: Element::Fixed(16),
|
||||
register_count: 4,
|
||||
register_offset: true,
|
||||
non_temporal: false,
|
||||
},
|
||||
];
|
||||
|
||||
/// None means another allocation; Err marks a recognized unallocated operand.
|
||||
pub fn decode(word: u32) -> Option<Result<Operand, ()>> {
|
||||
if let Some(form) = grouped_form(word) {
|
||||
return Some(decode_store(word, form).map(Operand::Store));
|
||||
}
|
||||
if let Some(form) = FORMS.iter().find(|form| word & form.mask == form.value) {
|
||||
return Some(decode_store(word, *form).map(Operand::Store));
|
||||
}
|
||||
if let Some(whole) = decode_whole(word) {
|
||||
return Some(Ok(Operand::Whole(whole)));
|
||||
}
|
||||
decode_prefetch(word).map(|result| result.map(Operand::Prefetch))
|
||||
}
|
||||
|
||||
/// B/H/W/D structured and non-temporal classes share size and tuple fields.
|
||||
fn grouped_form(word: u32) -> Option<Form> {
|
||||
let (mask, register_offset) = if word & GROUPED_IMMEDIATE_MASK == GROUPED_IMMEDIATE_CLASS {
|
||||
(GROUPED_IMMEDIATE_MASK, false)
|
||||
} else if word & GROUPED_REGISTER_MASK == GROUPED_REGISTER_CLASS {
|
||||
(GROUPED_REGISTER_MASK, true)
|
||||
} else {
|
||||
return None;
|
||||
};
|
||||
let memory_bytes = BYTE_BYTES << ((word >> MEMORY_SIZE_SHIFT) & SIZE_MASK);
|
||||
let tuple_index = ((word >> TUPLE_COUNT_SHIFT) & TUPLE_COUNT_MASK) as u8;
|
||||
let allocation_mask =
|
||||
mask | (SIZE_MASK << MEMORY_SIZE_SHIFT) | (TUPLE_COUNT_MASK << TUPLE_COUNT_SHIFT);
|
||||
Some(Form {
|
||||
mask: allocation_mask,
|
||||
value: word & allocation_mask,
|
||||
memory_bytes,
|
||||
element: Element::Fixed(memory_bytes),
|
||||
register_count: tuple_index + 1,
|
||||
register_offset,
|
||||
non_temporal: tuple_index == 0,
|
||||
})
|
||||
}
|
||||
|
||||
fn signed(value: u32, bits: u32) -> i16 {
|
||||
let shift = u32::BITS - bits;
|
||||
((value << shift) as i32 >> shift) as i16
|
||||
}
|
||||
|
||||
fn base(word: u32) -> crate::aarch64::Register {
|
||||
register((word >> BASE_SHIFT) & REGISTER_MASK, true)
|
||||
}
|
||||
|
||||
fn decode_store(word: u32, form: Form) -> Result<Store, ()> {
|
||||
let element_bytes = match form.element {
|
||||
Element::Encoded => BYTE_BYTES << ((word >> SIZE_SHIFT) & SIZE_MASK),
|
||||
Element::Word => WORD_BYTES << ((word >> SIZE_SHIFT) & WORD_SIZE_MASK),
|
||||
Element::Fixed(bytes) => bytes,
|
||||
};
|
||||
if element_bytes < form.memory_bytes {
|
||||
return Err(());
|
||||
}
|
||||
let offset = if form.register_offset {
|
||||
let index = (word >> OFFSET_SHIFT) & REGISTER_MASK;
|
||||
if index == REGISTER_MASK {
|
||||
return Err(());
|
||||
}
|
||||
Offset::Register {
|
||||
index: register(index, false),
|
||||
shift: form.memory_bytes.trailing_zeros() as u8,
|
||||
}
|
||||
} else {
|
||||
Offset::Immediate {
|
||||
value: signed((word >> OFFSET_SHIFT) & IMMEDIATE_MASK, IMMEDIATE_BITS),
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: form.memory_bytes * form.register_count,
|
||||
divide: element_bytes,
|
||||
},
|
||||
}
|
||||
};
|
||||
Ok(Store {
|
||||
source: (word & REGISTER_MASK) as u8,
|
||||
predicate: ((word >> PREDICATE_SHIFT) & PREDICATE_MASK) as u8,
|
||||
address: Address {
|
||||
base: base(word),
|
||||
offset,
|
||||
},
|
||||
element: ElementSize::from_bytes(usize::from(element_bytes))
|
||||
.expect("allocated element width"),
|
||||
memory_element: ElementSize::from_bytes(usize::from(form.memory_bytes))
|
||||
.expect("allocated memory width"),
|
||||
register_count: form.register_count,
|
||||
non_temporal: form.non_temporal,
|
||||
})
|
||||
}
|
||||
|
||||
fn decode_whole(word: u32) -> Option<WholeStore> {
|
||||
let (target, scale) = if word & WHOLE_VECTOR_MASK == WHOLE_VECTOR_CLASS {
|
||||
(
|
||||
WholeTarget::Vector((word & REGISTER_MASK) as u8),
|
||||
Scale::VectorBytes {
|
||||
multiply: 1,
|
||||
divide: 1,
|
||||
},
|
||||
)
|
||||
} else if word & WHOLE_PREDICATE_MASK == WHOLE_PREDICATE_CLASS {
|
||||
(
|
||||
WholeTarget::Predicate((word & HINT_MASK) as u8),
|
||||
Scale::PredicateBytes,
|
||||
)
|
||||
} else {
|
||||
return None;
|
||||
};
|
||||
let high_mask = (1 << PREFETCH_OFFSET_BITS) - 1;
|
||||
let high = (word >> OFFSET_SHIFT) & high_mask;
|
||||
let low = (word >> PREDICATE_SHIFT) & PREDICATE_MASK;
|
||||
Some(WholeStore {
|
||||
target,
|
||||
address: Address {
|
||||
base: base(word),
|
||||
offset: Offset::Immediate {
|
||||
value: signed((high << WHOLE_LOW_BITS) | low, WHOLE_OFFSET_BITS),
|
||||
scale,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
fn decode_prefetch(word: u32) -> Option<Result<Prefetch, ()>> {
|
||||
let (offset, size_shift) = if word & PREFETCH_IMMEDIATE_MASK == PREFETCH_IMMEDIATE_CLASS {
|
||||
let offset_mask = (1 << PREFETCH_OFFSET_BITS) - 1;
|
||||
(
|
||||
Offset::Immediate {
|
||||
value: signed((word >> OFFSET_SHIFT) & offset_mask, PREFETCH_OFFSET_BITS),
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: 1,
|
||||
divide: 1,
|
||||
},
|
||||
},
|
||||
IMMEDIATE_SIZE_SHIFT,
|
||||
)
|
||||
} else if word & PREFETCH_REGISTER_MASK == PREFETCH_REGISTER_CLASS {
|
||||
let index = (word >> OFFSET_SHIFT) & REGISTER_MASK;
|
||||
if index == REGISTER_MASK {
|
||||
return Some(Err(()));
|
||||
}
|
||||
let shift = ((word >> REGISTER_SIZE_SHIFT) & SIZE_MASK) as u8;
|
||||
(
|
||||
Offset::Register {
|
||||
index: register(index, false),
|
||||
shift,
|
||||
},
|
||||
REGISTER_SIZE_SHIFT,
|
||||
)
|
||||
} else {
|
||||
return None;
|
||||
};
|
||||
Some(Ok(Prefetch {
|
||||
hint: (word & HINT_MASK) as u8,
|
||||
predicate: ((word >> PREDICATE_SHIFT) & PREDICATE_MASK) as u8,
|
||||
address: Address {
|
||||
base: base(word),
|
||||
offset,
|
||||
},
|
||||
element: ElementSize::from_bytes(usize::from(
|
||||
BYTE_BYTES << ((word >> size_shift) & SIZE_MASK),
|
||||
))
|
||||
.expect("allocated prefetch element width"),
|
||||
}))
|
||||
}
|
||||
|
||||
/// All owned decode classes select CheckSVEEnabled. ST1W/D's other source
|
||||
/// branch requires esize128 and belongs to separate, unowned XML classes.
|
||||
pub(crate) fn execution_access_requirements(operand: &Operand) -> ScalableAccessRequirements {
|
||||
match operand {
|
||||
Operand::Store(_) | Operand::Whole(_) | Operand::Prefetch(_) => {
|
||||
ScalableAccessRequirements::Known(Box::new([ScalableAccessCheck::SveEnabled]))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Maximum individual guest Mem quantity; source lanes and host envelopes
|
||||
/// remain separate. Whole-register source Operations explicitly access bytes.
|
||||
pub(crate) const fn guest_memory_quantity(operand: &Operand) -> GuestMemoryQuantity {
|
||||
match operand {
|
||||
Operand::Store(store) => GuestMemoryQuantity::Maximum(store.memory_element),
|
||||
Operand::Whole(_) => GuestMemoryQuantity::Maximum(ElementSize::Byte),
|
||||
Operand::Prefetch(_) => GuestMemoryQuantity::None,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::aarch64::Register;
|
||||
|
||||
#[test]
|
||||
fn every_store_class_preserves_registers_and_address_scale() {
|
||||
let mut forms = FORMS.to_vec();
|
||||
for size in 0..=SIZE_MASK {
|
||||
for tuple_index in 0..=TUPLE_COUNT_MASK {
|
||||
for class in [GROUPED_IMMEDIATE_CLASS, GROUPED_REGISTER_CLASS] {
|
||||
let word =
|
||||
class | (size << MEMORY_SIZE_SHIFT) | (tuple_index << TUPLE_COUNT_SHIFT);
|
||||
forms.push(grouped_form(word).unwrap());
|
||||
}
|
||||
}
|
||||
}
|
||||
for form in &forms {
|
||||
for source in 0..=REGISTER_MASK {
|
||||
for base_register in 0..=REGISTER_MASK {
|
||||
for offset in [0, IMMEDIATE_MASK, REGISTER_MASK] {
|
||||
if !form.register_offset && offset > IMMEDIATE_MASK {
|
||||
continue;
|
||||
}
|
||||
let size = match form.element {
|
||||
Element::Encoded => form.memory_bytes.trailing_zeros(),
|
||||
_ => 0,
|
||||
};
|
||||
let word = form.value
|
||||
| (size << SIZE_SHIFT)
|
||||
| source
|
||||
| (base_register << BASE_SHIFT)
|
||||
| (PREDICATE_MASK << PREDICATE_SHIFT)
|
||||
| (offset << OFFSET_SHIFT);
|
||||
let result = decode(word).expect("owned store class");
|
||||
if form.register_offset && offset == REGISTER_MASK {
|
||||
assert_eq!(result, Err(()));
|
||||
continue;
|
||||
}
|
||||
let Operand::Store(store) = result.expect("allocated operands") else {
|
||||
panic!("store decoded as another operand");
|
||||
};
|
||||
assert_eq!(store.source, source as u8);
|
||||
assert_eq!(store.predicate, PREDICATE_MASK as u8);
|
||||
assert_eq!(store.address.base, register(base_register, true));
|
||||
assert_eq!(store.memory_element.bytes(), usize::from(form.memory_bytes));
|
||||
assert_eq!(store.register_count, form.register_count);
|
||||
assert_eq!(store.non_temporal, form.non_temporal);
|
||||
match store.address.offset {
|
||||
Offset::Register { index, shift } => {
|
||||
assert_eq!(index, Register::X(offset as u8));
|
||||
assert_eq!(shift, form.memory_bytes.trailing_zeros() as u8);
|
||||
}
|
||||
Offset::Immediate { value, scale } => {
|
||||
assert_eq!(value, signed(offset, IMMEDIATE_BITS));
|
||||
assert_eq!(
|
||||
scale,
|
||||
Scale::VectorBytes {
|
||||
multiply: form.memory_bytes * form.register_count,
|
||||
divide: store.element.bytes() as u8,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn narrowing_halfword_rejects_byte_source_elements() {
|
||||
for class in [0xe480_e000, 0xe480_4000] {
|
||||
assert_eq!(decode(class), Some(Err(())));
|
||||
assert!(matches!(
|
||||
decode(class | (1 << SIZE_SHIFT)),
|
||||
Some(Ok(Operand::Store(_)))
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn whole_offsets_preserve_all_signed_nine_bit_values() {
|
||||
let count = 1 << WHOLE_OFFSET_BITS;
|
||||
for immediate in 0..count {
|
||||
let high = immediate >> WHOLE_LOW_BITS;
|
||||
let low = immediate & PREDICATE_MASK;
|
||||
for (class, target, scale) in [
|
||||
(
|
||||
WHOLE_VECTOR_CLASS,
|
||||
WholeTarget::Vector(REGISTER_MASK as u8),
|
||||
Scale::VectorBytes {
|
||||
multiply: 1,
|
||||
divide: 1,
|
||||
},
|
||||
),
|
||||
(
|
||||
WHOLE_PREDICATE_CLASS,
|
||||
WholeTarget::Predicate(HINT_MASK as u8),
|
||||
Scale::PredicateBytes,
|
||||
),
|
||||
] {
|
||||
let source = match target {
|
||||
WholeTarget::Vector(index) | WholeTarget::Predicate(index) => u32::from(index),
|
||||
};
|
||||
let word = class
|
||||
| source
|
||||
| (REGISTER_MASK << BASE_SHIFT)
|
||||
| (high << OFFSET_SHIFT)
|
||||
| (low << PREDICATE_SHIFT);
|
||||
let Operand::Whole(store) = decode(word).unwrap().unwrap() else {
|
||||
panic!("whole store decoded as another operand");
|
||||
};
|
||||
assert_eq!(store.target, target);
|
||||
assert_eq!(store.address.base, Register::Sp);
|
||||
assert_eq!(
|
||||
store.address.offset,
|
||||
Offset::Immediate {
|
||||
value: signed(immediate, WHOLE_OFFSET_BITS),
|
||||
scale,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn prefetch_preserves_all_hints_and_scales_and_declines_reserved_index() {
|
||||
for size in 0..=SIZE_MASK {
|
||||
for hint in 0..=HINT_MASK {
|
||||
for immediate in 0..(1 << PREFETCH_OFFSET_BITS) {
|
||||
let word = PREFETCH_IMMEDIATE_CLASS
|
||||
| hint
|
||||
| (size << IMMEDIATE_SIZE_SHIFT)
|
||||
| (immediate << OFFSET_SHIFT);
|
||||
let Operand::Prefetch(prefetch) = decode(word).unwrap().unwrap() else {
|
||||
panic!("prefetch decoded as another operand");
|
||||
};
|
||||
assert_eq!(prefetch.hint, hint as u8);
|
||||
assert_eq!(prefetch.element.bytes(), usize::from(BYTE_BYTES << size));
|
||||
assert_eq!(
|
||||
prefetch.address.offset,
|
||||
Offset::Immediate {
|
||||
value: signed(immediate, PREFETCH_OFFSET_BITS),
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: 1,
|
||||
divide: 1
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
let reserved = PREFETCH_REGISTER_CLASS
|
||||
| hint
|
||||
| (size << REGISTER_SIZE_SHIFT)
|
||||
| (REGISTER_MASK << OFFSET_SHIFT);
|
||||
assert_eq!(decode(reserved), Some(Err(())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unrelated_and_nonstreaming_quadword_single_forms_are_unowned() {
|
||||
for word in [
|
||||
0,
|
||||
u32::MAX,
|
||||
0xd503_201f,
|
||||
0xe500_e000,
|
||||
0xe500_4000,
|
||||
0xe5c0_e000,
|
||||
0xe5c0_4000,
|
||||
] {
|
||||
assert_eq!(decode(word), None);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn guest_quantity_tracks_narrowed_memory_not_source_lanes() {
|
||||
const ST1B_IMMEDIATE: u32 = 0xe400_e000;
|
||||
const ST1H_IMMEDIATE: u32 = 0xe480_e000;
|
||||
const ST1W_IMMEDIATE: u32 = 0xe540_e000;
|
||||
const DOUBLEWORD_SIZE: u32 = 3;
|
||||
const WORD_DOUBLEWORD_SELECTOR: u32 = 1;
|
||||
for (word, expected) in [
|
||||
(
|
||||
ST1B_IMMEDIATE | (DOUBLEWORD_SIZE << SIZE_SHIFT),
|
||||
ElementSize::Byte,
|
||||
),
|
||||
(
|
||||
ST1H_IMMEDIATE | (DOUBLEWORD_SIZE << SIZE_SHIFT),
|
||||
ElementSize::Halfword,
|
||||
),
|
||||
(
|
||||
ST1W_IMMEDIATE | (WORD_DOUBLEWORD_SELECTOR << SIZE_SHIFT),
|
||||
ElementSize::Word,
|
||||
),
|
||||
] {
|
||||
let operand = decode(word).unwrap().unwrap();
|
||||
let Operand::Store(store) = operand else {
|
||||
panic!("narrow store class");
|
||||
};
|
||||
assert_eq!(store.element, ElementSize::Doubleword);
|
||||
assert_eq!(
|
||||
guest_memory_quantity(&operand),
|
||||
GuestMemoryQuantity::Maximum(expected)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn whole_bytes_and_ignored_hints_retain_source_access_checks() {
|
||||
for (word, quantity) in [
|
||||
(
|
||||
WHOLE_VECTOR_CLASS,
|
||||
GuestMemoryQuantity::Maximum(ElementSize::Byte),
|
||||
),
|
||||
(
|
||||
WHOLE_PREDICATE_CLASS,
|
||||
GuestMemoryQuantity::Maximum(ElementSize::Byte),
|
||||
),
|
||||
(PREFETCH_IMMEDIATE_CLASS, GuestMemoryQuantity::None),
|
||||
(PREFETCH_REGISTER_CLASS, GuestMemoryQuantity::None),
|
||||
] {
|
||||
let operand = decode(word).unwrap().unwrap();
|
||||
assert_eq!(guest_memory_quantity(&operand), quantity);
|
||||
assert_eq!(
|
||||
execution_access_requirements(&operand),
|
||||
ScalableAccessRequirements::Known(Box::new([ScalableAccessCheck::SveEnabled]))
|
||||
);
|
||||
}
|
||||
for form in FORMS
|
||||
.iter()
|
||||
.filter(|form| form.memory_bytes == ElementSize::Quadword.bytes() as u8)
|
||||
{
|
||||
let operand = decode(form.value).unwrap().unwrap();
|
||||
assert_eq!(
|
||||
guest_memory_quantity(&operand),
|
||||
GuestMemoryQuantity::Maximum(ElementSize::Quadword)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
//! Predicated deinterleaving LD2/LD3/LD4 transfers, including 128-bit elements.
|
||||
use super::memory::{Address, Offset, Scale};
|
||||
use crate::aarch64::{
|
||||
register,
|
||||
scalable::{
|
||||
ElementSize, VECTOR_REGISTER_COUNT,
|
||||
execution::{GuestMemoryQuantity, ScalableAccessCheck, ScalableAccessRequirements},
|
||||
},
|
||||
};
|
||||
|
||||
const IMMEDIATE_MASK: u32 = 0xfe10_e000;
|
||||
const IMMEDIATE_CLASS: u32 = 0xa400_e000;
|
||||
const REGISTER_MASK: u32 = 0xfe00_e000;
|
||||
const REGISTER_CLASS: u32 = 0xa400_c000;
|
||||
const QUAD_IMMEDIATE_MASK: u32 = 0xfe70_e000;
|
||||
const QUAD_IMMEDIATE_CLASS: u32 = 0xa410_e000;
|
||||
const QUAD_REGISTER_MASK: u32 = 0xfe60_e000;
|
||||
const QUAD_REGISTER_CLASS: u32 = 0xa420_8000;
|
||||
const ELEMENT_SHIFT: u32 = 23;
|
||||
const ELEMENT_MASK: u32 = 3;
|
||||
const QUADWORD_SHIFT: u32 = ElementSize::Quadword.bytes().trailing_zeros();
|
||||
const TUPLE_SHIFT: u32 = 21;
|
||||
const QUAD_TUPLE_SHIFT: u32 = 23;
|
||||
const TUPLE_MASK: u32 = 3;
|
||||
const REGISTER_BITS: u32 = 5;
|
||||
const REGISTER_FIELD_MASK: u32 = (1 << REGISTER_BITS) - 1;
|
||||
const OFFSET_SHIFT: u32 = 16;
|
||||
const IMMEDIATE_BITS: u32 = 4;
|
||||
const IMMEDIATE_FIELD_MASK: u32 = (1 << IMMEDIATE_BITS) - 1;
|
||||
const IMMEDIATE_SIGN_SHIFT: u32 = i8::BITS - IMMEDIATE_BITS;
|
||||
const PREDICATE_SHIFT: u32 = 10;
|
||||
const PREDICATE_BITS: u32 = 3;
|
||||
const PREDICATE_MASK: u32 = (1 << PREDICATE_BITS) - 1;
|
||||
const BASE_SHIFT: u32 = 5;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Operand {
|
||||
pub destination: u8,
|
||||
pub registers: u8,
|
||||
pub predicate: u8,
|
||||
pub address: Address,
|
||||
pub element: ElementSize,
|
||||
}
|
||||
|
||||
impl Operand {
|
||||
pub const fn destination_register(self, tuple_index: u8) -> u8 {
|
||||
(self.destination + tuple_index) % VECTOR_REGISTER_COUNT
|
||||
}
|
||||
|
||||
/// Q forms need FEAT_SVE2p1 or FEAT_SME2p1; the common dispatch checks mode.
|
||||
pub const fn requires_sve2p1_or_sme2p1(self) -> bool {
|
||||
matches!(self.element, ElementSize::Quadword)
|
||||
}
|
||||
}
|
||||
|
||||
/// Tuple writes happen only after every active element read has completed.
|
||||
/// Predicates select bit `element_index * element_bytes`; inactive lanes zero.
|
||||
/// Base31 denotes SP. Register-offset forms always enable architectural tag
|
||||
/// checks, whereas immediate-offset forms enable them only for a GPR base.
|
||||
pub fn decode(word: u32) -> Option<Result<Operand, ()>> {
|
||||
let (immediate, quadword) = match word {
|
||||
_ if word & IMMEDIATE_MASK == IMMEDIATE_CLASS => (true, false),
|
||||
_ if word & REGISTER_MASK == REGISTER_CLASS => (false, false),
|
||||
_ if word & QUAD_IMMEDIATE_MASK == QUAD_IMMEDIATE_CLASS => (true, true),
|
||||
_ if word & QUAD_REGISTER_MASK == QUAD_REGISTER_CLASS => (false, true),
|
||||
_ => return None,
|
||||
};
|
||||
let tuple_shift = if quadword {
|
||||
QUAD_TUPLE_SHIFT
|
||||
} else {
|
||||
TUPLE_SHIFT
|
||||
};
|
||||
let tuple = ((word >> tuple_shift) & TUPLE_MASK) as u8;
|
||||
if tuple == 0 {
|
||||
return None;
|
||||
}
|
||||
let registers = tuple + 1;
|
||||
let element_shift = if quadword {
|
||||
QUADWORD_SHIFT
|
||||
} else {
|
||||
(word >> ELEMENT_SHIFT) & ELEMENT_MASK
|
||||
};
|
||||
let element = ElementSize::from_bytes(1 << element_shift)?;
|
||||
let offset = if immediate {
|
||||
let raw = ((word >> OFFSET_SHIFT) & IMMEDIATE_FIELD_MASK) as i8;
|
||||
Offset::Immediate {
|
||||
value: i16::from((raw << IMMEDIATE_SIGN_SHIFT) >> IMMEDIATE_SIGN_SHIFT),
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: registers,
|
||||
divide: 1,
|
||||
},
|
||||
}
|
||||
} else {
|
||||
let index = (word >> OFFSET_SHIFT) & REGISTER_FIELD_MASK;
|
||||
if index == REGISTER_FIELD_MASK {
|
||||
return Some(Err(()));
|
||||
}
|
||||
Offset::Register {
|
||||
index: register(index, false),
|
||||
shift: element_shift as u8,
|
||||
}
|
||||
};
|
||||
let address = Address {
|
||||
base: register((word >> BASE_SHIFT) & REGISTER_FIELD_MASK, true),
|
||||
offset,
|
||||
};
|
||||
Some(Ok(Operand {
|
||||
destination: (word & REGISTER_FIELD_MASK) as u8,
|
||||
registers,
|
||||
predicate: ((word >> PREDICATE_SHIFT) & PREDICATE_MASK) as u8,
|
||||
address,
|
||||
element,
|
||||
}))
|
||||
}
|
||||
|
||||
/// All allocated structured-load forms call exactly CheckSVEEnabled(). Nested
|
||||
/// checks stay with the common authoritative source-control evaluator.
|
||||
pub(crate) fn execution_access_requirements(_operand: &Operand) -> ScalableAccessRequirements {
|
||||
ScalableAccessRequirements::Known(Box::new([ScalableAccessCheck::SveEnabled]))
|
||||
}
|
||||
|
||||
/// One reached guest read transfers exactly one element. Tuple count, total
|
||||
/// vector bytes, private staging size and host envelopes are separate facts.
|
||||
pub(crate) const fn guest_memory_quantity(operand: &Operand) -> GuestMemoryQuantity {
|
||||
GuestMemoryQuantity::Maximum(operand.element)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
const FORM_ROWS: [(u32, u8, ElementSize, bool); 30] = [
|
||||
(0xa420_e000, 2, ElementSize::Byte, true),
|
||||
(0xa420_c000, 2, ElementSize::Byte, false),
|
||||
(0xa4a0_e000, 2, ElementSize::Halfword, true),
|
||||
(0xa4a0_c000, 2, ElementSize::Halfword, false),
|
||||
(0xa520_e000, 2, ElementSize::Word, true),
|
||||
(0xa520_c000, 2, ElementSize::Word, false),
|
||||
(0xa5a0_e000, 2, ElementSize::Doubleword, true),
|
||||
(0xa5a0_c000, 2, ElementSize::Doubleword, false),
|
||||
(0xa490_e000, 2, ElementSize::Quadword, true),
|
||||
(0xa4a0_8000, 2, ElementSize::Quadword, false),
|
||||
(0xa440_e000, 3, ElementSize::Byte, true),
|
||||
(0xa440_c000, 3, ElementSize::Byte, false),
|
||||
(0xa4c0_e000, 3, ElementSize::Halfword, true),
|
||||
(0xa4c0_c000, 3, ElementSize::Halfword, false),
|
||||
(0xa540_e000, 3, ElementSize::Word, true),
|
||||
(0xa540_c000, 3, ElementSize::Word, false),
|
||||
(0xa5c0_e000, 3, ElementSize::Doubleword, true),
|
||||
(0xa5c0_c000, 3, ElementSize::Doubleword, false),
|
||||
(0xa510_e000, 3, ElementSize::Quadword, true),
|
||||
(0xa520_8000, 3, ElementSize::Quadword, false),
|
||||
(0xa460_e000, 4, ElementSize::Byte, true),
|
||||
(0xa460_c000, 4, ElementSize::Byte, false),
|
||||
(0xa4e0_e000, 4, ElementSize::Halfword, true),
|
||||
(0xa4e0_c000, 4, ElementSize::Halfword, false),
|
||||
(0xa560_e000, 4, ElementSize::Word, true),
|
||||
(0xa560_c000, 4, ElementSize::Word, false),
|
||||
(0xa5e0_e000, 4, ElementSize::Doubleword, true),
|
||||
(0xa5e0_c000, 4, ElementSize::Doubleword, false),
|
||||
(0xa590_e000, 4, ElementSize::Quadword, true),
|
||||
(0xa5a0_8000, 4, ElementSize::Quadword, false),
|
||||
];
|
||||
|
||||
#[test]
|
||||
fn all_forms_preserve_fields_and_tuple_wrap() {
|
||||
for (class, registers, width, immediate) in FORM_ROWS {
|
||||
for destination in 0..VECTOR_REGISTER_COUNT {
|
||||
for predicate in 0..=PREDICATE_MASK {
|
||||
let word = class
|
||||
| REGISTER_FIELD_MASK << BASE_SHIFT
|
||||
| predicate << PREDICATE_SHIFT
|
||||
| u32::from(destination);
|
||||
let operand = decode(word).unwrap().unwrap();
|
||||
assert_eq!(operand.destination, destination);
|
||||
assert_eq!(operand.registers, registers);
|
||||
assert_eq!(operand.element, width);
|
||||
assert_eq!(operand.predicate, predicate as u8);
|
||||
assert_eq!(operand.address.base, register(REGISTER_FIELD_MASK, true));
|
||||
assert_eq!(
|
||||
matches!(operand.address.offset, Offset::Immediate { .. }),
|
||||
immediate
|
||||
);
|
||||
for index in 0..registers {
|
||||
assert_eq!(
|
||||
operand.destination_register(index),
|
||||
(destination + index) % VECTOR_REGISTER_COUNT
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn signed_immediates_and_reserved_index_registers() {
|
||||
for (class, _, _, immediate) in FORM_ROWS {
|
||||
if immediate {
|
||||
for raw in 0..=IMMEDIATE_FIELD_MASK {
|
||||
let operand = decode(class | raw << OFFSET_SHIFT).unwrap().unwrap();
|
||||
let expected = if raw < 1 << (IMMEDIATE_BITS - 1) {
|
||||
raw as i8
|
||||
} else {
|
||||
raw as i8 - (1 << IMMEDIATE_BITS)
|
||||
};
|
||||
assert_eq!(
|
||||
operand.address.offset,
|
||||
Offset::Immediate {
|
||||
value: i16::from(expected),
|
||||
scale: Scale::VectorBytes {
|
||||
multiply: operand.registers,
|
||||
divide: 1
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
} else {
|
||||
assert_eq!(
|
||||
decode(class | REGISTER_FIELD_MASK << OFFSET_SHIFT),
|
||||
Some(Err(()))
|
||||
);
|
||||
}
|
||||
}
|
||||
assert_eq!(decode(IMMEDIATE_CLASS), None);
|
||||
assert_eq!(decode(REGISTER_CLASS), None);
|
||||
assert_eq!(decode(QUAD_IMMEDIATE_CLASS), None);
|
||||
assert_eq!(decode(QUAD_REGISTER_CLASS), None);
|
||||
}
|
||||
}
|
||||
@@ -16,19 +16,26 @@ use crate::{
|
||||
Decoder, Instruction, Operation,
|
||||
scalable::{
|
||||
ElementSize, ScalableMode, VectorLength,
|
||||
execution::{
|
||||
GuestMemoryQuantity, InstructionExecutionRequirements, ScalableAccessCheck,
|
||||
ScalableAccessRequirements, ScalableExecutionRequirements,
|
||||
},
|
||||
features::{FeatureRequirement, ScalableFeature, ScalableFeatures},
|
||||
profile::ScalableControls,
|
||||
},
|
||||
sme::{integer_dots, integer_matrix, integer_vector, length, movement, tables},
|
||||
sme::{
|
||||
integer_dots, integer_matrix, integer_vector, length, memory as sme_memory, movement,
|
||||
tables,
|
||||
},
|
||||
sve::{
|
||||
address, dot, floating_copy, integer_arithmetic, integer_bits, integer_comparison,
|
||||
integer_logic::{self, CopySource, Kind},
|
||||
integer_predicate_move, integer_products, integer_saturation, predicate_generation,
|
||||
predicate_logic, rearrange, rearrange_extract, rearrange_widen, reductions, shifts,
|
||||
shifts_narrow, sign,
|
||||
integer_predicate_move, integer_products, integer_saturation, memory_load,
|
||||
memory_multi, memory_store, memory_structure, predicate_generation, predicate_logic,
|
||||
rearrange, rearrange_extract, rearrange_widen, reductions, shifts, shifts_narrow, sign,
|
||||
},
|
||||
},
|
||||
context::{ExecutionContext, ScalableStateView},
|
||||
context::{ExecutionContext, ScalableStateView, memory::MemoryRequirements},
|
||||
x86_64,
|
||||
};
|
||||
|
||||
@@ -244,6 +251,11 @@ pub(crate) enum Decoded {
|
||||
PredicateGeneration(predicate_generation::Operand),
|
||||
PredicateLogic(predicate_logic::Operand),
|
||||
Length(length::Operand),
|
||||
MemoryLoad(memory_load::Operand),
|
||||
SmeMemory(sme_memory::Operand),
|
||||
MemoryMulti(memory_multi::Operand),
|
||||
MemoryStore(memory_store::Operand),
|
||||
MemoryStructure(memory_structure::Operand),
|
||||
SmeTables(tables::Operand),
|
||||
SmeMovement(movement::Operand),
|
||||
SmeIntegerVector(integer_vector::Operand),
|
||||
@@ -252,12 +264,109 @@ pub(crate) enum Decoded {
|
||||
}
|
||||
|
||||
impl Decoded {
|
||||
fn execution_access_requirements(&self) -> ScalableAccessRequirements {
|
||||
match self {
|
||||
Self::Exclusive(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::MemoryScalar(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::MemoryLoad(_) => {
|
||||
ScalableAccessRequirements::Known(Box::new([ScalableAccessCheck::SveEnabled]))
|
||||
}
|
||||
Self::MemoryMulti(operand) => memory_multi::execution_access_requirements(operand),
|
||||
Self::MemoryStore(operand) => memory_store::execution_access_requirements(operand),
|
||||
Self::MemoryStructure(operand) => {
|
||||
memory_structure::execution_access_requirements(operand)
|
||||
}
|
||||
Self::SmeMemory(operand) => operand.execution_access_requirements(),
|
||||
Self::Ordinary(instruction) => match instruction.operation {
|
||||
Operation::MoveWide { .. }
|
||||
| Operation::AddSub { .. }
|
||||
| Operation::Return
|
||||
| Operation::Nop => ScalableAccessRequirements::Known(Box::new([])),
|
||||
_ => ScalableAccessRequirements::Unqualified,
|
||||
},
|
||||
Self::Address(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::IntegerDot(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::IntegerBits(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::IntegerLogic(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::IntegerPredicateMove(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::IntegerProducts(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::IntegerSaturation(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::Rearrange(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::RearrangeExtract(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::RearrangeWiden(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::Reductions(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::Shifts(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::ShiftsNarrow(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::Sign(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::FloatingCopy(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::IntegerArithmetic(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::IntegerComparison(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::PredicateGeneration(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::PredicateLogic(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::Length(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::SmeTables(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::SmeMovement(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::SmeIntegerVector(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::SmeIntegerDots(_) => ScalableAccessRequirements::Unqualified,
|
||||
Self::SmeIntegerMatrix(_) => ScalableAccessRequirements::Unqualified,
|
||||
}
|
||||
}
|
||||
|
||||
const fn guest_memory_quantity(&self) -> GuestMemoryQuantity {
|
||||
match self {
|
||||
Self::Exclusive(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::MemoryScalar(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::MemoryLoad(operand) => GuestMemoryQuantity::Maximum(operand.memory_element),
|
||||
Self::MemoryMulti(operand) => memory_multi::guest_memory_quantity(operand),
|
||||
Self::MemoryStore(operand) => memory_store::guest_memory_quantity(operand),
|
||||
Self::MemoryStructure(operand) => memory_structure::guest_memory_quantity(operand),
|
||||
Self::SmeMemory(operand) => operand.guest_memory_quantity(),
|
||||
Self::Ordinary(instruction) => match instruction.operation {
|
||||
Operation::MoveWide { .. }
|
||||
| Operation::AddSub { .. }
|
||||
| Operation::Return
|
||||
| Operation::Nop => GuestMemoryQuantity::None,
|
||||
_ => GuestMemoryQuantity::Unqualified,
|
||||
},
|
||||
Self::Address(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::IntegerDot(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::IntegerBits(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::IntegerLogic(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::IntegerPredicateMove(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::IntegerProducts(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::IntegerSaturation(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::Rearrange(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::RearrangeExtract(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::RearrangeWiden(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::Reductions(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::Shifts(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::ShiftsNarrow(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::Sign(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::FloatingCopy(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::IntegerArithmetic(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::IntegerComparison(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::PredicateGeneration(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::PredicateLogic(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::Length(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::SmeTables(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::SmeMovement(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::SmeIntegerVector(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::SmeIntegerDots(_) => GuestMemoryQuantity::Unqualified,
|
||||
Self::SmeIntegerMatrix(_) => GuestMemoryQuantity::Unqualified,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn memory_requirements(&self) -> crate::context::memory::MemoryRequirements {
|
||||
match self {
|
||||
Self::MemoryScalar(operand) => {
|
||||
crate::x86_64::memory_store::checked_scalar::requirements(operand)
|
||||
}
|
||||
Self::Exclusive(operand) => crate::x86_64::exclusive::requirements(operand),
|
||||
Self::MemoryLoad(operand) => x86_64::sve::memory_load::requirements(*operand),
|
||||
Self::SmeMemory(operand) => x86_64::sme::memory::requirements(operand),
|
||||
Self::MemoryMulti(operand) => x86_64::sve::memory_multi::requirements(operand),
|
||||
Self::MemoryStore(operand) => x86_64::sve::memory_store::requirements(operand),
|
||||
Self::MemoryStructure(operand) => x86_64::sve::memory_structure::requirements(*operand),
|
||||
Self::Ordinary(_) => Default::default(),
|
||||
Self::Address(_) => Default::default(),
|
||||
Self::IntegerDot(_) => Default::default(),
|
||||
@@ -295,6 +404,11 @@ impl Decoded {
|
||||
) -> Result<Option<crate::aarch64::sve::prefix::PrefixRequirement>, ()> {
|
||||
match self {
|
||||
Self::Exclusive(_) | Self::MemoryScalar(_) => Ok(None),
|
||||
Self::MemoryLoad(_)
|
||||
| Self::MemoryMulti(_)
|
||||
| Self::MemoryStore(_)
|
||||
| Self::MemoryStructure(_)
|
||||
| Self::SmeMemory(_) => Ok(None),
|
||||
Self::Ordinary(_) => Ok(None),
|
||||
Self::Address(_) => Ok(None),
|
||||
Self::IntegerDot(_) => Ok(None),
|
||||
@@ -338,6 +452,11 @@ impl Decoded {
|
||||
| Self::IntegerArithmetic(_) => Ok(()),
|
||||
Self::Exclusive(_)
|
||||
| Self::MemoryScalar(_)
|
||||
| Self::MemoryLoad(_)
|
||||
| Self::MemoryMulti(_)
|
||||
| Self::MemoryStore(_)
|
||||
| Self::MemoryStructure(_)
|
||||
| Self::SmeMemory(_)
|
||||
| Self::Ordinary(_)
|
||||
| Self::Address(_)
|
||||
| Self::IntegerDot(_)
|
||||
@@ -426,7 +545,12 @@ impl Decoded {
|
||||
Self::Exclusive(operand) => {
|
||||
crate::x86_64::exclusive::emit_context(code, operand, pc.0)?
|
||||
}
|
||||
Self::Address(_)
|
||||
Self::MemoryLoad(_)
|
||||
| Self::SmeMemory(_)
|
||||
| Self::MemoryMulti(_)
|
||||
| Self::MemoryStore(_)
|
||||
| Self::MemoryStructure(_)
|
||||
| Self::Address(_)
|
||||
| Self::SmeTables(_)
|
||||
| Self::SmeMovement(_)
|
||||
| Self::IntegerBits(_)
|
||||
@@ -489,12 +613,67 @@ pub(crate) fn ordinary_permitted(operation: &Operation) -> bool {
|
||||
)
|
||||
}
|
||||
|
||||
fn require_features(
|
||||
profile: ScalableProfile,
|
||||
clauses: &mut Vec<FeatureRequirement>,
|
||||
requirement: FeatureRequirement,
|
||||
pc: GuestAddress,
|
||||
) -> Result<(), CompileError> {
|
||||
profile.require_features(requirement, pc)?;
|
||||
clauses.push(requirement);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// The existing contextual compiler uses this adapter; the leaf collector retains
|
||||
// clauses from the same operand decoder without decoding source a second time.
|
||||
fn decode(
|
||||
pc: GuestAddress,
|
||||
word: u32,
|
||||
profile: ScalableProfile,
|
||||
target: TargetCpu,
|
||||
) -> Result<Decoded, CompileError> {
|
||||
decode_recording_features(pc, word, profile, target, &mut Vec::new())
|
||||
}
|
||||
|
||||
fn decode_recording_features(
|
||||
pc: GuestAddress,
|
||||
word: u32,
|
||||
profile: ScalableProfile,
|
||||
target: TargetCpu,
|
||||
clauses: &mut Vec<FeatureRequirement>,
|
||||
) -> Result<Decoded, CompileError> {
|
||||
if let Some(operand) = sme_memory::decode(word) {
|
||||
let (streaming, za, sme2, zt0) = match operand {
|
||||
sme_memory::Operand::Vectors(_) => (true, false, true, false),
|
||||
sme_memory::Operand::Tile(_) => (true, true, false, false),
|
||||
sme_memory::Operand::ZaVector(_) => (false, true, false, false),
|
||||
sme_memory::Operand::Zt(_) => (false, true, true, true),
|
||||
};
|
||||
if streaming && !profile.mode.streaming() {
|
||||
return Err(CompileError(format!(
|
||||
"streaming mode required at {:#x}",
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
if za && !profile.mode.za_enabled() {
|
||||
return Err(CompileError(format!(
|
||||
"ZA enabled state required at {:#x}",
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
if zt0 && !profile.controls().zt0_enabled() {
|
||||
return Err(CompileError(format!("ZT0 enable required at {:#x}", pc.0)));
|
||||
}
|
||||
let required = if sme2 {
|
||||
ScalableFeatures::of(ScalableFeature::Sme).with(ScalableFeature::Sme2)
|
||||
} else {
|
||||
ScalableFeatures::of(ScalableFeature::Sme)
|
||||
};
|
||||
require_features(profile, clauses, FeatureRequirement::all(required), pc)?;
|
||||
x86_64::sme::memory::validate_target(&operand, target)
|
||||
.map_err(|reason| CompileError(format!("{reason} at {:#x}", pc.0)))?;
|
||||
return Ok(Decoded::SmeMemory(operand));
|
||||
}
|
||||
if let Some(decoded) = integer_vector::decode(word) {
|
||||
let operand = decoded.map_err(|()| {
|
||||
CompileError(format!(
|
||||
@@ -502,7 +681,9 @@ fn decode(
|
||||
pc.0
|
||||
))
|
||||
})?;
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme2)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -517,6 +698,88 @@ fn decode(
|
||||
return Ok(Decoded::SmeIntegerVector(operand));
|
||||
}
|
||||
|
||||
if let Some(decoded) = memory_load::decode(word) {
|
||||
let operand = decoded.map_err(|()| {
|
||||
CompileError(format!("reserved streaming load encoding at {:#x}", pc.0))
|
||||
})?;
|
||||
if !profile.mode.streaming() {
|
||||
return Err(CompileError(format!(
|
||||
"streaming mode required at {:#x}",
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
return Ok(Decoded::MemoryLoad(operand));
|
||||
}
|
||||
if let Some(decoded) = memory_multi::decode(word) {
|
||||
let operand = decoded.map_err(|()| {
|
||||
CompileError(format!(
|
||||
"reserved streaming multi-vector memory encoding at {:#x}",
|
||||
pc.0
|
||||
))
|
||||
})?;
|
||||
if !profile.mode.streaming() {
|
||||
return Err(CompileError(format!(
|
||||
"streaming mode required at {:#x}",
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(
|
||||
ScalableFeatures::of(ScalableFeature::Sme).with(ScalableFeature::Sme2),
|
||||
),
|
||||
pc,
|
||||
)?;
|
||||
return Ok(Decoded::MemoryMulti(operand));
|
||||
}
|
||||
if let Some(decoded) = memory_store::decode(word) {
|
||||
let operand = decoded.map_err(|()| {
|
||||
CompileError(format!("reserved streaming store encoding at {:#x}", pc.0))
|
||||
})?;
|
||||
if !profile.mode.streaming() {
|
||||
return Err(CompileError(format!(
|
||||
"streaming mode required at {:#x}",
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
let mut features = ScalableFeatures::of(ScalableFeature::Sme);
|
||||
if matches!(operand, memory_store::Operand::Store(store)
|
||||
if store.memory_element == ElementSize::Quadword)
|
||||
{
|
||||
features = features.with(ScalableFeature::Sme2p1);
|
||||
}
|
||||
require_features(profile, clauses, FeatureRequirement::all(features), pc)?;
|
||||
return Ok(Decoded::MemoryStore(operand));
|
||||
}
|
||||
if let Some(decoded) = memory_structure::decode(word) {
|
||||
let operand = decoded.map_err(|()| {
|
||||
CompileError(format!(
|
||||
"reserved streaming structured load encoding at {:#x}",
|
||||
pc.0
|
||||
))
|
||||
})?;
|
||||
if !profile.mode.streaming() {
|
||||
return Err(CompileError(format!(
|
||||
"streaming mode required at {:#x}",
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
let mut required = ScalableFeatures::of(ScalableFeature::Sme);
|
||||
// Q allocation accepts SVE2p1 or SME2p1 architecturally. This compiler
|
||||
// entry owns SME streaming profiles, so it uses the SME2p1 alternative.
|
||||
if operand.requires_sve2p1_or_sme2p1() {
|
||||
required = required.with(ScalableFeature::Sme2p1);
|
||||
}
|
||||
require_features(profile, clauses, FeatureRequirement::all(required), pc)?;
|
||||
return Ok(Decoded::MemoryStructure(operand));
|
||||
}
|
||||
if let Some(decoded) = address::decode(word) {
|
||||
let operand = decoded.map_err(|()| {
|
||||
CompileError(format!(
|
||||
@@ -537,7 +800,7 @@ fn decode(
|
||||
) {
|
||||
features = features.with(ScalableFeature::Sme2);
|
||||
}
|
||||
profile.require_features(FeatureRequirement::all(features), pc)?;
|
||||
require_features(profile, clauses, FeatureRequirement::all(features), pc)?;
|
||||
return Ok(Decoded::Address(operand));
|
||||
}
|
||||
if let Some(decoded) = dot::decode_integer(word) {
|
||||
@@ -572,7 +835,7 @@ fn decode(
|
||||
) {
|
||||
required = required.with(ScalableFeature::Sme2);
|
||||
}
|
||||
profile.require_features(FeatureRequirement::all(required), pc)?;
|
||||
require_features(profile, clauses, FeatureRequirement::all(required), pc)?;
|
||||
return Ok(Decoded::IntegerDot(operand));
|
||||
}
|
||||
if let Some(decoded) = integer_predicate_move::decode(word) {
|
||||
@@ -582,7 +845,9 @@ fn decode(
|
||||
pc.0
|
||||
))
|
||||
})?;
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme2p1)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -607,7 +872,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -640,7 +907,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -659,7 +928,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -678,7 +949,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -697,7 +970,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -716,7 +991,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -735,7 +1012,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -762,7 +1041,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -778,7 +1059,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -797,7 +1080,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -814,7 +1099,7 @@ fn decode(
|
||||
if operand.accumulator == ElementSize::Doubleword {
|
||||
features = features.with(ScalableFeature::SmeI16I64);
|
||||
}
|
||||
profile.require_features(FeatureRequirement::all(features), pc)?;
|
||||
require_features(profile, clauses, FeatureRequirement::all(features), pc)?;
|
||||
if !profile.mode.streaming() {
|
||||
return Err(CompileError(format!(
|
||||
"streaming mode required at {:#x}",
|
||||
@@ -839,7 +1124,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -858,7 +1145,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -881,7 +1170,7 @@ fn decode(
|
||||
if operand.requires_sme2() {
|
||||
features = features.with(ScalableFeature::Sme2);
|
||||
}
|
||||
profile.require_features(FeatureRequirement::all(features), pc)?;
|
||||
require_features(profile, clauses, FeatureRequirement::all(features), pc)?;
|
||||
return Ok(Decoded::PredicateGeneration(operand));
|
||||
}
|
||||
if let Some(decoded) = predicate_logic::decode(word) {
|
||||
@@ -907,7 +1196,7 @@ fn decode(
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
profile.require_features(FeatureRequirement::all(features), pc)?;
|
||||
require_features(profile, clauses, FeatureRequirement::all(features), pc)?;
|
||||
return Ok(Decoded::PredicateLogic(operand));
|
||||
}
|
||||
if let Some(decoded) = reductions::decode(word) {
|
||||
@@ -918,7 +1207,9 @@ fn decode(
|
||||
))
|
||||
})?;
|
||||
if operand.output == reductions::Output::Quadword {
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme2p1)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -929,7 +1220,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -949,7 +1242,9 @@ fn decode(
|
||||
| rearrange::Operand::Table { segment: true, .. }
|
||||
| rearrange::Operand::DuplicateSegment { .. }
|
||||
) {
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme2p1)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -960,7 +1255,9 @@ fn decode(
|
||||
pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -987,7 +1284,12 @@ fn decode(
|
||||
movement::Feature::Sme2 => ScalableFeature::Sme2,
|
||||
movement::Feature::Sme2p1 => ScalableFeature::Sme2p1,
|
||||
};
|
||||
profile.require_features(FeatureRequirement::all(ScalableFeatures::of(feature)), pc)?;
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(feature)),
|
||||
pc,
|
||||
)?;
|
||||
if requirements.za && !profile.mode.za_enabled() {
|
||||
return Err(CompileError(format!("ZA state required at {:#x}", pc.0)));
|
||||
}
|
||||
@@ -1032,7 +1334,7 @@ fn decode(
|
||||
if operand.feature == tables::Feature::Sme2p1 {
|
||||
features = features.with(ScalableFeature::Sme2p1);
|
||||
}
|
||||
profile.require_features(FeatureRequirement::all(features), pc)?;
|
||||
require_features(profile, clauses, FeatureRequirement::all(features), pc)?;
|
||||
if !profile.mode.streaming() {
|
||||
return Err(CompileError(format!(
|
||||
"streaming mode required at {:#x}",
|
||||
@@ -1066,7 +1368,7 @@ fn decode(
|
||||
if operand.requires_i16i64() {
|
||||
required = required.with(ScalableFeature::SmeI16I64);
|
||||
}
|
||||
profile.require_features(FeatureRequirement::all(required), pc)?;
|
||||
require_features(profile, clauses, FeatureRequirement::all(required), pc)?;
|
||||
if !profile.mode().streaming() || !profile.mode().za_enabled() {
|
||||
return Err(CompileError(format!(
|
||||
"streaming mode and ZA required for integer matrix operation at {:#x}",
|
||||
@@ -1076,7 +1378,9 @@ fn decode(
|
||||
return Ok(Decoded::SmeIntegerMatrix(operand));
|
||||
}
|
||||
if let Some(operand) = length::decode(word) {
|
||||
profile.require_features(
|
||||
require_features(
|
||||
profile,
|
||||
clauses,
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
pc,
|
||||
)?;
|
||||
@@ -1207,6 +1511,22 @@ fn emit_decoded(
|
||||
Decoded::SmeIntegerMatrix(operand) => {
|
||||
x86_64::sme::integer_matrix::emit(code, &operand, profile.vector_length(), target);
|
||||
}
|
||||
Decoded::SmeMemory(operand) => {
|
||||
x86_64::sme::memory::emit(code, &operand, profile.length, target, pc.0)
|
||||
.map_err(|reason| CompileError(format!("{reason} at {:#x}", pc.0)))?;
|
||||
}
|
||||
Decoded::MemoryLoad(operand) => {
|
||||
x86_64::sve::memory_load::emit(code, operand, profile.length, target, pc.0);
|
||||
}
|
||||
Decoded::MemoryMulti(operand) => {
|
||||
x86_64::sve::memory_multi::emit(code, &operand, profile.length, target, pc.0);
|
||||
}
|
||||
Decoded::MemoryStore(operand) => {
|
||||
x86_64::sve::memory_store::emit(code, &operand, profile.length, target, pc.0);
|
||||
}
|
||||
Decoded::MemoryStructure(operand) => {
|
||||
x86_64::sve::memory_structure::emit(code, &operand, profile.length, target, pc.0);
|
||||
}
|
||||
Decoded::Length(operand) => {
|
||||
x86_64::sme::length::emit(code, &operand, profile.length);
|
||||
}
|
||||
@@ -1214,14 +1534,18 @@ fn emit_decoded(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Compile an extended two-argument leaf ending in RET X30. The runtime must
|
||||
/// validate this exact profile against its owned view before unsafe invocation.
|
||||
pub fn compile_for_profile(
|
||||
struct DecodedLeafInstruction {
|
||||
pc: GuestAddress,
|
||||
instruction: Decoded,
|
||||
feature_clauses: Vec<FeatureRequirement>,
|
||||
}
|
||||
|
||||
fn decode_leaf(
|
||||
source: &[u8],
|
||||
base: GuestAddress,
|
||||
profile: ScalableProfile,
|
||||
target: TargetCpu,
|
||||
) -> Result<NativeBlock, CompileError> {
|
||||
) -> Result<Vec<DecodedLeafInstruction>, CompileError> {
|
||||
if source.is_empty()
|
||||
|| !source.len().is_multiple_of(INSTRUCTION_BYTES)
|
||||
|| !base.0.is_multiple_of(INSTRUCTION_BYTES as u64)
|
||||
@@ -1234,8 +1558,16 @@ pub fn compile_for_profile(
|
||||
let mut offset = 0;
|
||||
while offset < source.len() {
|
||||
if let Some(pair) = prefix::decode_pair(source, offset, base, profile, target)? {
|
||||
instructions.push((pair.prefix_pc, Decoded::IntegerLogic(pair.prefix)));
|
||||
instructions.push((pair.follower_pc, pair.follower));
|
||||
instructions.push(DecodedLeafInstruction {
|
||||
pc: pair.prefix_pc,
|
||||
instruction: Decoded::IntegerLogic(pair.prefix),
|
||||
feature_clauses: vec![pair.prefix_features],
|
||||
});
|
||||
instructions.push(DecodedLeafInstruction {
|
||||
pc: pair.follower_pc,
|
||||
instruction: pair.follower,
|
||||
feature_clauses: pair.follower_features,
|
||||
});
|
||||
offset += prefix::PAIR_BYTES;
|
||||
continue;
|
||||
}
|
||||
@@ -1249,25 +1581,146 @@ pub fn compile_for_profile(
|
||||
.try_into()
|
||||
.expect("checked leaf instruction alignment"),
|
||||
);
|
||||
instructions.push((pc, decode(pc, word, profile, target)?));
|
||||
let mut feature_clauses = Vec::new();
|
||||
let instruction =
|
||||
decode_recording_features(pc, word, profile, target, &mut feature_clauses)?;
|
||||
instructions.push(DecodedLeafInstruction {
|
||||
pc,
|
||||
instruction,
|
||||
feature_clauses,
|
||||
});
|
||||
offset += INSTRUCTION_BYTES;
|
||||
}
|
||||
if !matches!(
|
||||
instructions.last(),
|
||||
Some((
|
||||
_,
|
||||
Decoded::Ordinary(Instruction {
|
||||
Some(DecodedLeafInstruction {
|
||||
instruction: Decoded::Ordinary(Instruction {
|
||||
operation: Operation::Return,
|
||||
..
|
||||
})
|
||||
))
|
||||
}),
|
||||
..
|
||||
})
|
||||
) {
|
||||
return Err(CompileError("leaf region must end in RET X30".into()));
|
||||
}
|
||||
for DecodedLeafInstruction {
|
||||
pc,
|
||||
instruction: decoded,
|
||||
..
|
||||
} in &instructions
|
||||
{
|
||||
let Decoded::Ordinary(instruction) = decoded else {
|
||||
continue;
|
||||
};
|
||||
let target = match &instruction.operation {
|
||||
Operation::Branch { target }
|
||||
| Operation::BranchCondition { target, .. }
|
||||
| Operation::BranchZero { target, .. }
|
||||
| Operation::BranchBit { target, .. } => Some(*target),
|
||||
_ => None,
|
||||
};
|
||||
if let Some(target) = target
|
||||
&& instructions
|
||||
.binary_search_by_key(&target.0, |instruction| instruction.pc.0)
|
||||
.is_err()
|
||||
{
|
||||
return Err(CompileError(format!(
|
||||
"unresolved direct target {:#x} from {:#x}",
|
||||
target.0, pc.0
|
||||
)));
|
||||
}
|
||||
}
|
||||
Ok(instructions)
|
||||
}
|
||||
|
||||
/// Derive complete-body service requirements from the same validated leaf
|
||||
/// parser used by compilation. Pure leaves return explicit empty requirements.
|
||||
pub fn memory_requirements(
|
||||
source: &[u8],
|
||||
base: GuestAddress,
|
||||
profile: ScalableProfile,
|
||||
target: TargetCpu,
|
||||
) -> Result<MemoryRequirements, CompileError> {
|
||||
leaf_memory_requirements(&decode_leaf(source, base, profile, target)?)
|
||||
}
|
||||
|
||||
fn leaf_memory_requirements(
|
||||
instructions: &[DecodedLeafInstruction],
|
||||
) -> Result<MemoryRequirements, CompileError> {
|
||||
instructions
|
||||
.iter()
|
||||
.try_fold(MemoryRequirements::default(), |requirements, decoded| {
|
||||
requirements
|
||||
.merge(decoded.instruction.memory_requirements())
|
||||
.ok_or_else(|| {
|
||||
CompileError(format!(
|
||||
"conflicting memory control requirements at {:#x}",
|
||||
decoded.pc.0
|
||||
))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/// All outputs derive from one validated source vector. No caller-supplied
|
||||
/// execution metadata or service requirements are accepted.
|
||||
pub struct PreparedLeafCode {
|
||||
pub native: NativeBlock,
|
||||
pub memory_requirements: MemoryRequirements,
|
||||
pub execution_requirements: ScalableExecutionRequirements,
|
||||
}
|
||||
|
||||
pub fn prepare_leaf(
|
||||
source: &[u8],
|
||||
base: GuestAddress,
|
||||
profile: ScalableProfile,
|
||||
target: TargetCpu,
|
||||
) -> Result<PreparedLeafCode, CompileError> {
|
||||
let instructions = decode_leaf(source, base, profile, target)?;
|
||||
let memory_requirements = leaf_memory_requirements(&instructions)?;
|
||||
let execution_requirements = ScalableExecutionRequirements::new(
|
||||
instructions
|
||||
.iter()
|
||||
.map(|decoded| {
|
||||
InstructionExecutionRequirements::new(
|
||||
decoded.pc,
|
||||
decoded.feature_clauses.clone(),
|
||||
decoded.instruction.execution_access_requirements(),
|
||||
decoded.instruction.guest_memory_quantity(),
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
);
|
||||
let native = emit_leaf(instructions, profile, target)?;
|
||||
Ok(PreparedLeafCode {
|
||||
native,
|
||||
memory_requirements,
|
||||
execution_requirements,
|
||||
})
|
||||
}
|
||||
|
||||
/// Compile an extended two-argument leaf ending in RET X30. The runtime must
|
||||
/// validate this exact profile against its owned view before unsafe invocation.
|
||||
pub fn compile_for_profile(
|
||||
source: &[u8],
|
||||
base: GuestAddress,
|
||||
profile: ScalableProfile,
|
||||
target: TargetCpu,
|
||||
) -> Result<NativeBlock, CompileError> {
|
||||
emit_leaf(decode_leaf(source, base, profile, target)?, profile, target)
|
||||
}
|
||||
|
||||
fn emit_leaf(
|
||||
instructions: Vec<DecodedLeafInstruction>,
|
||||
profile: ScalableProfile,
|
||||
target: TargetCpu,
|
||||
) -> Result<NativeBlock, CompileError> {
|
||||
let mut code = context_wrapper();
|
||||
let mut source_map = Vec::with_capacity(instructions.len());
|
||||
let mut fixups = Vec::new();
|
||||
for (pc, instruction) in instructions {
|
||||
for DecodedLeafInstruction {
|
||||
pc, instruction, ..
|
||||
} in instructions
|
||||
{
|
||||
source_map.push((pc, code.len()));
|
||||
emit_decoded(&mut code, pc, instruction, profile, target, &mut fixups)?;
|
||||
}
|
||||
@@ -3728,4 +4181,74 @@ mod prefix_pair_tests {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
fn prepared_prefix_records_both_source_clauses_and_preserves_refusals() {
|
||||
use crate::aarch64::scalable::execution::{
|
||||
GuestMemoryQuantity, ScalableAccessRequirements,
|
||||
};
|
||||
let profile = ScalableProfile::new(
|
||||
VectorLength::from_bytes(16).unwrap(),
|
||||
ScalableMode::new(true, false),
|
||||
);
|
||||
let source: Vec<_> = [UNPREDICATED_PREFIX, AND_DESTRUCTIVE, RET]
|
||||
.iter()
|
||||
.flat_map(|word| word.to_le_bytes())
|
||||
.collect();
|
||||
let prepared = prepare_leaf(&source, BASE, profile, TargetCpu::Baseline).unwrap();
|
||||
let ordinary = compile_for_profile(&source, BASE, profile, TargetCpu::Baseline).unwrap();
|
||||
assert_eq!(prepared.native.x86_64_code, ordinary.x86_64_code);
|
||||
assert_eq!(prepared.native.source_map, ordinary.source_map);
|
||||
let instructions = prepared.execution_requirements.instructions();
|
||||
assert_eq!(instructions.len(), 3);
|
||||
let clause = FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme));
|
||||
for (index, instruction) in instructions[..2].iter().enumerate() {
|
||||
assert_eq!(
|
||||
instruction.pc(),
|
||||
GuestAddress(BASE.0 + (index * INSTRUCTION_BYTES) as u64)
|
||||
);
|
||||
assert_eq!(instruction.feature_clauses(), &[clause]);
|
||||
assert_eq!(
|
||||
instruction.access(),
|
||||
&ScalableAccessRequirements::Unqualified
|
||||
);
|
||||
assert_eq!(
|
||||
instruction.guest_memory_quantity(),
|
||||
GuestMemoryQuantity::Unqualified
|
||||
);
|
||||
}
|
||||
assert!(instructions[2].feature_clauses().is_empty());
|
||||
assert_eq!(
|
||||
instructions[2].guest_memory_quantity(),
|
||||
GuestMemoryQuantity::None
|
||||
);
|
||||
let refused: Vec<_> = [UNPREDICATED_PREFIX, RET]
|
||||
.iter()
|
||||
.flat_map(|word| word.to_le_bytes())
|
||||
.collect();
|
||||
let error = match prepare_leaf(&refused, BASE, profile, TargetCpu::Baseline) {
|
||||
Err(error) => error,
|
||||
Ok(_) => panic!("unreviewed MOVPRFX pair accepted"),
|
||||
};
|
||||
assert!(error.0.contains("MOVPRFX pair validation"));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "extended/memory_load_tests.rs"]
|
||||
mod memory_load_tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "extended/memory_multi_tests.rs"]
|
||||
mod memory_multi_tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "extended/memory_store_tests.rs"]
|
||||
mod memory_store_tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "extended/memory_structure_tests.rs"]
|
||||
mod memory_structure_tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "extended/sme_memory_tests.rs"]
|
||||
mod sme_memory_tests;
|
||||
@@ -0,0 +1,213 @@
|
||||
//! First memory group dispatch, source maps and complete-body requirements.
|
||||
use super::*;
|
||||
use crate::context::memory::{SpAlignmentRequirement, flags, host_caps, profile_requirements};
|
||||
|
||||
const RET_X30: u32 = 0xd65f_03c0;
|
||||
const NOP: u32 = 0xd503_201f;
|
||||
const BRANCH_PAST_LEAF: u32 = 0x1400_0002;
|
||||
const LD1B_Z1_P0_X5: u32 = 0xa400_a0a1;
|
||||
const LD1D_Z1_P0_X5: u32 = 0xa5e0_a0a1;
|
||||
const LD1D_Z1_P0_SP: u32 = 0xa5e0_a3e1;
|
||||
const RESERVED_LD1B_Z1_P0_X5_XZR: u32 = 0xa41f_40a1;
|
||||
const GUEST_BASE: GuestAddress = GuestAddress(0x1000);
|
||||
const WORDS: [u32; 66] = [
|
||||
0xa420a0a1, // ld1b_z_p_bi_u16
|
||||
0xa440a0a1, // ld1b_z_p_bi_u32
|
||||
0xa460a0a1, // ld1b_z_p_bi_u64
|
||||
0xa400a0a1, // ld1b_z_p_bi_u8
|
||||
0xa42040a1, // ld1b_z_p_br_u16
|
||||
0xa44040a1, // ld1b_z_p_br_u32
|
||||
0xa46040a1, // ld1b_z_p_br_u64
|
||||
0xa40040a1, // ld1b_z_p_br_u8
|
||||
0xa5e0a0a1, // ld1d_z_p_bi_u64
|
||||
0xa5e040a1, // ld1d_z_p_br_u64
|
||||
0xa4a0a0a1, // ld1h_z_p_bi_u16
|
||||
0xa4c0a0a1, // ld1h_z_p_bi_u32
|
||||
0xa4e0a0a1, // ld1h_z_p_bi_u64
|
||||
0xa4a040a1, // ld1h_z_p_br_u16
|
||||
0xa4c040a1, // ld1h_z_p_br_u32
|
||||
0xa4e040a1, // ld1h_z_p_br_u64
|
||||
0x8440a0a1, // ld1rb_z_p_bi_u16
|
||||
0x8440c0a1, // ld1rb_z_p_bi_u32
|
||||
0x8440e0a1, // ld1rb_z_p_bi_u64
|
||||
0x844080a1, // ld1rb_z_p_bi_u8
|
||||
0x85c0e0a1, // ld1rd_z_p_bi_u64
|
||||
0x84c0a0a1, // ld1rh_z_p_bi_u16
|
||||
0x84c0c0a1, // ld1rh_z_p_bi_u32
|
||||
0x84c0e0a1, // ld1rh_z_p_bi_u64
|
||||
0xa40020a1, // ld1rqb_z_p_bi_u8
|
||||
0xa40000a1, // ld1rqb_z_p_br_contiguous
|
||||
0xa58020a1, // ld1rqd_z_p_bi_u64
|
||||
0xa58000a1, // ld1rqd_z_p_br_contiguous
|
||||
0xa48020a1, // ld1rqh_z_p_bi_u16
|
||||
0xa48000a1, // ld1rqh_z_p_br_contiguous
|
||||
0xa50020a1, // ld1rqw_z_p_bi_u32
|
||||
0xa50000a1, // ld1rqw_z_p_br_contiguous
|
||||
0x85c0c0a1, // ld1rsb_z_p_bi_s16
|
||||
0x85c0a0a1, // ld1rsb_z_p_bi_s32
|
||||
0x85c080a1, // ld1rsb_z_p_bi_s64
|
||||
0x8540a0a1, // ld1rsh_z_p_bi_s32
|
||||
0x854080a1, // ld1rsh_z_p_bi_s64
|
||||
0x84c080a1, // ld1rsw_z_p_bi_s64
|
||||
0x8540c0a1, // ld1rw_z_p_bi_u32
|
||||
0x8540e0a1, // ld1rw_z_p_bi_u64
|
||||
0xa5c0a0a1, // ld1sb_z_p_bi_s16
|
||||
0xa5a0a0a1, // ld1sb_z_p_bi_s32
|
||||
0xa580a0a1, // ld1sb_z_p_bi_s64
|
||||
0xa5c040a1, // ld1sb_z_p_br_s16
|
||||
0xa5a040a1, // ld1sb_z_p_br_s32
|
||||
0xa58040a1, // ld1sb_z_p_br_s64
|
||||
0xa520a0a1, // ld1sh_z_p_bi_s32
|
||||
0xa500a0a1, // ld1sh_z_p_bi_s64
|
||||
0xa52040a1, // ld1sh_z_p_br_s32
|
||||
0xa50040a1, // ld1sh_z_p_br_s64
|
||||
0xa480a0a1, // ld1sw_z_p_bi_s64
|
||||
0xa48040a1, // ld1sw_z_p_br_s64
|
||||
0xa540a0a1, // ld1w_z_p_bi_u32
|
||||
0xa560a0a1, // ld1w_z_p_bi_u64
|
||||
0xa54040a1, // ld1w_z_p_br_u32
|
||||
0xa56040a1, // ld1w_z_p_br_u64
|
||||
0xa400e0a1, // ldnt1b_z_p_bi_contiguous
|
||||
0xa400c0a1, // ldnt1b_z_p_br_contiguous
|
||||
0xa580e0a1, // ldnt1d_z_p_bi_contiguous
|
||||
0xa580c0a1, // ldnt1d_z_p_br_contiguous
|
||||
0xa480e0a1, // ldnt1h_z_p_bi_contiguous
|
||||
0xa480c0a1, // ldnt1h_z_p_br_contiguous
|
||||
0xa500e0a1, // ldnt1w_z_p_bi_contiguous
|
||||
0xa500c0a1, // ldnt1w_z_p_br_contiguous
|
||||
0x858000a1, // ldr_p_bi_
|
||||
0x858040a1, // ldr_z_bi_
|
||||
];
|
||||
|
||||
fn source(words: &[u32]) -> Vec<u8> {
|
||||
words.iter().flat_map(|word| word.to_le_bytes()).collect()
|
||||
}
|
||||
fn profile(bytes: usize, streaming: bool) -> ScalableProfile {
|
||||
ScalableProfile::new(
|
||||
VectorLength::from_bytes(bytes).unwrap(),
|
||||
ScalableMode::new(streaming, false),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_load_forms_dispatch_exact_bodies_and_source_maps_at_every_length() {
|
||||
for word in WORDS {
|
||||
let operand = memory_load::decode(word).unwrap().unwrap();
|
||||
assert_eq!(
|
||||
crate::aarch64::sve::decode(word),
|
||||
Some(Ok(crate::aarch64::sve::Operand::MemoryLoad(operand)))
|
||||
);
|
||||
for bytes in [16, 32, 64, 128, 256] {
|
||||
let profile = profile(bytes, true);
|
||||
let native = compile_for_profile(
|
||||
&source(&[word, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let mut expected = Vec::new();
|
||||
x86_64::sve::memory_load::emit(
|
||||
&mut expected,
|
||||
operand,
|
||||
profile.vector_length(),
|
||||
TargetCpu::Baseline,
|
||||
GUEST_BASE.0,
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[..CONTEXT_WRAPPER_BYTES],
|
||||
context_wrapper()
|
||||
);
|
||||
assert_eq!(
|
||||
native.source_map,
|
||||
[
|
||||
(GUEST_BASE, CONTEXT_WRAPPER_BYTES),
|
||||
(
|
||||
GuestAddress(GUEST_BASE.0 + INSTRUCTION_BYTES as u64),
|
||||
CONTEXT_WRAPPER_BYTES + expected.len()
|
||||
),
|
||||
]
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[CONTEXT_WRAPPER_BYTES..native.source_map[1].1],
|
||||
expected
|
||||
);
|
||||
assert_eq!(&native.x86_64_code[native.source_map[1].1..], [RET]);
|
||||
assert_eq!(
|
||||
memory_requirements(
|
||||
&source(&[word, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline
|
||||
)
|
||||
.unwrap(),
|
||||
x86_64::sve::memory_load::requirements(operand),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn requirements_cover_the_complete_body_and_explicit_pure_case() {
|
||||
let profile = profile(16, true);
|
||||
assert_eq!(
|
||||
memory_requirements(
|
||||
&source(&[NOP, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap(),
|
||||
MemoryRequirements::default()
|
||||
);
|
||||
assert_eq!(
|
||||
memory_requirements(
|
||||
&source(&[LD1B_Z1_P0_X5, LD1D_Z1_P0_SP, LD1D_Z1_P0_X5, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap(),
|
||||
MemoryRequirements {
|
||||
required_flags: flags::TAG_CHECKED | flags::SVE_PREDICATED,
|
||||
required_host_caps: host_caps::ATOMIC_LOAD16,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| profile_requirements::TAG_GRANULES
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS,
|
||||
required_sp_alignment: SpAlignmentRequirement::Enabled,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scan_and_compile_share_input_reserved_and_mode_declines() {
|
||||
for (source, base, profile) in [
|
||||
(Vec::new(), GUEST_BASE, profile(16, true)),
|
||||
(
|
||||
source(&[BRANCH_PAST_LEAF, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile(16, true),
|
||||
),
|
||||
(vec![0; 3], GUEST_BASE, profile(16, true)),
|
||||
(
|
||||
source(&[RET_X30]),
|
||||
GuestAddress(GUEST_BASE.0 + 1),
|
||||
profile(16, true),
|
||||
),
|
||||
(source(&[LD1B_Z1_P0_X5]), GUEST_BASE, profile(16, true)),
|
||||
(
|
||||
source(&[RESERVED_LD1B_Z1_P0_X5_XZR, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile(16, true),
|
||||
),
|
||||
(
|
||||
source(&[LD1B_Z1_P0_X5, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile(16, false),
|
||||
),
|
||||
] {
|
||||
let scan = memory_requirements(&source, base, profile, TargetCpu::Baseline).unwrap_err();
|
||||
let compile = compile_for_profile(&source, base, profile, TargetCpu::Baseline).unwrap_err();
|
||||
assert_eq!(scan.0, compile.0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
//! Multi-Z caller dispatch, source maps and complete-body effect requirements.
|
||||
use super::*;
|
||||
use crate::context::memory::{SpAlignmentRequirement, flags, host_caps, profile_requirements};
|
||||
|
||||
const RET_X30: u32 = 0xd65f_03c0;
|
||||
const NOP: u32 = 0xd503_201f;
|
||||
const LD1D_Z0_Z1_PN8_X5_X0: u32 = 0xa000_60a0;
|
||||
const LD1D_Z0_Z1_PN8_SP: u32 = 0xa040_63e0;
|
||||
const STNT1B_Z0_Z3_PN8_X5: u32 = 0xa060_80a1;
|
||||
const RESERVED_IMMEDIATE: u32 = 0xa050_0000;
|
||||
const RESERVED_QUAD_TUPLE: u32 = 0xa040_8002;
|
||||
const GUEST_BASE: GuestAddress = GuestAddress(0x1000);
|
||||
const CANONICAL_BASE_X5: u32 = 5 << 5;
|
||||
|
||||
const WORDS: [u32; 64] = [
|
||||
0xa0400000, // ld1b_mz_p_bi_2
|
||||
0xa0408000, // ld1b_mz_p_bi_4
|
||||
0xa0000000, // ld1b_mz_p_br_2
|
||||
0xa0008000, // ld1b_mz_p_br_4
|
||||
0xa0406000, // ld1d_mz_p_bi_2
|
||||
0xa040e000, // ld1d_mz_p_bi_4
|
||||
0xa0006000, // ld1d_mz_p_br_2
|
||||
0xa000e000, // ld1d_mz_p_br_4
|
||||
0xa0402000, // ld1h_mz_p_bi_2
|
||||
0xa040a000, // ld1h_mz_p_bi_4
|
||||
0xa0002000, // ld1h_mz_p_br_2
|
||||
0xa000a000, // ld1h_mz_p_br_4
|
||||
0xa0404000, // ld1w_mz_p_bi_2
|
||||
0xa040c000, // ld1w_mz_p_bi_4
|
||||
0xa0004000, // ld1w_mz_p_br_2
|
||||
0xa000c000, // ld1w_mz_p_br_4
|
||||
0xa0400001, // ldnt1b_mz_p_bi_2
|
||||
0xa0408001, // ldnt1b_mz_p_bi_4
|
||||
0xa0000001, // ldnt1b_mz_p_br_2
|
||||
0xa0008001, // ldnt1b_mz_p_br_4
|
||||
0xa0406001, // ldnt1d_mz_p_bi_2
|
||||
0xa040e001, // ldnt1d_mz_p_bi_4
|
||||
0xa0006001, // ldnt1d_mz_p_br_2
|
||||
0xa000e001, // ldnt1d_mz_p_br_4
|
||||
0xa0402001, // ldnt1h_mz_p_bi_2
|
||||
0xa040a001, // ldnt1h_mz_p_bi_4
|
||||
0xa0002001, // ldnt1h_mz_p_br_2
|
||||
0xa000a001, // ldnt1h_mz_p_br_4
|
||||
0xa0404001, // ldnt1w_mz_p_bi_2
|
||||
0xa040c001, // ldnt1w_mz_p_bi_4
|
||||
0xa0004001, // ldnt1w_mz_p_br_2
|
||||
0xa000c001, // ldnt1w_mz_p_br_4
|
||||
0xa0600000, // st1b_mz_p_bi_2
|
||||
0xa0608000, // st1b_mz_p_bi_4
|
||||
0xa0200000, // st1b_mz_p_br_2
|
||||
0xa0208000, // st1b_mz_p_br_4
|
||||
0xa0606000, // st1d_mz_p_bi_2
|
||||
0xa060e000, // st1d_mz_p_bi_4
|
||||
0xa0206000, // st1d_mz_p_br_2
|
||||
0xa020e000, // st1d_mz_p_br_4
|
||||
0xa0602000, // st1h_mz_p_bi_2
|
||||
0xa060a000, // st1h_mz_p_bi_4
|
||||
0xa0202000, // st1h_mz_p_br_2
|
||||
0xa020a000, // st1h_mz_p_br_4
|
||||
0xa0604000, // st1w_mz_p_bi_2
|
||||
0xa060c000, // st1w_mz_p_bi_4
|
||||
0xa0204000, // st1w_mz_p_br_2
|
||||
0xa020c000, // st1w_mz_p_br_4
|
||||
0xa0600001, // stnt1b_mz_p_bi_2
|
||||
0xa0608001, // stnt1b_mz_p_bi_4
|
||||
0xa0200001, // stnt1b_mz_p_br_2
|
||||
0xa0208001, // stnt1b_mz_p_br_4
|
||||
0xa0606001, // stnt1d_mz_p_bi_2
|
||||
0xa060e001, // stnt1d_mz_p_bi_4
|
||||
0xa0206001, // stnt1d_mz_p_br_2
|
||||
0xa020e001, // stnt1d_mz_p_br_4
|
||||
0xa0602001, // stnt1h_mz_p_bi_2
|
||||
0xa060a001, // stnt1h_mz_p_bi_4
|
||||
0xa0202001, // stnt1h_mz_p_br_2
|
||||
0xa020a001, // stnt1h_mz_p_br_4
|
||||
0xa0604001, // stnt1w_mz_p_bi_2
|
||||
0xa060c001, // stnt1w_mz_p_bi_4
|
||||
0xa0204001, // stnt1w_mz_p_br_2
|
||||
0xa020c001, // stnt1w_mz_p_br_4
|
||||
];
|
||||
|
||||
fn source(words: &[u32]) -> Vec<u8> {
|
||||
words.iter().flat_map(|word| word.to_le_bytes()).collect()
|
||||
}
|
||||
|
||||
fn profile(bytes: usize, streaming: bool) -> ScalableProfile {
|
||||
ScalableProfile::new(
|
||||
VectorLength::from_bytes(bytes).unwrap(),
|
||||
ScalableMode::new(streaming, false),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multi_forms_dispatch_exact_bodies_and_maps_at_vector_length_boundaries() {
|
||||
for canonical in WORDS {
|
||||
let word = canonical | CANONICAL_BASE_X5;
|
||||
let operand = memory_multi::decode(word).unwrap().unwrap();
|
||||
assert_eq!(
|
||||
crate::aarch64::sve::decode(word),
|
||||
Some(Ok(crate::aarch64::sve::Operand::MemoryMulti(operand)))
|
||||
);
|
||||
for bytes in [16, 256] {
|
||||
let profile = profile(bytes, true);
|
||||
let bytes = source(&[word, RET_X30]);
|
||||
let native =
|
||||
compile_for_profile(&bytes, GUEST_BASE, profile, TargetCpu::Baseline).unwrap();
|
||||
let mut expected = Vec::new();
|
||||
x86_64::sve::memory_multi::emit(
|
||||
&mut expected,
|
||||
&operand,
|
||||
profile.vector_length(),
|
||||
TargetCpu::Baseline,
|
||||
GUEST_BASE.0,
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[..CONTEXT_WRAPPER_BYTES],
|
||||
context_wrapper()
|
||||
);
|
||||
assert_eq!(
|
||||
native.source_map,
|
||||
[
|
||||
(GUEST_BASE, CONTEXT_WRAPPER_BYTES),
|
||||
(
|
||||
GuestAddress(GUEST_BASE.0 + INSTRUCTION_BYTES as u64),
|
||||
CONTEXT_WRAPPER_BYTES + expected.len()
|
||||
),
|
||||
]
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[CONTEXT_WRAPPER_BYTES..native.source_map[1].1],
|
||||
expected
|
||||
);
|
||||
assert_eq!(&native.x86_64_code[native.source_map[1].1..], [RET]);
|
||||
assert_eq!(
|
||||
memory_requirements(&bytes, GUEST_BASE, profile, TargetCpu::Baseline).unwrap(),
|
||||
x86_64::sve::memory_multi::requirements(&operand)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multi_requirements_fold_every_effect_and_preserve_four_argument_descriptor() {
|
||||
let profile = profile(16, true);
|
||||
assert_eq!(
|
||||
memory_requirements(
|
||||
&source(&[NOP, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap(),
|
||||
MemoryRequirements::default()
|
||||
);
|
||||
assert_eq!(
|
||||
memory_requirements(
|
||||
&source(&[
|
||||
LD1D_Z0_Z1_PN8_X5_X0,
|
||||
LD1D_Z0_Z1_PN8_SP,
|
||||
STNT1B_Z0_Z3_PN8_X5,
|
||||
RET_X30,
|
||||
]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap(),
|
||||
MemoryRequirements {
|
||||
required_flags: flags::TAG_CHECKED | flags::WRITE | flags::NON_TEMPORAL,
|
||||
required_host_caps: host_caps::ATOMIC_LOAD16,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| profile_requirements::TAG_GRANULES
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS,
|
||||
required_sp_alignment: SpAlignmentRequirement::Enabled,
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
memory_requirements(
|
||||
&source(&[LD1D_Z0_Z1_PN8_SP, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap(),
|
||||
MemoryRequirements {
|
||||
required_flags: 0,
|
||||
required_host_caps: 0,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS,
|
||||
required_sp_alignment: SpAlignmentRequirement::Enabled,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multi_scan_and_compile_share_reserved_mode_and_feature_declines() {
|
||||
let length = VectorLength::from_bytes(16).unwrap();
|
||||
let sme_without_sme2 = ScalableProfile::new_with_features(
|
||||
length,
|
||||
ScalableMode::new(true, false),
|
||||
ScalableFeatures::of(ScalableFeature::Sme),
|
||||
ScalableControls::new(length, false),
|
||||
)
|
||||
.unwrap();
|
||||
for (words, profile) in [
|
||||
(vec![RESERVED_IMMEDIATE, RET_X30], profile(16, true)),
|
||||
(vec![RESERVED_QUAD_TUPLE, RET_X30], profile(16, true)),
|
||||
(vec![LD1D_Z0_Z1_PN8_X5_X0, RET_X30], profile(16, false)),
|
||||
(vec![LD1D_Z0_Z1_PN8_X5_X0, RET_X30], sme_without_sme2),
|
||||
(vec![LD1D_Z0_Z1_PN8_X5_X0], profile(16, true)),
|
||||
] {
|
||||
let bytes = source(&words);
|
||||
let scan =
|
||||
memory_requirements(&bytes, GUEST_BASE, profile, TargetCpu::Baseline).unwrap_err();
|
||||
let compile =
|
||||
compile_for_profile(&bytes, GUEST_BASE, profile, TargetCpu::Baseline).unwrap_err();
|
||||
assert_eq!(scan.0, compile.0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,231 @@
|
||||
//! Store56 provider routing and complete-body memory requirements.
|
||||
use super::*;
|
||||
use crate::context::memory::{SpAlignmentRequirement, flags, host_caps, profile_requirements};
|
||||
|
||||
const RET_X30: u32 = 0xd65f_03c0;
|
||||
const NOP: u32 = 0xd503_201f;
|
||||
const ST1B_Z1_P0_SP: u32 = 0xe400_e3e1;
|
||||
const STNT1D_Z1_P0_X5: u32 = 0xe590_e0a1;
|
||||
const ST2Q_Z1_P0_X5: u32 = 0xe440_00a1;
|
||||
const STR_Z1_X5: u32 = 0xe580_40a1;
|
||||
const PRFB_P0_SP: u32 = 0x85c0_03e1;
|
||||
const RESERVED_ST1B_Z1_P0_X5_XZR: u32 = 0xe41f_40a1;
|
||||
const RESERVED_ST1H_BYTE_SOURCE: u32 = 0xe480_e0a1;
|
||||
const GUEST_BASE: GuestAddress = GuestAddress(0x1000);
|
||||
const FORMS: [(u32, &str); 56] = [
|
||||
(0x85c000a1, "prfb_i_p_bi_s"),
|
||||
(0x8400c0a1, "prfb_i_p_br_s"),
|
||||
(0x85c060a1, "prfd_i_p_bi_s"),
|
||||
(0x8580c0a1, "prfd_i_p_br_s"),
|
||||
(0x85c020a1, "prfh_i_p_bi_s"),
|
||||
(0x8480c0a1, "prfh_i_p_br_s"),
|
||||
(0x85c040a1, "prfw_i_p_bi_s"),
|
||||
(0x8500c0a1, "prfw_i_p_br_s"),
|
||||
(0xe400e0a1, "st1b_z_p_bi_"),
|
||||
(0xe40040a1, "st1b_z_p_br_"),
|
||||
(0xe5e0e0a1, "st1d_z_p_bi_"),
|
||||
(0xe5e040a1, "st1d_z_p_br_"),
|
||||
(0xe4a0e0a1, "st1h_z_p_bi_"),
|
||||
(0xe4a040a1, "st1h_z_p_br_"),
|
||||
(0xe540e0a1, "st1w_z_p_bi_"),
|
||||
(0xe54040a1, "st1w_z_p_br_"),
|
||||
(0xe430e0a1, "st2b_z_p_bi_contiguous"),
|
||||
(0xe42060a1, "st2b_z_p_br_contiguous"),
|
||||
(0xe5b0e0a1, "st2d_z_p_bi_contiguous"),
|
||||
(0xe5a060a1, "st2d_z_p_br_contiguous"),
|
||||
(0xe4b0e0a1, "st2h_z_p_bi_contiguous"),
|
||||
(0xe4a060a1, "st2h_z_p_br_contiguous"),
|
||||
(0xe44000a1, "st2q_z_p_bi_contiguous"),
|
||||
(0xe46000a1, "st2q_z_p_br_contiguous"),
|
||||
(0xe530e0a1, "st2w_z_p_bi_contiguous"),
|
||||
(0xe52060a1, "st2w_z_p_br_contiguous"),
|
||||
(0xe450e0a1, "st3b_z_p_bi_contiguous"),
|
||||
(0xe44060a1, "st3b_z_p_br_contiguous"),
|
||||
(0xe5d0e0a1, "st3d_z_p_bi_contiguous"),
|
||||
(0xe5c060a1, "st3d_z_p_br_contiguous"),
|
||||
(0xe4d0e0a1, "st3h_z_p_bi_contiguous"),
|
||||
(0xe4c060a1, "st3h_z_p_br_contiguous"),
|
||||
(0xe48000a1, "st3q_z_p_bi_contiguous"),
|
||||
(0xe4a000a1, "st3q_z_p_br_contiguous"),
|
||||
(0xe550e0a1, "st3w_z_p_bi_contiguous"),
|
||||
(0xe54060a1, "st3w_z_p_br_contiguous"),
|
||||
(0xe470e0a1, "st4b_z_p_bi_contiguous"),
|
||||
(0xe46060a1, "st4b_z_p_br_contiguous"),
|
||||
(0xe5f0e0a1, "st4d_z_p_bi_contiguous"),
|
||||
(0xe5e060a1, "st4d_z_p_br_contiguous"),
|
||||
(0xe4f0e0a1, "st4h_z_p_bi_contiguous"),
|
||||
(0xe4e060a1, "st4h_z_p_br_contiguous"),
|
||||
(0xe4c000a1, "st4q_z_p_bi_contiguous"),
|
||||
(0xe4e000a1, "st4q_z_p_br_contiguous"),
|
||||
(0xe570e0a1, "st4w_z_p_bi_contiguous"),
|
||||
(0xe56060a1, "st4w_z_p_br_contiguous"),
|
||||
(0xe410e0a1, "stnt1b_z_p_bi_contiguous"),
|
||||
(0xe40060a1, "stnt1b_z_p_br_contiguous"),
|
||||
(0xe590e0a1, "stnt1d_z_p_bi_contiguous"),
|
||||
(0xe58060a1, "stnt1d_z_p_br_contiguous"),
|
||||
(0xe490e0a1, "stnt1h_z_p_bi_contiguous"),
|
||||
(0xe48060a1, "stnt1h_z_p_br_contiguous"),
|
||||
(0xe510e0a1, "stnt1w_z_p_bi_contiguous"),
|
||||
(0xe50060a1, "stnt1w_z_p_br_contiguous"),
|
||||
(0xe58000a1, "str_p_bi_"),
|
||||
(0xe58040a1, "str_z_bi_"),
|
||||
];
|
||||
|
||||
fn source(words: &[u32]) -> Vec<u8> {
|
||||
words.iter().flat_map(|word| word.to_le_bytes()).collect()
|
||||
}
|
||||
|
||||
fn profile(bytes: usize, streaming: bool, quadword: bool) -> ScalableProfile {
|
||||
let mut features = ScalableFeatures::of(ScalableFeature::Sme).with(ScalableFeature::Sme2);
|
||||
if quadword {
|
||||
features = features.with(ScalableFeature::Sme2p1);
|
||||
}
|
||||
ScalableProfile::new_with_features(
|
||||
VectorLength::from_bytes(bytes).unwrap(),
|
||||
ScalableMode::new(streaming, false),
|
||||
features,
|
||||
ScalableControls::new(VectorLength::from_bytes(256).unwrap(), false),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_store_forms_dispatch_exact_bodies_and_maps_at_every_length() {
|
||||
for (word, canonical_id) in FORMS {
|
||||
let operand = memory_store::decode(word).unwrap().unwrap();
|
||||
assert_eq!(
|
||||
crate::aarch64::sve::decode(word),
|
||||
Some(Ok(crate::aarch64::sve::Operand::MemoryStore(operand))),
|
||||
"{canonical_id}"
|
||||
);
|
||||
for bytes in [16, 32, 64, 128, 256] {
|
||||
let profile = profile(bytes, true, true);
|
||||
let native = compile_for_profile(
|
||||
&source(&[word, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let mut expected = Vec::new();
|
||||
x86_64::sve::memory_store::emit(
|
||||
&mut expected,
|
||||
&operand,
|
||||
profile.vector_length(),
|
||||
TargetCpu::Baseline,
|
||||
GUEST_BASE.0,
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[..CONTEXT_WRAPPER_BYTES],
|
||||
context_wrapper()
|
||||
);
|
||||
assert_eq!(
|
||||
native.source_map,
|
||||
[
|
||||
(GUEST_BASE, CONTEXT_WRAPPER_BYTES),
|
||||
(
|
||||
GuestAddress(GUEST_BASE.0 + INSTRUCTION_BYTES as u64),
|
||||
CONTEXT_WRAPPER_BYTES + expected.len()
|
||||
),
|
||||
]
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[CONTEXT_WRAPPER_BYTES..native.source_map[1].1],
|
||||
expected,
|
||||
"{canonical_id} at SVL {bytes}"
|
||||
);
|
||||
assert_eq!(&native.x86_64_code[native.source_map[1].1..], [RET]);
|
||||
assert_eq!(
|
||||
memory_requirements(
|
||||
&source(&[word, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline
|
||||
)
|
||||
.unwrap(),
|
||||
x86_64::sve::memory_store::requirements(&operand),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stores_preflight_write_caps_tags_and_original_sp_for_the_complete_body() {
|
||||
let profile = profile(16, true, true);
|
||||
let requirements = |words: &[u32]| {
|
||||
memory_requirements(&source(words), GUEST_BASE, profile, TargetCpu::Baseline).unwrap()
|
||||
};
|
||||
assert_eq!(
|
||||
requirements(&[NOP, PRFB_P0_SP, RET_X30]),
|
||||
MemoryRequirements::default()
|
||||
);
|
||||
assert_eq!(
|
||||
requirements(&[ST1B_Z1_P0_SP, RET_X30]),
|
||||
MemoryRequirements {
|
||||
required_flags: flags::WRITE | flags::SVE_PREDICATED,
|
||||
required_host_caps: 0,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS,
|
||||
required_sp_alignment: SpAlignmentRequirement::Enabled,
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
requirements(&[STR_Z1_X5, RET_X30]),
|
||||
MemoryRequirements {
|
||||
required_flags: flags::WRITE | flags::TAG_CHECKED,
|
||||
required_host_caps: 0,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| profile_requirements::TAG_GRANULES
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS,
|
||||
required_sp_alignment: SpAlignmentRequirement::Any,
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
requirements(&[NOP, ST1B_Z1_P0_SP, STNT1D_Z1_P0_X5, ST2Q_Z1_P0_X5, RET_X30]),
|
||||
MemoryRequirements {
|
||||
required_flags: flags::WRITE
|
||||
| flags::TAG_CHECKED
|
||||
| flags::NON_TEMPORAL
|
||||
| flags::SVE_PREDICATED,
|
||||
required_host_caps: host_caps::CX16,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| profile_requirements::TAG_GRANULES
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS,
|
||||
required_sp_alignment: SpAlignmentRequirement::Enabled,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn scan_and_compile_share_reserved_mode_and_q_feature_declines() {
|
||||
for (word, profile, reason) in [
|
||||
(
|
||||
RESERVED_ST1B_Z1_P0_X5_XZR,
|
||||
profile(16, true, true),
|
||||
"reserved streaming store",
|
||||
),
|
||||
(
|
||||
RESERVED_ST1H_BYTE_SOURCE,
|
||||
profile(16, true, true),
|
||||
"reserved streaming store",
|
||||
),
|
||||
(
|
||||
ST1B_Z1_P0_SP,
|
||||
profile(16, false, true),
|
||||
"streaming mode required",
|
||||
),
|
||||
(
|
||||
PRFB_P0_SP,
|
||||
profile(16, false, true),
|
||||
"streaming mode required",
|
||||
),
|
||||
(ST2Q_Z1_P0_X5, profile(16, true, false), "FEAT_SME2p1"),
|
||||
] {
|
||||
let source = source(&[word, RET_X30]);
|
||||
let scan =
|
||||
memory_requirements(&source, GUEST_BASE, profile, TargetCpu::Baseline).unwrap_err();
|
||||
let compile =
|
||||
compile_for_profile(&source, GUEST_BASE, profile, TargetCpu::Baseline).unwrap_err();
|
||||
assert_eq!(scan.0, compile.0);
|
||||
assert!(scan.0.contains(reason), "{}", scan.0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
//! Structured-load routing, declared features and complete-body requirements.
|
||||
use super::*;
|
||||
use crate::context::memory::{SpAlignmentRequirement, flags, host_caps, profile_requirements};
|
||||
|
||||
const RET_X30: u32 = 0xd65f_03c0;
|
||||
const NOP: u32 = 0xd503_201f;
|
||||
const GUEST_BASE: GuestAddress = GuestAddress(0x1000);
|
||||
const MAXIMUM_VECTOR_BYTES: usize = 256;
|
||||
const LENGTHS: [usize; 5] = [16, 32, 64, 128, 256];
|
||||
const SOURCE_BYTES: u64 = size_of::<u32>() as u64;
|
||||
const DESTINATION_Z31: u32 = 31;
|
||||
const PREDICATE_P7: u32 = 7 << 10;
|
||||
const BASE_X5: u32 = 5 << 5;
|
||||
const BASE_SP: u32 = 31 << 5;
|
||||
const REGISTER_OFFSET_XZR: u32 = 31 << 16;
|
||||
const LD2B_IMMEDIATE: u32 = 0xa420_e000;
|
||||
const LD2Q_IMMEDIATE: u32 = 0xa490_e000;
|
||||
|
||||
const CLASSES: [u32; 30] = [
|
||||
0xa420_e000, // ld2b_z_p_bi_contiguous
|
||||
0xa420_c000, // ld2b_z_p_br_contiguous
|
||||
0xa5a0_e000, // ld2d_z_p_bi_contiguous
|
||||
0xa5a0_c000, // ld2d_z_p_br_contiguous
|
||||
0xa4a0_e000, // ld2h_z_p_bi_contiguous
|
||||
0xa4a0_c000, // ld2h_z_p_br_contiguous
|
||||
0xa490_e000, // ld2q_z_p_bi_contiguous
|
||||
0xa4a0_8000, // ld2q_z_p_br_contiguous
|
||||
0xa520_e000, // ld2w_z_p_bi_contiguous
|
||||
0xa520_c000, // ld2w_z_p_br_contiguous
|
||||
0xa440_e000, // ld3b_z_p_bi_contiguous
|
||||
0xa440_c000, // ld3b_z_p_br_contiguous
|
||||
0xa5c0_e000, // ld3d_z_p_bi_contiguous
|
||||
0xa5c0_c000, // ld3d_z_p_br_contiguous
|
||||
0xa4c0_e000, // ld3h_z_p_bi_contiguous
|
||||
0xa4c0_c000, // ld3h_z_p_br_contiguous
|
||||
0xa510_e000, // ld3q_z_p_bi_contiguous
|
||||
0xa520_8000, // ld3q_z_p_br_contiguous
|
||||
0xa540_e000, // ld3w_z_p_bi_contiguous
|
||||
0xa540_c000, // ld3w_z_p_br_contiguous
|
||||
0xa460_e000, // ld4b_z_p_bi_contiguous
|
||||
0xa460_c000, // ld4b_z_p_br_contiguous
|
||||
0xa5e0_e000, // ld4d_z_p_bi_contiguous
|
||||
0xa5e0_c000, // ld4d_z_p_br_contiguous
|
||||
0xa4e0_e000, // ld4h_z_p_bi_contiguous
|
||||
0xa4e0_c000, // ld4h_z_p_br_contiguous
|
||||
0xa590_e000, // ld4q_z_p_bi_contiguous
|
||||
0xa5a0_8000, // ld4q_z_p_br_contiguous
|
||||
0xa560_e000, // ld4w_z_p_bi_contiguous
|
||||
0xa560_c000, // ld4w_z_p_br_contiguous
|
||||
];
|
||||
|
||||
fn source(words: &[u32]) -> Vec<u8> {
|
||||
words.iter().flat_map(|word| word.to_le_bytes()).collect()
|
||||
}
|
||||
|
||||
fn profile(bytes: usize, streaming: bool, quadword: bool) -> ScalableProfile {
|
||||
let mut features = ScalableFeatures::of(ScalableFeature::Sme).with(ScalableFeature::Sme2);
|
||||
if quadword {
|
||||
features = features.with(ScalableFeature::Sme2p1);
|
||||
}
|
||||
ScalableProfile::new_with_features(
|
||||
VectorLength::from_bytes(bytes).unwrap(),
|
||||
ScalableMode::new(streaming, false),
|
||||
features,
|
||||
ScalableControls::new(
|
||||
VectorLength::from_bytes(MAXIMUM_VECTOR_BYTES).unwrap(),
|
||||
true,
|
||||
),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_structure_forms_dispatch_exact_bodies_and_source_maps_at_every_length() {
|
||||
for class in CLASSES {
|
||||
let word = class | DESTINATION_Z31 | PREDICATE_P7 | BASE_X5;
|
||||
let operand = memory_structure::decode(word).unwrap().unwrap();
|
||||
assert_eq!(
|
||||
crate::aarch64::sve::decode(word),
|
||||
Some(Ok(crate::aarch64::sve::Operand::MemoryStructure(operand)))
|
||||
);
|
||||
for bytes in LENGTHS {
|
||||
let profile = profile(bytes, true, true);
|
||||
let input = source(&[word, RET_X30]);
|
||||
let native =
|
||||
compile_for_profile(&input, GUEST_BASE, profile, TargetCpu::Baseline).unwrap();
|
||||
let mut expected = Vec::new();
|
||||
x86_64::sve::memory_structure::emit(
|
||||
&mut expected,
|
||||
&operand,
|
||||
profile.vector_length(),
|
||||
TargetCpu::Baseline,
|
||||
GUEST_BASE.0,
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[..CONTEXT_WRAPPER_BYTES],
|
||||
context_wrapper()
|
||||
);
|
||||
assert_eq!(
|
||||
native.source_map,
|
||||
[
|
||||
(GUEST_BASE, CONTEXT_WRAPPER_BYTES),
|
||||
(
|
||||
GuestAddress(GUEST_BASE.0 + SOURCE_BYTES),
|
||||
CONTEXT_WRAPPER_BYTES + expected.len()
|
||||
),
|
||||
]
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[CONTEXT_WRAPPER_BYTES..native.source_map[1].1],
|
||||
expected
|
||||
);
|
||||
assert_eq!(&native.x86_64_code[native.source_map[1].1..], [RET]);
|
||||
assert_eq!(
|
||||
memory_requirements(&input, GUEST_BASE, profile, TargetCpu::Baseline).unwrap(),
|
||||
x86_64::sve::memory_structure::requirements(operand)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn structure_scan_and_compile_share_reserved_mode_and_feature_declines() {
|
||||
for class in CLASSES {
|
||||
let word = class | DESTINATION_Z31 | PREDICATE_P7 | BASE_X5;
|
||||
let operand = memory_structure::decode(word).unwrap().unwrap();
|
||||
let mut declines = vec![(word, profile(32, false, true))];
|
||||
if matches!(
|
||||
operand.address.offset,
|
||||
crate::aarch64::sve::memory::Offset::Register { .. }
|
||||
) {
|
||||
declines.push((word | REGISTER_OFFSET_XZR, profile(32, true, true)));
|
||||
}
|
||||
if operand.requires_sve2p1_or_sme2p1() {
|
||||
declines.push((word, profile(32, true, false)));
|
||||
}
|
||||
for (word, profile) in declines {
|
||||
let input = source(&[NOP, word, RET_X30]);
|
||||
let scan =
|
||||
memory_requirements(&input, GUEST_BASE, profile, TargetCpu::Baseline).unwrap_err();
|
||||
let compile =
|
||||
compile_for_profile(&input, GUEST_BASE, profile, TargetCpu::Baseline).unwrap_err();
|
||||
assert_eq!(scan.0, compile.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn structure_requirements_fold_the_complete_body() {
|
||||
let input = source(&[
|
||||
NOP,
|
||||
LD2B_IMMEDIATE | BASE_X5,
|
||||
LD2Q_IMMEDIATE | BASE_SP,
|
||||
RET_X30,
|
||||
]);
|
||||
assert_eq!(
|
||||
memory_requirements(
|
||||
&input,
|
||||
GUEST_BASE,
|
||||
profile(16, true, true),
|
||||
TargetCpu::Baseline
|
||||
)
|
||||
.unwrap(),
|
||||
MemoryRequirements {
|
||||
required_flags: flags::SVE_PREDICATED | flags::TAG_CHECKED,
|
||||
required_host_caps: host_caps::ATOMIC_LOAD16,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| profile_requirements::TAG_GRANULES
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS,
|
||||
required_sp_alignment: SpAlignmentRequirement::Enabled,
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Source-adjacent MOVPRFX pairs for reviewed total inline followers.
|
||||
//! Effectful boundaries remain explicit declines until restart state is carried.
|
||||
|
||||
use super::{Decoded, INSTRUCTION_BYTES, ScalableProfile, decode};
|
||||
use super::{Decoded, INSTRUCTION_BYTES, ScalableProfile, decode_recording_features};
|
||||
use crate::{
|
||||
CompileError, GuestAddress, TargetCpu,
|
||||
aarch64::{
|
||||
@@ -24,6 +24,8 @@ pub(super) struct Pair {
|
||||
pub follower_pc: GuestAddress,
|
||||
pub prefix: integer_logic::Operand,
|
||||
pub follower: Decoded,
|
||||
pub prefix_features: FeatureRequirement,
|
||||
pub follower_features: Vec<FeatureRequirement>,
|
||||
}
|
||||
|
||||
/// Return no pair for a nonprefix instruction. A prefix requires both complete
|
||||
@@ -66,10 +68,8 @@ pub(super) fn decode_pair(
|
||||
prefix_pc.0
|
||||
)));
|
||||
}
|
||||
profile.require_features(
|
||||
FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme)),
|
||||
prefix_pc,
|
||||
)?;
|
||||
let prefix_features = FeatureRequirement::all(ScalableFeatures::of(ScalableFeature::Sme));
|
||||
profile.require_features(prefix_features, prefix_pc)?;
|
||||
let pair_end = offset
|
||||
.checked_add(PAIR_BYTES)
|
||||
.ok_or_else(|| CompileError("MOVPRFX pair source extent overflow".into()))?;
|
||||
@@ -99,7 +99,15 @@ pub(super) fn decode_pair(
|
||||
}
|
||||
// Keep unsupported allocation/features/semantics distinct from a known
|
||||
// decoded pairing violation. Existing decode errors stay compiler declines.
|
||||
let follower = decode(follower_pc, follower_word, profile, target).map_err(|error| {
|
||||
let mut follower_features = Vec::new();
|
||||
let follower = decode_recording_features(
|
||||
follower_pc,
|
||||
follower_word,
|
||||
profile,
|
||||
target,
|
||||
&mut follower_features,
|
||||
)
|
||||
.map_err(|error| {
|
||||
CompileError(format!(
|
||||
"MOVPRFX pair validation: unsupported follower at {:#x}: {error}",
|
||||
follower_pc.0
|
||||
@@ -140,6 +148,8 @@ pub(super) fn decode_pair(
|
||||
follower_pc,
|
||||
prefix: operand,
|
||||
follower,
|
||||
prefix_features,
|
||||
follower_features,
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -299,6 +309,7 @@ mod window_boundary_tests {
|
||||
|
||||
#[cfg(test)]
|
||||
mod dispatcher_tests {
|
||||
use super::super::decode;
|
||||
use super::*;
|
||||
use crate::aarch64::{
|
||||
scalable::{ScalableMode, VectorLength},
|
||||
|
||||
@@ -0,0 +1,415 @@
|
||||
//! SME memory dispatch, guest availability and checked-service requirements.
|
||||
use super::*;
|
||||
use crate::aarch64::sme::memory::{self as sme_memory, Operand as SmeMemoryOperand};
|
||||
|
||||
const RET_X30: u32 = 0xd65f_03c0;
|
||||
const NOP: u32 = 0xd503_201f;
|
||||
const GUEST_BASE: GuestAddress = GuestAddress(0x1000);
|
||||
const BASE_REGISTER_SHIFT: u32 = 5;
|
||||
const BASE_REGISTER_MASK: u32 = 31 << BASE_REGISTER_SHIFT;
|
||||
const WORDS: [u32; 78] = [
|
||||
0xa14000a0, // ld1b_mzx_p_bi_2x8
|
||||
0xa14080a0, // ld1b_mzx_p_bi_4x4
|
||||
0xa10000a0, // ld1b_mzx_p_br_2x8
|
||||
0xa10080a0, // ld1b_mzx_p_br_4x4
|
||||
0xe00000a0, // ld1b_za_p_rrr_
|
||||
0xa14060a0, // ld1d_mzx_p_bi_2x8
|
||||
0xa140e0a0, // ld1d_mzx_p_bi_4x4
|
||||
0xa10060a0, // ld1d_mzx_p_br_2x8
|
||||
0xa100e0a0, // ld1d_mzx_p_br_4x4
|
||||
0xe0c000a0, // ld1d_za_p_rrr_
|
||||
0xa14020a0, // ld1h_mzx_p_bi_2x8
|
||||
0xa140a0a0, // ld1h_mzx_p_bi_4x4
|
||||
0xa10020a0, // ld1h_mzx_p_br_2x8
|
||||
0xa100a0a0, // ld1h_mzx_p_br_4x4
|
||||
0xe04000a0, // ld1h_za_p_rrr_
|
||||
0xe1c000a0, // ld1q_za_p_rrr_
|
||||
0xa14040a0, // ld1w_mzx_p_bi_2x8
|
||||
0xa140c0a0, // ld1w_mzx_p_bi_4x4
|
||||
0xa10040a0, // ld1w_mzx_p_br_2x8
|
||||
0xa100c0a0, // ld1w_mzx_p_br_4x4
|
||||
0xe08000a0, // ld1w_za_p_rrr_
|
||||
0xa14000a8, // ldnt1b_mzx_p_bi_2x8
|
||||
0xa14080a8, // ldnt1b_mzx_p_bi_4x4
|
||||
0xa10000a8, // ldnt1b_mzx_p_br_2x8
|
||||
0xa10080a8, // ldnt1b_mzx_p_br_4x4
|
||||
0xa14060a8, // ldnt1d_mzx_p_bi_2x8
|
||||
0xa140e0a8, // ldnt1d_mzx_p_bi_4x4
|
||||
0xa10060a8, // ldnt1d_mzx_p_br_2x8
|
||||
0xa100e0a8, // ldnt1d_mzx_p_br_4x4
|
||||
0xa14020a8, // ldnt1h_mzx_p_bi_2x8
|
||||
0xa140a0a8, // ldnt1h_mzx_p_bi_4x4
|
||||
0xa10020a8, // ldnt1h_mzx_p_br_2x8
|
||||
0xa100a0a8, // ldnt1h_mzx_p_br_4x4
|
||||
0xa14040a8, // ldnt1w_mzx_p_bi_2x8
|
||||
0xa140c0a8, // ldnt1w_mzx_p_bi_4x4
|
||||
0xa10040a8, // ldnt1w_mzx_p_br_2x8
|
||||
0xa100c0a8, // ldnt1w_mzx_p_br_4x4
|
||||
0xe10000a0, // ldr_za_ri_
|
||||
0xe11f80a0, // ldr_zt_br_
|
||||
0xa16000a0, // st1b_mzx_p_bi_2x8
|
||||
0xa16080a0, // st1b_mzx_p_bi_4x4
|
||||
0xa12000a0, // st1b_mzx_p_br_2x8
|
||||
0xa12080a0, // st1b_mzx_p_br_4x4
|
||||
0xe02000a0, // st1b_za_p_rrr_
|
||||
0xa16060a0, // st1d_mzx_p_bi_2x8
|
||||
0xa160e0a0, // st1d_mzx_p_bi_4x4
|
||||
0xa12060a0, // st1d_mzx_p_br_2x8
|
||||
0xa120e0a0, // st1d_mzx_p_br_4x4
|
||||
0xe0e000a0, // st1d_za_p_rrr_
|
||||
0xa16020a0, // st1h_mzx_p_bi_2x8
|
||||
0xa160a0a0, // st1h_mzx_p_bi_4x4
|
||||
0xa12020a0, // st1h_mzx_p_br_2x8
|
||||
0xa120a0a0, // st1h_mzx_p_br_4x4
|
||||
0xe06000a0, // st1h_za_p_rrr_
|
||||
0xe1e000a0, // st1q_za_p_rrr_
|
||||
0xa16040a0, // st1w_mzx_p_bi_2x8
|
||||
0xa160c0a0, // st1w_mzx_p_bi_4x4
|
||||
0xa12040a0, // st1w_mzx_p_br_2x8
|
||||
0xa120c0a0, // st1w_mzx_p_br_4x4
|
||||
0xe0a000a0, // st1w_za_p_rrr_
|
||||
0xa16000a8, // stnt1b_mzx_p_bi_2x8
|
||||
0xa16080a8, // stnt1b_mzx_p_bi_4x4
|
||||
0xa12000a8, // stnt1b_mzx_p_br_2x8
|
||||
0xa12080a8, // stnt1b_mzx_p_br_4x4
|
||||
0xa16060a8, // stnt1d_mzx_p_bi_2x8
|
||||
0xa160e0a8, // stnt1d_mzx_p_bi_4x4
|
||||
0xa12060a8, // stnt1d_mzx_p_br_2x8
|
||||
0xa120e0a8, // stnt1d_mzx_p_br_4x4
|
||||
0xa16020a8, // stnt1h_mzx_p_bi_2x8
|
||||
0xa160a0a8, // stnt1h_mzx_p_bi_4x4
|
||||
0xa12020a8, // stnt1h_mzx_p_br_2x8
|
||||
0xa120a0a8, // stnt1h_mzx_p_br_4x4
|
||||
0xa16040a8, // stnt1w_mzx_p_bi_2x8
|
||||
0xa160c0a8, // stnt1w_mzx_p_bi_4x4
|
||||
0xa12040a8, // stnt1w_mzx_p_br_2x8
|
||||
0xa120c0a8, // stnt1w_mzx_p_br_4x4
|
||||
0xe12000a0, // str_za_ri_
|
||||
0xe13f80a0, // str_zt_br_
|
||||
];
|
||||
|
||||
fn source(words: &[u32]) -> Vec<u8> {
|
||||
words.iter().flat_map(|word| word.to_le_bytes()).collect()
|
||||
}
|
||||
|
||||
fn declared_profile(streaming: bool, za: bool, sme2: bool, zt0: bool) -> ScalableProfile {
|
||||
let length = VectorLength::from_bytes(16).unwrap();
|
||||
let features = if sme2 {
|
||||
ScalableFeatures::of(ScalableFeature::Sme).with(ScalableFeature::Sme2)
|
||||
} else {
|
||||
ScalableFeatures::of(ScalableFeature::Sme)
|
||||
};
|
||||
ScalableProfile::new_with_features(
|
||||
length,
|
||||
ScalableMode::new(streaming, za),
|
||||
features,
|
||||
ScalableControls::new(length, zt0),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn target() -> TargetCpu {
|
||||
TargetCpu::AtomicLoad16.with_cx16()
|
||||
}
|
||||
|
||||
fn assert_declined(word: u32, profile: ScalableProfile, target: TargetCpu) {
|
||||
let bytes = source(&[word, RET_X30]);
|
||||
let scan = memory_requirements(&bytes, GUEST_BASE, profile, target).unwrap_err();
|
||||
let compile = compile_for_profile(&bytes, GUEST_BASE, profile, target).unwrap_err();
|
||||
assert_eq!(scan.0, compile.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_form_dispatches_exact_body_and_source_map() {
|
||||
for word in WORDS {
|
||||
let operand = sme_memory::decode(word).unwrap();
|
||||
assert_eq!(
|
||||
crate::aarch64::sme::decode(word),
|
||||
Some(Ok(crate::aarch64::sme::Operand::Memory(operand)))
|
||||
);
|
||||
let profile = declared_profile(true, true, true, true);
|
||||
let bytes = source(&[word, RET_X30]);
|
||||
let native = compile_for_profile(&bytes, GUEST_BASE, profile, target()).unwrap();
|
||||
let mut expected = Vec::new();
|
||||
x86_64::sme::memory::emit(
|
||||
&mut expected,
|
||||
&operand,
|
||||
profile.vector_length(),
|
||||
target(),
|
||||
GUEST_BASE.0,
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
&native.x86_64_code[..CONTEXT_WRAPPER_BYTES],
|
||||
context_wrapper()
|
||||
);
|
||||
assert_eq!(
|
||||
native.source_map,
|
||||
[
|
||||
(GUEST_BASE, CONTEXT_WRAPPER_BYTES),
|
||||
(
|
||||
GuestAddress(GUEST_BASE.0 + INSTRUCTION_BYTES as u64),
|
||||
CONTEXT_WRAPPER_BYTES + expected.len()
|
||||
)
|
||||
]
|
||||
);
|
||||
assert_eq!(
|
||||
&native.x86_64_code[CONTEXT_WRAPPER_BYTES..native.source_map[1].1],
|
||||
expected
|
||||
);
|
||||
assert_eq!(&native.x86_64_code[native.source_map[1].1..], [RET]);
|
||||
assert_eq!(
|
||||
memory_requirements(&bytes, GUEST_BASE, profile, target()).unwrap(),
|
||||
x86_64::sme::memory::requirements(&operand)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mode_feature_and_ezt0_checks_follow_each_memory_class() {
|
||||
for word in WORDS {
|
||||
match sme_memory::decode(word).unwrap() {
|
||||
SmeMemoryOperand::Vectors(_) => {
|
||||
assert_declined(word, declared_profile(false, false, true, false), target());
|
||||
assert_declined(word, declared_profile(true, true, false, false), target());
|
||||
assert!(
|
||||
compile_for_profile(
|
||||
&source(&[word, RET_X30]),
|
||||
GUEST_BASE,
|
||||
declared_profile(true, false, true, false),
|
||||
target()
|
||||
)
|
||||
.is_ok()
|
||||
);
|
||||
}
|
||||
SmeMemoryOperand::Tile(_) => {
|
||||
assert_declined(word, declared_profile(false, true, true, false), target());
|
||||
assert_declined(word, declared_profile(true, false, true, false), target());
|
||||
assert!(
|
||||
compile_for_profile(
|
||||
&source(&[word, RET_X30]),
|
||||
GUEST_BASE,
|
||||
declared_profile(true, true, false, false),
|
||||
target()
|
||||
)
|
||||
.is_ok()
|
||||
);
|
||||
}
|
||||
SmeMemoryOperand::ZaVector(_) => {
|
||||
assert_declined(word, declared_profile(true, false, true, false), target());
|
||||
assert!(
|
||||
compile_for_profile(
|
||||
&source(&[word, RET_X30]),
|
||||
GUEST_BASE,
|
||||
declared_profile(false, true, false, false),
|
||||
target()
|
||||
)
|
||||
.is_ok()
|
||||
);
|
||||
}
|
||||
SmeMemoryOperand::Zt(_) => {
|
||||
assert_declined(word, declared_profile(true, false, true, true), target());
|
||||
assert_declined(word, declared_profile(true, true, false, false), target());
|
||||
assert_declined(word, declared_profile(true, true, true, false), target());
|
||||
assert!(
|
||||
compile_for_profile(
|
||||
&source(&[word, RET_X30]),
|
||||
GUEST_BASE,
|
||||
declared_profile(false, true, true, true),
|
||||
target()
|
||||
)
|
||||
.is_ok()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn independent_host_capabilities_decline_before_scan_or_emission() {
|
||||
let profile = declared_profile(true, true, true, true);
|
||||
for word in WORDS {
|
||||
let operand = sme_memory::decode(word).unwrap();
|
||||
for target in [
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::AtomicLoad16,
|
||||
TargetCpu::Cx16,
|
||||
] {
|
||||
if x86_64::sme::memory::validate_target(&operand, target).is_err() {
|
||||
assert_declined(word, profile, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn existing_v1_contract_admits_its_features_and_declines_disabled_zt0() {
|
||||
let profile = ScalableProfile::new(
|
||||
VectorLength::from_bytes(16).unwrap(),
|
||||
ScalableMode::new(true, true),
|
||||
);
|
||||
assert_eq!(profile.id(), PROFILE_ID);
|
||||
assert_eq!(profile.declared_features(), None);
|
||||
assert_eq!(profile.required_dit(), None);
|
||||
assert!(!profile.controls().zt0_enabled());
|
||||
for word in WORDS {
|
||||
if matches!(sme_memory::decode(word), Some(SmeMemoryOperand::Zt(_))) {
|
||||
assert_declined(word, profile, target());
|
||||
} else {
|
||||
assert!(
|
||||
compile_for_profile(&source(&[word, RET_X30]), GUEST_BASE, profile, target())
|
||||
.is_ok()
|
||||
);
|
||||
}
|
||||
}
|
||||
assert!(
|
||||
compile_for_profile(
|
||||
&source(&[NOP, RET_X30]),
|
||||
GUEST_BASE,
|
||||
profile,
|
||||
TargetCpu::Baseline
|
||||
)
|
||||
.is_ok()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn complete_body_requirements_fold_every_memory_instruction() {
|
||||
let profile = declared_profile(true, true, true, true);
|
||||
let mut words = vec![NOP];
|
||||
let mut expected = MemoryRequirements::default();
|
||||
for word in WORDS {
|
||||
let sp_word = (word & !BASE_REGISTER_MASK) | BASE_REGISTER_MASK;
|
||||
words.push(sp_word);
|
||||
let operand = sme_memory::decode(sp_word).unwrap();
|
||||
expected = expected
|
||||
.merge(x86_64::sme::memory::requirements(&operand))
|
||||
.unwrap();
|
||||
}
|
||||
words.push(RET_X30);
|
||||
assert_eq!(
|
||||
memory_requirements(&source(&words), GUEST_BASE, profile, target()).unwrap(),
|
||||
expected
|
||||
);
|
||||
assert!(compile_for_profile(&source(&words), GUEST_BASE, profile, target()).is_ok());
|
||||
}
|
||||
|
||||
// Append to extended/sme_memory_tests.rs; reuse its source/profile/target helpers.
|
||||
|
||||
#[test]
|
||||
fn prepared_memory_metadata_retains_per_pc_features_helpers_and_quantities() {
|
||||
use crate::aarch64::scalable::execution::{
|
||||
GuestMemoryQuantity, ScalableAccessCheck, ScalableAccessRequirements,
|
||||
};
|
||||
|
||||
const MULTI_Z_LOAD_BYTE: u32 = 0xa140_00a0;
|
||||
const TILE_LOAD_QUADWORD: u32 = 0xe1c0_00a0;
|
||||
const WHOLE_ZA_LOAD: u32 = 0xe100_00a0;
|
||||
const ZT_LOAD: u32 = 0xe11f_80a0;
|
||||
let words = [
|
||||
NOP,
|
||||
MULTI_Z_LOAD_BYTE,
|
||||
TILE_LOAD_QUADWORD,
|
||||
WHOLE_ZA_LOAD,
|
||||
ZT_LOAD,
|
||||
RET_X30,
|
||||
];
|
||||
let prepared = prepare_leaf(
|
||||
&source(&words),
|
||||
GUEST_BASE,
|
||||
declared_profile(true, true, true, true),
|
||||
target(),
|
||||
)
|
||||
.unwrap();
|
||||
let instructions = prepared.execution_requirements.instructions();
|
||||
assert_eq!(instructions.len(), words.len());
|
||||
let sme = ScalableFeatures::of(ScalableFeature::Sme);
|
||||
let sme2 = sme.with(ScalableFeature::Sme2);
|
||||
let expected = [
|
||||
(None, vec![], GuestMemoryQuantity::None),
|
||||
(
|
||||
Some(sme2),
|
||||
vec![ScalableAccessCheck::StreamingSveEnabled],
|
||||
GuestMemoryQuantity::Maximum(ElementSize::Byte),
|
||||
),
|
||||
(
|
||||
Some(sme),
|
||||
vec![ScalableAccessCheck::StreamingSveAndZaEnabled],
|
||||
GuestMemoryQuantity::Maximum(ElementSize::Quadword),
|
||||
),
|
||||
(
|
||||
Some(sme),
|
||||
vec![ScalableAccessCheck::SmeAndZaEnabled],
|
||||
GuestMemoryQuantity::Maximum(ElementSize::Byte),
|
||||
),
|
||||
(
|
||||
Some(sme2),
|
||||
vec![
|
||||
ScalableAccessCheck::SmeEnabled,
|
||||
ScalableAccessCheck::SmeZt0Enabled,
|
||||
],
|
||||
GuestMemoryQuantity::Maximum(ElementSize::Byte),
|
||||
),
|
||||
(None, vec![], GuestMemoryQuantity::None),
|
||||
];
|
||||
for (index, (instruction, (features, helpers, quantity))) in
|
||||
instructions.iter().zip(expected).enumerate()
|
||||
{
|
||||
let pc = GuestAddress(GUEST_BASE.0 + (index * size_of::<u32>()) as u64);
|
||||
assert_eq!(instruction.pc(), pc);
|
||||
assert_eq!(prepared.native.source_map[index].0, pc);
|
||||
let clauses: Vec<_> = features.into_iter().map(FeatureRequirement::all).collect();
|
||||
assert_eq!(instruction.feature_clauses(), clauses);
|
||||
assert_eq!(
|
||||
instruction.access(),
|
||||
&ScalableAccessRequirements::Known(helpers.into_boxed_slice())
|
||||
);
|
||||
assert_eq!(instruction.guest_memory_quantity(), quantity);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn prepared_sm0_whole_banks_keep_sme_helpers_and_byte_quantities() {
|
||||
use crate::aarch64::scalable::execution::{
|
||||
GuestMemoryQuantity, ScalableAccessCheck, ScalableAccessRequirements,
|
||||
};
|
||||
|
||||
const MEMORY_INSTRUCTIONS: usize = 2;
|
||||
const WHOLE_ZA_LOAD: u32 = 0xe100_00a0;
|
||||
const WHOLE_ZA_STORE: u32 = 0xe120_00a0;
|
||||
const ZT_LOAD: u32 = 0xe11f_80a0;
|
||||
const ZT_STORE: u32 = 0xe13f_80a0;
|
||||
for (words, sme2, checks) in [
|
||||
(
|
||||
[WHOLE_ZA_LOAD, WHOLE_ZA_STORE, RET_X30],
|
||||
false,
|
||||
vec![ScalableAccessCheck::SmeAndZaEnabled],
|
||||
),
|
||||
(
|
||||
[ZT_LOAD, ZT_STORE, RET_X30],
|
||||
true,
|
||||
vec![
|
||||
ScalableAccessCheck::SmeEnabled,
|
||||
ScalableAccessCheck::SmeZt0Enabled,
|
||||
],
|
||||
),
|
||||
] {
|
||||
let prepared = prepare_leaf(
|
||||
&source(&words),
|
||||
GUEST_BASE,
|
||||
declared_profile(false, true, sme2, sme2),
|
||||
target(),
|
||||
)
|
||||
.unwrap();
|
||||
for instruction in &prepared.execution_requirements.instructions()[..MEMORY_INSTRUCTIONS] {
|
||||
assert_eq!(
|
||||
instruction.access(),
|
||||
&ScalableAccessRequirements::Known(checks.clone().into_boxed_slice())
|
||||
);
|
||||
assert_eq!(
|
||||
instruction.guest_memory_quantity(),
|
||||
GuestMemoryQuantity::Maximum(ElementSize::Byte)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -322,6 +322,20 @@ pub const SOURCE_FINGERPRINT_MATERIAL: &str = concat!(
|
||||
include_str!("x86_64/sve/floating/conversion/integer.rs"),
|
||||
include_str!("x86_64/sve/floating/conversion/unsigned64.rs"),
|
||||
include_str!("x86_64/sve/floating/rounding.rs"),
|
||||
include_str!("aarch64/scalable/execution.rs"),
|
||||
include_str!("aarch64/sve/memory.rs"),
|
||||
include_str!("aarch64/sve/memory_load.rs"),
|
||||
include_str!("aarch64/sve/memory_multi.rs"),
|
||||
include_str!("aarch64/sve/memory_store.rs"),
|
||||
include_str!("aarch64/sve/memory_structure.rs"),
|
||||
include_str!("aarch64/sme/memory.rs"),
|
||||
include_str!("x86_64/sve/memory.rs"),
|
||||
include_str!("x86_64/sve/memory_load.rs"),
|
||||
include_str!("x86_64/sve/memory_multi.rs"),
|
||||
include_str!("x86_64/sve/memory_store.rs"),
|
||||
include_str!("x86_64/sve/memory_structure.rs"),
|
||||
include_str!("x86_64/sme/memory.rs"),
|
||||
include_str!("x86_64/sme/memory/za.rs"),
|
||||
);
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
//! scalable view. Helpers use only caller-saved RAX/RCX/RDX and XMM0..7. They
|
||||
//! access architectural state storage, never guest data RAM or monitor metadata.
|
||||
|
||||
pub(crate) use super::memory_context as memory;
|
||||
|
||||
mod legacy;
|
||||
pub(crate) mod numerical;
|
||||
pub(crate) mod routing;
|
||||
|
||||
@@ -5,5 +5,6 @@ pub(crate) mod integer_matrix;
|
||||
pub(crate) mod integer_products;
|
||||
pub(crate) mod integer_vector;
|
||||
pub(crate) mod length;
|
||||
pub(crate) mod memory;
|
||||
pub(crate) mod movement;
|
||||
pub(crate) mod tables;
|
||||
@@ -0,0 +1,542 @@
|
||||
//! SME transfers through the shared exact-access and reservation-aware service.
|
||||
//!
|
||||
//! Architectural loads commit only after every reached access succeeds. Stores
|
||||
//! submit one active element at a time; the service owns its exact atomic parts.
|
||||
mod za;
|
||||
|
||||
use za::emit_za_body;
|
||||
|
||||
use crate::{
|
||||
TargetCpu,
|
||||
aarch64::{
|
||||
Register,
|
||||
scalable::{VECTOR_CHUNK_BYTES, VectorLength},
|
||||
sme::memory::{Direction, Offset, Operand, VectorTransfer},
|
||||
},
|
||||
context::{
|
||||
EXECUTION_CONTEXT_SCALABLE_OFFSET,
|
||||
memory::{
|
||||
MEMORY_REQUEST_ADDRESS_OFFSET, MEMORY_REQUEST_BYTES, MEMORY_REQUEST_DATA_OFFSET,
|
||||
MemoryRequirements, MemoryStatus, SpAlignmentRequirement, flags, host_caps,
|
||||
profile_requirements,
|
||||
},
|
||||
},
|
||||
x86_64::{
|
||||
isa::SimdOpcode as Host,
|
||||
scalable::{load_z_chunk, memory as service, read_predicate_chunk, store_z_chunk},
|
||||
sve::predicate::{emit_prepared_counter_chunk, prepare_counter},
|
||||
},
|
||||
};
|
||||
|
||||
const HOST_WORD_BYTES: u32 = size_of::<u64>() as u32;
|
||||
const STACK_ALIGNMENT: u32 = VECTOR_CHUNK_BYTES as u32;
|
||||
const REQUEST_OFFSET: u32 = 0;
|
||||
const ADDRESS_OFFSET: u32 = MEMORY_REQUEST_BYTES as u32;
|
||||
const SELECTOR_OFFSET: u32 = ADDRESS_OFFSET + HOST_WORD_BYTES;
|
||||
const ITERATION_OFFSET: u32 = SELECTOR_OFFSET + HOST_WORD_BYTES;
|
||||
const PREDICATE_OFFSET: u32 = 64;
|
||||
const MAX_VECTOR_GROUP: usize = 4;
|
||||
const PREDICATE_GROUP_BITS_PER_BYTE: usize = 8;
|
||||
const MIN_PREDICATE_SCRATCH_BYTES: usize = 32;
|
||||
const ZT_BYTES: usize = 64;
|
||||
const VALUE_XMM: u8 = 0;
|
||||
const MODRM_STACK_DISP32: u8 = 0x84;
|
||||
const STACK_SIB: u8 = 0x24;
|
||||
const REGISTER_SHIFT: u8 = 3;
|
||||
const SUB_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xec];
|
||||
const ADD_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xc4];
|
||||
const MOV_RAX_RSP_DISP32: &[u8] = &[0x48, 0x8b, 0x84, 0x24];
|
||||
const MOV_RSP_DISP32_RAX: &[u8] = &[0x48, 0x89, 0x84, 0x24];
|
||||
const MOV_RCX_RAX: &[u8] = &[0x48, 0x89, 0xc1];
|
||||
const ADD_RAX_RCX: &[u8] = &[0x48, 0x01, 0xc8];
|
||||
const ADD_RAX_IMM32: &[u8] = &[0x48, 0x05];
|
||||
const SHL_RAX_IMM8: &[u8] = &[0x48, 0xc1, 0xe0];
|
||||
const XOR_EAX_EAX: &[u8] = &[0x31, 0xc0];
|
||||
const TEST_AL_IMM8: &[u8] = &[0xa8];
|
||||
const JZ_REL32: &[u8] = &[0x0f, 0x84];
|
||||
const JNC_REL32: &[u8] = &[0x0f, 0x83];
|
||||
const JB_REL32: &[u8] = &[0x0f, 0x82];
|
||||
const JMP_REL32: &[u8] = &[0xe9];
|
||||
const RET: u8 = 0xc3;
|
||||
const MOV_RCX_RSP_DISP32: &[u8] = &[0x48, 0x8b, 0x8c, 0x24];
|
||||
const BT_RSP_DISP32_IMM8: &[u8] = &[0x48, 0x0f, 0xba, 0xa4, 0x24];
|
||||
const FIRST_PREDICATE_BIT: u8 = 0;
|
||||
const BT_RSP_DISP32_RCX: &[u8] = &[0x48, 0x0f, 0xa3, 0x8c, 0x24];
|
||||
const ADD_RSP_DISP32_IMM8: &[u8] = &[0x48, 0x83, 0x84, 0x24];
|
||||
const CMP_RSP_DISP32_IMM32: &[u8] = &[0x48, 0x81, 0xbc, 0x24];
|
||||
const MOV_R8_CONTEXT_DISP8: &[u8] = &[0x4d, 0x8b, 0x47];
|
||||
const MOV_R8_R8_DISP8: &[u8] = &[0x4d, 0x8b, 0x40];
|
||||
|
||||
struct Scratch {
|
||||
request: u32,
|
||||
address: u32,
|
||||
selector: u32,
|
||||
iteration: u32,
|
||||
predicate: u32,
|
||||
data: u32,
|
||||
bytes: u32,
|
||||
}
|
||||
|
||||
struct Transfer {
|
||||
bytes: u32,
|
||||
element_bytes: u32,
|
||||
flags: u32,
|
||||
predicated: bool,
|
||||
}
|
||||
|
||||
impl Scratch {
|
||||
fn new(length: VectorLength) -> Self {
|
||||
let predicate_bytes = (length.bytes() * MAX_VECTOR_GROUP / PREDICATE_GROUP_BITS_PER_BYTE)
|
||||
.max(MIN_PREDICATE_SCRATCH_BYTES) as u32;
|
||||
let data = (PREDICATE_OFFSET + predicate_bytes).next_multiple_of(STACK_ALIGNMENT);
|
||||
let data_bytes = (length.bytes() * MAX_VECTOR_GROUP).max(ZT_BYTES) as u32;
|
||||
Self {
|
||||
request: REQUEST_OFFSET,
|
||||
address: ADDRESS_OFFSET,
|
||||
selector: SELECTOR_OFFSET,
|
||||
iteration: ITERATION_OFFSET,
|
||||
predicate: PREDICATE_OFFSET,
|
||||
data,
|
||||
bytes: (data + data_bytes).next_multiple_of(STACK_ALIGNMENT),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn required_host_caps(operand: &Operand) -> u32 {
|
||||
let (direction, bytes, base) = match operand {
|
||||
Operand::Vectors(transfer) => (
|
||||
transfer.direction,
|
||||
transfer.element.bytes(),
|
||||
transfer.address.base,
|
||||
),
|
||||
Operand::Tile(transfer) => (
|
||||
transfer.direction,
|
||||
transfer.element.bytes(),
|
||||
transfer.address.base,
|
||||
),
|
||||
Operand::ZaVector(_) | Operand::Zt(_) => return 0,
|
||||
};
|
||||
if direction == Direction::Store && bytes == VECTOR_CHUNK_BYTES {
|
||||
return host_caps::CX16;
|
||||
}
|
||||
// A generic unaligned element may cross an 8-byte host quantity while
|
||||
// remaining one architectural 16-byte SCA part. SP-based element offsets
|
||||
// preserve natural alignment after the original SP16 check.
|
||||
if direction == Direction::Load
|
||||
&& bytes > 1
|
||||
&& (bytes == VECTOR_CHUNK_BYTES || base != Register::Sp)
|
||||
{
|
||||
return host_caps::ATOMIC_LOAD16;
|
||||
}
|
||||
0
|
||||
}
|
||||
|
||||
fn vector_flags(operand: &VectorTransfer) -> u32 {
|
||||
// These forms use the four-argument CreateAccDescSVE overload, whose
|
||||
// descriptor is unpredicated even though the operation tests a predicate.
|
||||
let mut access = 0;
|
||||
if operand.direction == Direction::Store {
|
||||
access |= flags::WRITE;
|
||||
}
|
||||
if operand.non_temporal {
|
||||
access |= flags::NON_TEMPORAL;
|
||||
}
|
||||
if matches!(operand.address.offset, Offset::Register(_)) || operand.address.base != Register::Sp
|
||||
{
|
||||
access |= flags::TAG_CHECKED;
|
||||
}
|
||||
access
|
||||
}
|
||||
|
||||
/// Bind the complete body's immutable platform and policy requirements to entry.
|
||||
/// The containing compiled manifest retains these even for inactive lanes.
|
||||
pub(crate) fn requirements(operand: &Operand) -> MemoryRequirements {
|
||||
let (required_flags, base) = match operand {
|
||||
Operand::Vectors(transfer) => (vector_flags(transfer), transfer.address.base),
|
||||
Operand::Tile(transfer) => (
|
||||
za::access_flags(transfer.direction, true),
|
||||
transfer.address.base,
|
||||
),
|
||||
Operand::ZaVector(transfer) => (
|
||||
za::access_flags(transfer.direction, transfer.base != Register::Sp),
|
||||
transfer.base,
|
||||
),
|
||||
Operand::Zt(transfer) => (
|
||||
za::access_flags(transfer.direction, transfer.base != Register::Sp),
|
||||
transfer.base,
|
||||
),
|
||||
};
|
||||
MemoryRequirements {
|
||||
required_flags,
|
||||
required_host_caps: required_host_caps(operand),
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| if required_flags & flags::TAG_CHECKED != 0 {
|
||||
profile_requirements::TAG_GRANULES | profile_requirements::SCALABLE_TAG_CHECKS
|
||||
} else {
|
||||
0
|
||||
},
|
||||
required_sp_alignment: if base == Register::Sp {
|
||||
SpAlignmentRequirement::Enabled
|
||||
} else {
|
||||
SpAlignmentRequirement::Any
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Capability requirements are checked before any request, prefix reset or store.
|
||||
pub(crate) fn validate_target(operand: &Operand, target: TargetCpu) -> Result<(), &'static str> {
|
||||
let required = required_host_caps(operand);
|
||||
if required & host_caps::CX16 != 0 && !target.supports(TargetCpu::Cx16) {
|
||||
return Err("SME 16-byte stores require the independent CX16 host capability");
|
||||
}
|
||||
if required & host_caps::ATOMIC_LOAD16 != 0 && !target.supports(TargetCpu::AtomicLoad16) {
|
||||
return Err("SME coherent wide reads require the independent AtomicLoad16 host capability");
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn emit(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &Operand,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
) -> Result<(), &'static str> {
|
||||
validate_target(operand, target)?;
|
||||
let scratch = Scratch::new(length);
|
||||
stack_space(code, scratch.bytes, true);
|
||||
service::begin(code);
|
||||
let mut failures = Vec::new();
|
||||
match operand {
|
||||
Operand::Vectors(transfer) => {
|
||||
emit_vectors(code, transfer, length, target, pc, &scratch, &mut failures)
|
||||
}
|
||||
_ => emit_za_body(code, operand, length, target, pc, &scratch, &mut failures),
|
||||
}
|
||||
stack_space(code, scratch.bytes, false);
|
||||
let success = jump(code, JMP_REL32);
|
||||
let failure = code.len();
|
||||
stack_space(code, scratch.bytes, false);
|
||||
code.push(RET);
|
||||
let done = code.len();
|
||||
service::patch_branch(code, success, done);
|
||||
for displacement in failures {
|
||||
service::patch_branch(code, displacement, failure);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn stack_space(code: &mut Vec<u8>, bytes: u32, reserve: bool) {
|
||||
code.extend(if reserve {
|
||||
SUB_RSP_IMM32
|
||||
} else {
|
||||
ADD_RSP_IMM32
|
||||
});
|
||||
code.extend(bytes.to_le_bytes());
|
||||
}
|
||||
|
||||
fn load_guest(code: &mut Vec<u8>, register: Register) {
|
||||
crate::x86_64::load(code, register);
|
||||
}
|
||||
|
||||
fn stack_load(code: &mut Vec<u8>, offset: u32) {
|
||||
code.extend(MOV_RAX_RSP_DISP32);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn stack_store(code: &mut Vec<u8>, offset: u32) {
|
||||
code.extend(MOV_RSP_DISP32_RAX);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn stack_vector(code: &mut Vec<u8>, load: bool, xmm: u8, offset: u32, target: TargetCpu) {
|
||||
if load {
|
||||
Host::LoadUnaligned
|
||||
} else {
|
||||
Host::StoreUnaligned
|
||||
}
|
||||
.append(code, target);
|
||||
code.push(MODRM_STACK_DISP32 | (xmm << REGISTER_SHIFT));
|
||||
code.push(STACK_SIB);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn pointer(code: &mut Vec<u8>, field: u32) {
|
||||
code.extend(MOV_R8_CONTEXT_DISP8);
|
||||
code.push(EXECUTION_CONTEXT_SCALABLE_OFFSET as u8);
|
||||
code.extend(MOV_R8_R8_DISP8);
|
||||
code.push(field as u8);
|
||||
}
|
||||
|
||||
fn jump(code: &mut Vec<u8>, opcode: &[u8]) -> usize {
|
||||
code.extend(opcode);
|
||||
let displacement = code.len();
|
||||
code.extend(0_i32.to_le_bytes());
|
||||
displacement
|
||||
}
|
||||
|
||||
fn check_sp(code: &mut Vec<u8>, base: Register, pc: u64, failures: &mut Vec<usize>) {
|
||||
if base != Register::Sp {
|
||||
return;
|
||||
}
|
||||
load_guest(code, base);
|
||||
code.extend(TEST_AL_IMM8);
|
||||
code.push((STACK_ALIGNMENT - 1) as u8);
|
||||
let aligned = jump(code, JZ_REL32);
|
||||
service::fault(code, MemoryStatus::StackAlignment, pc);
|
||||
failures.push(jump(code, JMP_REL32));
|
||||
let destination = code.len();
|
||||
service::patch_branch(code, aligned, destination);
|
||||
}
|
||||
|
||||
fn transfer_loop(
|
||||
code: &mut Vec<u8>,
|
||||
transfer: Transfer,
|
||||
pc: u64,
|
||||
scratch: &Scratch,
|
||||
failures: &mut Vec<usize>,
|
||||
) {
|
||||
service::request(
|
||||
code,
|
||||
scratch.request,
|
||||
scratch.data,
|
||||
transfer.element_bytes,
|
||||
transfer.flags,
|
||||
pc,
|
||||
);
|
||||
if transfer.bytes == transfer.element_bytes {
|
||||
let inactive = if transfer.predicated {
|
||||
code.extend(BT_RSP_DISP32_IMM8);
|
||||
code.extend(scratch.predicate.to_le_bytes());
|
||||
code.push(FIRST_PREDICATE_BIT);
|
||||
Some(jump(code, JNC_REL32))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
service::call(code, scratch.request);
|
||||
failures.push(service::branch_failed(code));
|
||||
let destination = code.len();
|
||||
if let Some(branch) = inactive {
|
||||
service::patch_branch(code, branch, destination);
|
||||
}
|
||||
// The final address/data-pointer increments are dead private state in
|
||||
// the supported no-CPA profile. No later access consumes those values.
|
||||
return;
|
||||
}
|
||||
code.extend(XOR_EAX_EAX);
|
||||
stack_store(code, scratch.iteration);
|
||||
let head = code.len();
|
||||
let inactive = if transfer.predicated {
|
||||
code.extend(MOV_RCX_RSP_DISP32);
|
||||
code.extend(scratch.iteration.to_le_bytes());
|
||||
// Memory BT uses the complete nonnegative register bit index, advancing
|
||||
// its qword address for mask bits above63.
|
||||
code.extend(BT_RSP_DISP32_RCX);
|
||||
code.extend(scratch.predicate.to_le_bytes());
|
||||
Some(jump(code, JNC_REL32))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
service::call(code, scratch.request);
|
||||
failures.push(service::branch_failed(code));
|
||||
let increment = code.len();
|
||||
if let Some(displacement) = inactive {
|
||||
service::patch_branch(code, displacement, increment);
|
||||
}
|
||||
for offset in [
|
||||
scratch.request + MEMORY_REQUEST_ADDRESS_OFFSET,
|
||||
scratch.request + MEMORY_REQUEST_DATA_OFFSET,
|
||||
scratch.iteration,
|
||||
] {
|
||||
code.extend(ADD_RSP_DISP32_IMM8);
|
||||
code.extend(offset.to_le_bytes());
|
||||
code.push(transfer.element_bytes as u8);
|
||||
}
|
||||
code.extend(CMP_RSP_DISP32_IMM32);
|
||||
code.extend(scratch.iteration.to_le_bytes());
|
||||
code.extend(transfer.bytes.to_le_bytes());
|
||||
let repeat = jump(code, JB_REL32);
|
||||
service::patch_branch(code, repeat, head);
|
||||
}
|
||||
|
||||
fn emit_vectors(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &VectorTransfer,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
scratch: &Scratch,
|
||||
failures: &mut Vec<usize>,
|
||||
) {
|
||||
check_sp(code, operand.address.base, pc, failures);
|
||||
let loading = operand.direction == Direction::Load;
|
||||
if loading {
|
||||
Host::Xor.register(code, VALUE_XMM, VALUE_XMM, target);
|
||||
}
|
||||
for group in 0..operand.registers.count {
|
||||
let register = operand.registers.first + group * operand.registers.stride;
|
||||
for chunk in 0..length.chunks() {
|
||||
if !loading {
|
||||
load_z_chunk(code, register, chunk, VALUE_XMM, length, target);
|
||||
}
|
||||
let offset = scratch.data
|
||||
+ u32::from(group) * length.bytes() as u32
|
||||
+ (chunk * VECTOR_CHUNK_BYTES) as u32;
|
||||
stack_vector(code, false, VALUE_XMM, offset, target);
|
||||
}
|
||||
}
|
||||
read_predicate_chunk(code, operand.predicate, 0, length);
|
||||
prepare_counter(code, length);
|
||||
let mask_chunks = length.bytes() * usize::from(operand.registers.count) / u64::BITS as usize;
|
||||
for chunk in 0..mask_chunks.max(1) {
|
||||
emit_prepared_counter_chunk(code, chunk, length);
|
||||
stack_store(code, scratch.predicate + chunk as u32 * HOST_WORD_BYTES);
|
||||
}
|
||||
load_guest(code, operand.address.base);
|
||||
match operand.address.offset {
|
||||
Offset::VectorGroups(offset) => {
|
||||
let bytes =
|
||||
i32::from(offset) * i32::from(operand.registers.count) * length.bytes() as i32;
|
||||
if bytes != 0 {
|
||||
code.extend(ADD_RAX_IMM32);
|
||||
code.extend(bytes.to_le_bytes());
|
||||
}
|
||||
}
|
||||
Offset::Register(register) => {
|
||||
stack_store(code, scratch.address);
|
||||
load_guest(code, register);
|
||||
let scale = operand.element.bytes().trailing_zeros() as u8;
|
||||
if scale != 0 {
|
||||
code.extend(SHL_RAX_IMM8);
|
||||
code.push(scale);
|
||||
}
|
||||
code.extend(MOV_RCX_RAX);
|
||||
stack_load(code, scratch.address);
|
||||
code.extend(ADD_RAX_RCX);
|
||||
}
|
||||
}
|
||||
transfer_loop(
|
||||
code,
|
||||
Transfer {
|
||||
bytes: length.bytes() as u32 * u32::from(operand.registers.count),
|
||||
element_bytes: operand.element.bytes() as u32,
|
||||
flags: vector_flags(operand),
|
||||
predicated: true,
|
||||
},
|
||||
pc,
|
||||
scratch,
|
||||
failures,
|
||||
);
|
||||
if loading {
|
||||
for group in 0..operand.registers.count {
|
||||
let register = operand.registers.first + group * operand.registers.stride;
|
||||
for chunk in 0..length.chunks() {
|
||||
let offset = scratch.data
|
||||
+ u32::from(group) * length.bytes() as u32
|
||||
+ (chunk * VECTOR_CHUNK_BYTES) as u32;
|
||||
stack_vector(code, true, VALUE_XMM, offset, target);
|
||||
store_z_chunk(code, register, chunk, VALUE_XMM, length, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::aarch64::sme::memory::decode;
|
||||
|
||||
const GENERIC_HALFWORD_LOAD: u32 = 0xa140_2000;
|
||||
const SP_HALFWORD_LOAD: u32 = 0xa140_23e0;
|
||||
const QUADWORD_TILE_LOAD: u32 = 0xe1c0_0000;
|
||||
const QUADWORD_TILE_STORE: u32 = 0xe1e0_0000;
|
||||
const NOP: u8 = 0x90;
|
||||
|
||||
#[test]
|
||||
fn missing_capabilities_decline_before_any_emitted_effect() {
|
||||
let length = VectorLength::from_bytes(VECTOR_CHUNK_BYTES).unwrap();
|
||||
for (word, target) in [
|
||||
(GENERIC_HALFWORD_LOAD, TargetCpu::Baseline),
|
||||
(GENERIC_HALFWORD_LOAD, TargetCpu::Cx16),
|
||||
(QUADWORD_TILE_LOAD, TargetCpu::Cx16),
|
||||
(QUADWORD_TILE_STORE, TargetCpu::AtomicLoad16),
|
||||
] {
|
||||
let mut code = vec![NOP];
|
||||
assert!(emit(&mut code, &decode(word).unwrap(), length, target, 0).is_err());
|
||||
assert_eq!(code, [NOP]);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn read_and_write_requirements_are_independent() {
|
||||
assert!(
|
||||
validate_target(
|
||||
&decode(QUADWORD_TILE_LOAD).unwrap(),
|
||||
TargetCpu::AtomicLoad16
|
||||
)
|
||||
.is_ok()
|
||||
);
|
||||
assert!(validate_target(&decode(QUADWORD_TILE_STORE).unwrap(), TargetCpu::Cx16).is_ok());
|
||||
assert!(validate_target(&decode(SP_HALFWORD_LOAD).unwrap(), TargetCpu::Baseline).is_ok());
|
||||
for word in [0xe100_0000, 0xe120_0000, 0xe11f_8000, 0xe13f_8000] {
|
||||
assert!(validate_target(&decode(word).unwrap(), TargetCpu::Baseline).is_ok());
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn private_scratch_covers_every_group_and_table_without_overlap() {
|
||||
for bytes in [16, 32, 64, 128, 256] {
|
||||
let scratch = Scratch::new(VectorLength::from_bytes(bytes).unwrap());
|
||||
assert_eq!(scratch.bytes % STACK_ALIGNMENT, 0);
|
||||
assert!(scratch.address >= scratch.request + MEMORY_REQUEST_BYTES as u32);
|
||||
assert!(scratch.selector >= scratch.address + HOST_WORD_BYTES);
|
||||
assert!(scratch.iteration >= scratch.selector + HOST_WORD_BYTES);
|
||||
assert!(scratch.predicate >= scratch.iteration + HOST_WORD_BYTES);
|
||||
assert!(
|
||||
scratch.data
|
||||
>= scratch.predicate
|
||||
+ (bytes * MAX_VECTOR_GROUP / PREDICATE_GROUP_BITS_PER_BYTE) as u32
|
||||
);
|
||||
assert!(
|
||||
scratch.bytes >= scratch.data + (bytes * MAX_VECTOR_GROUP).max(ZT_BYTES) as u32
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn entry_requirements_keep_descriptor_roles_and_profile_preflight() {
|
||||
let generic = requirements(&decode(GENERIC_HALFWORD_LOAD).unwrap());
|
||||
assert_eq!(generic.required_flags, flags::TAG_CHECKED);
|
||||
assert_eq!(generic.required_host_caps, host_caps::ATOMIC_LOAD16);
|
||||
assert_eq!(generic.required_sp_alignment, SpAlignmentRequirement::Any);
|
||||
assert_eq!(
|
||||
generic.required_profile,
|
||||
profile_requirements::NATIVE_ACCESS
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS
|
||||
| profile_requirements::TAG_GRANULES
|
||||
);
|
||||
let stack = requirements(&decode(SP_HALFWORD_LOAD).unwrap());
|
||||
assert_eq!(stack.required_flags, 0);
|
||||
assert_eq!(stack.required_host_caps, 0);
|
||||
assert_eq!(stack.required_sp_alignment, SpAlignmentRequirement::Enabled);
|
||||
assert_eq!(stack.required_profile, profile_requirements::NATIVE_ACCESS);
|
||||
let quad = requirements(&decode(QUADWORD_TILE_STORE).unwrap());
|
||||
assert_eq!(
|
||||
quad.required_flags,
|
||||
flags::SME | flags::TAG_CHECKED | flags::WRITE
|
||||
);
|
||||
assert_eq!(quad.required_host_caps, host_caps::CX16);
|
||||
assert_eq!(quad.required_sp_alignment, SpAlignmentRequirement::Any);
|
||||
assert_eq!(
|
||||
quad.required_profile,
|
||||
profile_requirements::NATIVE_ACCESS
|
||||
| profile_requirements::TAG_GRANULES
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS
|
||||
);
|
||||
let table = requirements(&decode(0xe13f_83e0).unwrap());
|
||||
assert_eq!(table.required_flags, flags::SME | flags::WRITE);
|
||||
assert_eq!(table.required_host_caps, 0);
|
||||
assert_eq!(table.required_sp_alignment, SpAlignmentRequirement::Enabled);
|
||||
assert_eq!(table.required_profile, profile_requirements::NATIVE_ACCESS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,380 @@
|
||||
//! ZA/ZT staging and physical slice addressing around the shared transfer loop.
|
||||
use super::{
|
||||
ADD_RAX_IMM32, SHL_RAX_IMM8, Scratch, Transfer, VALUE_XMM, ZT_BYTES, check_sp, load_guest,
|
||||
pointer, stack_load, stack_store, stack_vector, transfer_loop,
|
||||
};
|
||||
use crate::aarch64::sme::memory::TileTransfer;
|
||||
use crate::context::{SCALABLE_ZA_OFFSET, SCALABLE_ZT0_OFFSET};
|
||||
use crate::{
|
||||
TargetCpu,
|
||||
aarch64::{
|
||||
Register,
|
||||
scalable::{VECTOR_CHUNK_BYTES, VectorLength},
|
||||
sme::memory::{Direction, Offset, Operand},
|
||||
},
|
||||
x86_64::isa::SimdOpcode as Host,
|
||||
};
|
||||
|
||||
const ZA_PACKED_PREDICATE_BYTES: usize = size_of::<u64>();
|
||||
const ZA_LEA_R9_RSP_DISP32: &[u8] = &[0x4c, 0x8d, 0x8c, 0x24];
|
||||
const ZA_ADD_R8_IMM32: &[u8] = &[0x49, 0x81, 0xc0];
|
||||
const ZA_ADD_R9_IMM8: &[u8] = &[0x49, 0x83, 0xc1];
|
||||
const ZA_MOV_ECX_IMM32: &[u8] = &[0xb9];
|
||||
const ZA_DEC_ECX: &[u8] = &[0xff, 0xc9];
|
||||
const ZA_JNZ_REL32: &[u8] = &[0x0f, 0x85];
|
||||
const ZA_LOAD_BYTE_R9: &[u8] = &[0x41, 0x0f, 0xb6, 0x01];
|
||||
const ZA_LOAD_HALFWORD_R9: &[u8] = &[0x41, 0x0f, 0xb7, 0x01];
|
||||
const ZA_LOAD_WORD_R9: &[u8] = &[0x41, 0x8b, 0x01];
|
||||
const ZA_LOAD_DOUBLEWORD_R9: &[u8] = &[0x49, 0x8b, 0x01];
|
||||
const ZA_STORE_BYTE_R9: &[u8] = &[0x41, 0x88, 0x01];
|
||||
const ZA_STORE_HALFWORD_R9: &[u8] = &[0x66, 0x41, 0x89, 0x01];
|
||||
const ZA_STORE_WORD_R9: &[u8] = &[0x41, 0x89, 0x01];
|
||||
const ZA_STORE_DOUBLEWORD_R9: &[u8] = &[0x49, 0x89, 0x01];
|
||||
const ZA_LOAD_XMM0_R9: &[u8] = &[0xf3, 0x41, 0x0f, 0x6f, 0x01];
|
||||
const ZA_STORE_XMM0_R9: &[u8] = &[0xf3, 0x41, 0x0f, 0x7f, 0x01];
|
||||
const ZA_ADD_EAX_IMM32: &[u8] = &[0x05];
|
||||
const ZA_AND_EAX_IMM32: &[u8] = &[0x25];
|
||||
const ZA_ADD_R8_RAX: &[u8] = &[0x49, 0x01, 0xc0];
|
||||
const ZA_ADD_RAX_RSP_DISP32: &[u8] = &[0x48, 0x03, 0x84, 0x24];
|
||||
const ZA_LOAD_BYTE_R8_DISP32: &[u8] = &[0x41, 0x0f, 0xb6, 0x80];
|
||||
const ZA_LOAD_HALFWORD_R8_DISP32: &[u8] = &[0x41, 0x0f, 0xb7, 0x80];
|
||||
const ZA_LOAD_WORD_R8_DISP32: &[u8] = &[0x41, 0x8b, 0x80];
|
||||
const ZA_LOAD_DOUBLEWORD_R8_DISP32: &[u8] = &[0x49, 0x8b, 0x80];
|
||||
const ZA_STORE_BYTE_R8_DISP32: &[u8] = &[0x41, 0x88, 0x80];
|
||||
const ZA_STORE_HALFWORD_R8_DISP32: &[u8] = &[0x66, 0x41, 0x89, 0x80];
|
||||
const ZA_STORE_WORD_R8_DISP32: &[u8] = &[0x41, 0x89, 0x80];
|
||||
const ZA_STORE_DOUBLEWORD_R8_DISP32: &[u8] = &[0x49, 0x89, 0x80];
|
||||
|
||||
fn za_add_rax(code: &mut Vec<u8>, immediate: usize) {
|
||||
if immediate != 0 {
|
||||
code.extend(ADD_RAX_IMM32);
|
||||
code.extend(
|
||||
u32::try_from(immediate)
|
||||
.expect("ZA offset fits imm32")
|
||||
.to_le_bytes(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn za_shift_rax(code: &mut Vec<u8>, shift: u32) {
|
||||
if shift != 0 {
|
||||
code.extend(SHL_RAX_IMM8);
|
||||
code.push(shift as u8);
|
||||
}
|
||||
}
|
||||
|
||||
fn za_selector(code: &mut Vec<u8>, register: u8, offset: u8, count: usize, scale: usize) {
|
||||
debug_assert!(count.is_power_of_two() && scale.is_power_of_two());
|
||||
load_guest(code, Register::X(register));
|
||||
// Addition modulo32 is equivalent before the power-of-two slice modulus.
|
||||
if offset != 0 {
|
||||
code.extend(ZA_ADD_EAX_IMM32);
|
||||
code.extend(u32::from(offset).to_le_bytes());
|
||||
}
|
||||
code.extend(ZA_AND_EAX_IMM32);
|
||||
code.extend(
|
||||
u32::try_from(count - 1)
|
||||
.expect("ZA selector mask fits u32")
|
||||
.to_le_bytes(),
|
||||
);
|
||||
za_shift_rax(code, scale.trailing_zeros());
|
||||
}
|
||||
|
||||
fn za_selected_pointer(code: &mut Vec<u8>, field: u32, selector: Option<u32>) {
|
||||
if field == SCALABLE_ZA_OFFSET {
|
||||
crate::x86_64::scalable_matrix::load_za_pointer_r8(code);
|
||||
} else {
|
||||
pointer(code, field);
|
||||
}
|
||||
if let Some(offset) = selector {
|
||||
stack_load(code, offset);
|
||||
code.extend(ZA_ADD_R8_RAX);
|
||||
}
|
||||
}
|
||||
|
||||
fn za_scalar_memory(code: &mut Vec<u8>, load: bool, bytes: usize, offset: u32) {
|
||||
let encoding = match (load, bytes) {
|
||||
(true, 1) => ZA_LOAD_BYTE_R8_DISP32,
|
||||
(true, 2) => ZA_LOAD_HALFWORD_R8_DISP32,
|
||||
(true, 4) => ZA_LOAD_WORD_R8_DISP32,
|
||||
(true, 8) => ZA_LOAD_DOUBLEWORD_R8_DISP32,
|
||||
(false, 1) => ZA_STORE_BYTE_R8_DISP32,
|
||||
(false, 2) => ZA_STORE_HALFWORD_R8_DISP32,
|
||||
(false, 4) => ZA_STORE_WORD_R8_DISP32,
|
||||
(false, 8) => ZA_STORE_DOUBLEWORD_R8_DISP32,
|
||||
_ => unreachable!("ZA scalar transfers require 1,2,4 or8 bytes"),
|
||||
};
|
||||
code.extend(encoding);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
// Copy one internal-state chunk to/from staging; no guest RAM is accessed here.
|
||||
fn za_copy_chunk(
|
||||
code: &mut Vec<u8>,
|
||||
to_staging: bool,
|
||||
bank_offset: usize,
|
||||
data_offset: u32,
|
||||
target: TargetCpu,
|
||||
) {
|
||||
let bank_offset = u32::try_from(bank_offset).expect("ZA bank offset fits disp32");
|
||||
if to_staging {
|
||||
crate::x86_64::scalable_matrix::load_za_chunk_at_r8(code, VALUE_XMM, bank_offset, target);
|
||||
stack_vector(code, false, VALUE_XMM, data_offset, target);
|
||||
} else {
|
||||
stack_vector(code, true, VALUE_XMM, data_offset, target);
|
||||
crate::x86_64::scalable_matrix::store_za_chunk_at_r8(code, VALUE_XMM, bank_offset, target);
|
||||
}
|
||||
}
|
||||
|
||||
fn za_copy_bank(
|
||||
code: &mut Vec<u8>,
|
||||
to_staging: bool,
|
||||
field: u32,
|
||||
selector: Option<u32>,
|
||||
bytes: usize,
|
||||
data: u32,
|
||||
target: TargetCpu,
|
||||
) {
|
||||
za_selected_pointer(code, field, selector);
|
||||
for chunk in (0..bytes).step_by(VECTOR_CHUNK_BYTES) {
|
||||
za_copy_chunk(code, to_staging, chunk, data + chunk as u32, target);
|
||||
}
|
||||
}
|
||||
|
||||
fn za_staging_pointer_scalar(code: &mut Vec<u8>, load: bool, bytes: usize) {
|
||||
code.extend(match (load, bytes) {
|
||||
(true, 1) => ZA_LOAD_BYTE_R9,
|
||||
(true, 2) => ZA_LOAD_HALFWORD_R9,
|
||||
(true, 4) => ZA_LOAD_WORD_R9,
|
||||
(true, 8) => ZA_LOAD_DOUBLEWORD_R9,
|
||||
(false, 1) => ZA_STORE_BYTE_R9,
|
||||
(false, 2) => ZA_STORE_HALFWORD_R9,
|
||||
(false, 4) => ZA_STORE_WORD_R9,
|
||||
(false, 8) => ZA_STORE_DOUBLEWORD_R9,
|
||||
_ => unreachable!("ZA scalar transfers require 1,2,4 or8 bytes"),
|
||||
});
|
||||
}
|
||||
|
||||
fn za_copy_tile(
|
||||
code: &mut Vec<u8>,
|
||||
to_staging: bool,
|
||||
transfer: &TileTransfer,
|
||||
length: VectorLength,
|
||||
scratch: &Scratch,
|
||||
target: TargetCpu,
|
||||
) {
|
||||
let bytes = length.bytes();
|
||||
if !transfer.vertical {
|
||||
za_copy_bank(
|
||||
code,
|
||||
to_staging,
|
||||
SCALABLE_ZA_OFFSET,
|
||||
Some(scratch.selector),
|
||||
bytes,
|
||||
scratch.data,
|
||||
target,
|
||||
);
|
||||
return;
|
||||
}
|
||||
let element = transfer.element.bytes();
|
||||
// R8 advances through compact ZA rows; R9 advances through private staging.
|
||||
// There are no callbacks within this bounded internal-state copy loop.
|
||||
za_selected_pointer(code, SCALABLE_ZA_OFFSET, Some(scratch.selector));
|
||||
if transfer.tile != 0 {
|
||||
code.extend(ZA_ADD_R8_IMM32);
|
||||
code.extend((u32::from(transfer.tile) * bytes as u32).to_le_bytes());
|
||||
}
|
||||
code.extend(ZA_LEA_R9_RSP_DISP32);
|
||||
code.extend(scratch.data.to_le_bytes());
|
||||
code.extend(ZA_MOV_ECX_IMM32);
|
||||
code.extend(
|
||||
u32::try_from(bytes / element)
|
||||
.expect("ZA lane count fits u32")
|
||||
.to_le_bytes(),
|
||||
);
|
||||
let loop_start = code.len();
|
||||
if element == VECTOR_CHUNK_BYTES {
|
||||
if to_staging {
|
||||
crate::x86_64::scalable_matrix::load_za_chunk_at_r8(code, 0, 0, target);
|
||||
code.extend(ZA_STORE_XMM0_R9);
|
||||
} else {
|
||||
code.extend(ZA_LOAD_XMM0_R9);
|
||||
crate::x86_64::scalable_matrix::store_za_chunk_at_r8(code, 0, 0, target);
|
||||
}
|
||||
} else if to_staging {
|
||||
za_scalar_memory(code, true, element, 0);
|
||||
za_staging_pointer_scalar(code, false, element);
|
||||
} else {
|
||||
za_staging_pointer_scalar(code, true, element);
|
||||
za_scalar_memory(code, false, element, 0);
|
||||
}
|
||||
code.extend(ZA_ADD_R8_IMM32);
|
||||
code.extend(
|
||||
u32::try_from(element * bytes)
|
||||
.expect("ZA row stride fits u32")
|
||||
.to_le_bytes(),
|
||||
);
|
||||
code.extend(ZA_ADD_R9_IMM8);
|
||||
code.push(element as u8);
|
||||
code.extend(ZA_DEC_ECX);
|
||||
code.extend(ZA_JNZ_REL32);
|
||||
let displacement = code.len();
|
||||
code.extend(0_i32.to_le_bytes());
|
||||
crate::x86_64::scalable::memory::patch_branch(code, displacement, loop_start);
|
||||
}
|
||||
|
||||
pub(super) fn access_flags(direction: Direction, tag_checked: bool) -> u32 {
|
||||
use crate::context::memory::flags;
|
||||
flags::SME
|
||||
| if tag_checked { flags::TAG_CHECKED } else { 0 }
|
||||
| if direction == Direction::Store {
|
||||
flags::WRITE
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
fn za_tile_body(
|
||||
code: &mut Vec<u8>,
|
||||
transfer: &TileTransfer,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
scratch: &Scratch,
|
||||
failures: &mut Vec<usize>,
|
||||
) {
|
||||
check_sp(code, transfer.address.base, pc, failures);
|
||||
let bytes = length.bytes();
|
||||
let element = transfer.element.bytes();
|
||||
let selector_scale = if transfer.vertical {
|
||||
element
|
||||
} else {
|
||||
element * bytes
|
||||
};
|
||||
za_selector(
|
||||
code,
|
||||
transfer.slice_register,
|
||||
transfer.slice_offset,
|
||||
bytes / element,
|
||||
selector_scale,
|
||||
);
|
||||
if !transfer.vertical {
|
||||
za_add_rax(code, usize::from(transfer.tile) * bytes);
|
||||
}
|
||||
stack_store(code, scratch.selector);
|
||||
let Offset::Register(offset) = transfer.address.offset else {
|
||||
unreachable!("tile address is scalar plus scalar")
|
||||
};
|
||||
load_guest(code, offset);
|
||||
za_shift_rax(code, element.trailing_zeros());
|
||||
stack_store(code, scratch.address);
|
||||
load_guest(code, transfer.address.base);
|
||||
code.extend(ZA_ADD_RAX_RSP_DISP32);
|
||||
code.extend(scratch.address.to_le_bytes());
|
||||
stack_store(code, scratch.address);
|
||||
let loading = transfer.direction == Direction::Load;
|
||||
if loading {
|
||||
Host::Xor.register(code, VALUE_XMM, VALUE_XMM, target);
|
||||
for chunk in (0..bytes).step_by(VECTOR_CHUNK_BYTES) {
|
||||
stack_vector(code, false, 0, scratch.data + chunk as u32, target);
|
||||
}
|
||||
} else {
|
||||
za_copy_tile(code, true, transfer, length, scratch, target);
|
||||
}
|
||||
for chunk in 0..length.predicate_bytes().div_ceil(ZA_PACKED_PREDICATE_BYTES) {
|
||||
crate::x86_64::scalable::read_predicate_chunk(code, transfer.predicate, chunk, length);
|
||||
stack_store(
|
||||
code,
|
||||
scratch.predicate + (chunk * ZA_PACKED_PREDICATE_BYTES) as u32,
|
||||
);
|
||||
}
|
||||
stack_load(code, scratch.address);
|
||||
transfer_loop(
|
||||
code,
|
||||
Transfer {
|
||||
bytes: bytes as u32,
|
||||
element_bytes: element as u32,
|
||||
flags: access_flags(transfer.direction, true),
|
||||
predicated: true,
|
||||
},
|
||||
pc,
|
||||
scratch,
|
||||
failures,
|
||||
);
|
||||
if loading {
|
||||
za_copy_tile(code, false, transfer, length, scratch, target);
|
||||
}
|
||||
}
|
||||
|
||||
fn za_whole_body(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &Operand,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
scratch: &Scratch,
|
||||
failures: &mut Vec<usize>,
|
||||
) {
|
||||
let (direction, base, vector) = match operand {
|
||||
Operand::ZaVector(transfer) => (
|
||||
transfer.direction,
|
||||
transfer.base,
|
||||
Some((transfer.vector_register, transfer.offset)),
|
||||
),
|
||||
Operand::Zt(transfer) => (transfer.direction, transfer.base, None),
|
||||
_ => unreachable!("whole transfer requires ZA vector or ZT operand"),
|
||||
};
|
||||
check_sp(code, base, pc, failures);
|
||||
let (field, bytes, selector) = if let Some((register, offset)) = vector {
|
||||
za_selector(code, register, offset, length.bytes(), length.bytes());
|
||||
stack_store(code, scratch.selector);
|
||||
(SCALABLE_ZA_OFFSET, length.bytes(), Some(scratch.selector))
|
||||
} else {
|
||||
(SCALABLE_ZT0_OFFSET, ZT_BYTES, None)
|
||||
};
|
||||
load_guest(code, base);
|
||||
if let Some((_, offset)) = vector {
|
||||
za_add_rax(code, usize::from(offset) * length.bytes());
|
||||
}
|
||||
stack_store(code, scratch.address);
|
||||
let loading = direction == Direction::Load;
|
||||
if !loading {
|
||||
za_copy_bank(code, true, field, selector, bytes, scratch.data, target);
|
||||
}
|
||||
stack_load(code, scratch.address);
|
||||
transfer_loop(
|
||||
code,
|
||||
Transfer {
|
||||
bytes: bytes as u32,
|
||||
element_bytes: 1,
|
||||
flags: access_flags(direction, base != Register::Sp),
|
||||
predicated: false,
|
||||
},
|
||||
pc,
|
||||
scratch,
|
||||
failures,
|
||||
);
|
||||
if loading {
|
||||
za_copy_bank(code, false, field, selector, bytes, scratch.data, target);
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn emit_za_body(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &Operand,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
scratch: &Scratch,
|
||||
failures: &mut Vec<usize>,
|
||||
) {
|
||||
match operand {
|
||||
Operand::Tile(transfer) => {
|
||||
za_tile_body(code, transfer, length, target, pc, scratch, failures)
|
||||
}
|
||||
Operand::ZaVector(_) | Operand::Zt(_) => {
|
||||
za_whole_body(code, operand, length, target, pc, scratch, failures)
|
||||
}
|
||||
Operand::Vectors(_) => unreachable!("vector group body is parent-owned"),
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,11 @@ pub(crate) mod integer_logic;
|
||||
pub(crate) mod integer_predicate_move;
|
||||
pub(crate) mod integer_products;
|
||||
pub(crate) mod integer_saturation;
|
||||
pub(crate) mod memory;
|
||||
pub(crate) mod memory_load;
|
||||
pub(crate) mod memory_multi;
|
||||
pub(crate) mod memory_store;
|
||||
pub(crate) mod memory_structure;
|
||||
pub(crate) mod predicate;
|
||||
pub(crate) mod predicate_generation;
|
||||
pub(crate) mod predicate_logic;
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
//! Shared address and fault-exit lowering for streaming SVE memory families.
|
||||
|
||||
use super::super::{load, scalable::memory as service};
|
||||
use crate::aarch64::{
|
||||
Register,
|
||||
scalable::VectorLength,
|
||||
sve::memory::{Address, Offset, Scale},
|
||||
};
|
||||
use crate::context::memory::MemoryStatus;
|
||||
|
||||
const ADD_RAX_IMM8: &[u8] = &[0x48, 0x83, 0xc0];
|
||||
const ADD_RAX_IMM32: &[u8] = &[0x48, 0x05];
|
||||
const SHIFT_RAX_LEFT_IMM8: &[u8] = &[0x48, 0xc1, 0xe0];
|
||||
const MOV_RCX_RAX: &[u8] = &[0x48, 0x89, 0xc1];
|
||||
const ADD_RAX_RCX: &[u8] = &[0x48, 0x01, 0xc8];
|
||||
const TEST_AL_IMM8: u8 = 0xa8;
|
||||
const JE_REL32: &[u8] = &[0x0f, 0x84];
|
||||
const JMP_REL32: u8 = 0xe9;
|
||||
const TEST_EAX_EAX: &[u8] = &[0x85, 0xc0];
|
||||
const JE_REL8: u8 = 0x74;
|
||||
const RET: u8 = 0xc3;
|
||||
const RET_BYTES: u8 = 1;
|
||||
const STACK_ALIGNMENT_BYTES: u8 = 16;
|
||||
const STACK_ALIGNMENT_MASK: u8 = STACK_ALIGNMENT_BYTES - 1;
|
||||
|
||||
fn scale_bytes(scale: Scale, length: VectorLength) -> usize {
|
||||
match scale {
|
||||
Scale::Bytes => 1,
|
||||
Scale::PredicateBytes => length.predicate_bytes(),
|
||||
Scale::VectorBytes { multiply, divide } => {
|
||||
assert!(
|
||||
multiply != 0 && divide != 0,
|
||||
"allocated vector scale is nonzero"
|
||||
);
|
||||
let bytes = length.bytes() * usize::from(multiply);
|
||||
assert_eq!(
|
||||
bytes % usize::from(divide),
|
||||
0,
|
||||
"vector scale must be integral"
|
||||
);
|
||||
bytes / usize::from(divide)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Return the effective guest address in RAX, with 64-bit wrapping arithmetic.
|
||||
/// CPA2 is disabled; translation owns TBI handling. Clobbers RCX; RDI/R15 survive.
|
||||
pub(crate) fn address(code: &mut Vec<u8>, operand: Address, length: VectorLength) {
|
||||
match operand.offset {
|
||||
Offset::Immediate { value, scale } => {
|
||||
load(code, operand.base);
|
||||
let displacement = i32::from(value)
|
||||
* i32::try_from(scale_bytes(scale, length)).expect("allocated scale fits i32");
|
||||
if displacement == 0 {
|
||||
return;
|
||||
}
|
||||
if let Ok(short) = i8::try_from(displacement) {
|
||||
code.extend(ADD_RAX_IMM8);
|
||||
code.push(short as u8);
|
||||
} else {
|
||||
code.extend(ADD_RAX_IMM32);
|
||||
code.extend(displacement.to_le_bytes());
|
||||
}
|
||||
}
|
||||
Offset::Register {
|
||||
index: Register::Zero,
|
||||
..
|
||||
} => load(code, operand.base),
|
||||
Offset::Register { index, shift } => {
|
||||
load(code, index);
|
||||
if shift != 0 {
|
||||
code.extend(SHIFT_RAX_LEFT_IMM8);
|
||||
code.push(shift);
|
||||
}
|
||||
code.extend(MOV_RCX_RAX);
|
||||
load(code, operand.base);
|
||||
code.extend(ADD_RAX_RCX);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Check the original SP before applying its instruction displacement.
|
||||
/// Preflight requires effective SA/SA0 enabled; CHECKSPNONEACTIVE=true is fixed.
|
||||
/// Prefetch families must not call this helper. Patch its fault site to the
|
||||
/// family's scratch cleanup; the memory view retains the alignment fault.
|
||||
pub(crate) fn check_sp(code: &mut Vec<u8>, base: Register, pc: u64) -> Option<usize> {
|
||||
if base != Register::Sp {
|
||||
return None;
|
||||
}
|
||||
load(code, Register::Sp);
|
||||
code.push(TEST_AL_IMM8);
|
||||
code.push(STACK_ALIGNMENT_MASK);
|
||||
code.extend(JE_REL32);
|
||||
let aligned = code.len();
|
||||
code.extend(0_i32.to_le_bytes());
|
||||
service::fault(code, MemoryStatus::StackAlignment, pc);
|
||||
code.push(JMP_REL32);
|
||||
let failed = code.len();
|
||||
code.extend(0_i32.to_le_bytes());
|
||||
let destination = code.len();
|
||||
service::patch_branch(code, aligned, destination);
|
||||
Some(failed)
|
||||
}
|
||||
|
||||
/// After family scratch cleanup, return a failed inner body to its outer entry.
|
||||
/// The outer entry CALLs the body and owns POP_R15; this RET cannot bypass it.
|
||||
/// Success (EAX=0) falls through to the next translated guest instruction.
|
||||
pub(crate) fn return_if_failed(code: &mut Vec<u8>) {
|
||||
code.extend(TEST_EAX_EAX);
|
||||
code.push(JE_REL8);
|
||||
code.push(RET_BYTES);
|
||||
code.push(RET);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn declared_lengths_keep_every_allocated_address_scale_integral() {
|
||||
for bytes in [16, 32, 64, 128, 256] {
|
||||
let length = VectorLength::from_bytes(bytes).unwrap();
|
||||
for memory in [1, 2, 4, 8, 16] {
|
||||
for element in [1, 2, 4, 8, 16] {
|
||||
let scale = Scale::VectorBytes {
|
||||
multiply: memory,
|
||||
divide: element,
|
||||
};
|
||||
assert_eq!(
|
||||
scale_bytes(scale, length) * usize::from(element),
|
||||
bytes * usize::from(memory)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,469 @@
|
||||
//! Callback candidate for SVE loads with a private, fault-atomic destination.
|
||||
//!
|
||||
//! Guest RAM is accessed only through the versioned memory service. Its exact
|
||||
//! element decomposition and writer-domain participation are runtime-owned.
|
||||
use super::super::{isa::SimdOpcode as Host, scalable};
|
||||
use crate::{
|
||||
TargetCpu,
|
||||
aarch64::{
|
||||
Register,
|
||||
scalable::{ElementSize, VECTOR_CHUNK_BYTES, VectorLength},
|
||||
sve::{
|
||||
memory::Extension,
|
||||
memory_load::{Kind, Operand},
|
||||
},
|
||||
},
|
||||
context::memory::{
|
||||
MEMORY_REQUEST_BYTES, MemoryRequirements, SpAlignmentRequirement, flags, host_caps,
|
||||
profile_requirements,
|
||||
},
|
||||
};
|
||||
|
||||
const STACK_ALIGNMENT: u32 = 16;
|
||||
const QWORD_BYTES: u32 = size_of::<u64>() as u32;
|
||||
const PREDICATE_WORD_BITS: usize = u64::BITS as usize;
|
||||
const SUB_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xec];
|
||||
const ADD_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xc4];
|
||||
const ADD_RAX_IMM32: &[u8] = &[0x48, 0x05];
|
||||
const MOV_RAX_RSP_DISP32: &[u8] = &[0x48, 0x8b, 0x84, 0x24];
|
||||
const MOV_EAX_RSP_DISP32: &[u8] = &[0x8b, 0x84, 0x24];
|
||||
const MOVZX_EAX_BYTE_RSP_DISP32: &[u8] = &[0x0f, 0xb6, 0x84, 0x24];
|
||||
const MOVZX_EAX_WORD_RSP_DISP32: &[u8] = &[0x0f, 0xb7, 0x84, 0x24];
|
||||
const MOVSX_RAX_BYTE_RSP_DISP32: &[u8] = &[0x48, 0x0f, 0xbe, 0x84, 0x24];
|
||||
const MOVSX_RAX_WORD_RSP_DISP32: &[u8] = &[0x48, 0x0f, 0xbf, 0x84, 0x24];
|
||||
const MOVSXD_RAX_RSP_DISP32: &[u8] = &[0x48, 0x63, 0x84, 0x24];
|
||||
const MOV_RSP_DISP32_RAX: &[u8] = &[0x48, 0x89, 0x84, 0x24];
|
||||
const MOV_RSP_DISP32_EAX: &[u8] = &[0x89, 0x84, 0x24];
|
||||
const MOV_RSP_DISP32_AX: &[u8] = &[0x66, 0x89, 0x84, 0x24];
|
||||
const MOV_RSP_DISP32_AL: &[u8] = &[0x88, 0x84, 0x24];
|
||||
const MOVDQU_RSP_DISP32_XMM0: &[u8] = &[0xf3, 0x0f, 0x7f, 0x84, 0x24];
|
||||
const MOVDQU_RSP_DISP32_XMM3: &[u8] = &[0xf3, 0x0f, 0x7f, 0x9c, 0x24];
|
||||
const SIMD_MODRM_REGISTER: u8 = 0xc0;
|
||||
const REPEAT_LOW_DWORD: u8 = 0;
|
||||
const MOVDQU_XMM0_RSP_DISP32: &[u8] = &[0xf3, 0x0f, 0x6f, 0x84, 0x24];
|
||||
const PXOR_XMM0_XMM0: &[u8] = &[0x66, 0x0f, 0xef, 0xc0];
|
||||
const BT_RAX_IMM8: &[u8] = &[0x48, 0x0f, 0xba, 0xe0];
|
||||
const TEST_RAX_RAX: &[u8] = &[0x48, 0x85, 0xc0];
|
||||
const MOVABS_RCX_IMM64: &[u8] = &[0x48, 0xb9];
|
||||
const AND_RAX_RCX: &[u8] = &[0x48, 0x21, 0xc8];
|
||||
const JNZ_REL32: &[u8] = &[0x0f, 0x85];
|
||||
const JNC_REL32: &[u8] = &[0x0f, 0x83];
|
||||
const JMP_REL32: &[u8] = &[0xe9];
|
||||
const XOR_EAX_EAX: &[u8] = &[0x31, 0xc0];
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
struct Scratch {
|
||||
predicate: u32,
|
||||
address: u32,
|
||||
scalar: u32,
|
||||
request: u32,
|
||||
bytes: u32,
|
||||
}
|
||||
|
||||
impl Scratch {
|
||||
fn new(length: VectorLength) -> Self {
|
||||
let predicate = length.bytes() as u32;
|
||||
let predicate_bytes =
|
||||
(length.predicate_bytes() as u32).div_ceil(STACK_ALIGNMENT) * STACK_ALIGNMENT;
|
||||
let address = predicate + predicate_bytes;
|
||||
let scalar = address + QWORD_BYTES;
|
||||
let request = scalar + QWORD_BYTES;
|
||||
Self {
|
||||
predicate,
|
||||
address,
|
||||
scalar,
|
||||
request,
|
||||
bytes: request + MEMORY_REQUEST_BYTES as u32,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn displacement(code: &mut Vec<u8>, opcode: &[u8], offset: u32) {
|
||||
code.extend(opcode);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn branch(code: &mut Vec<u8>, opcode: &[u8]) -> usize {
|
||||
code.extend(opcode);
|
||||
let position = code.len();
|
||||
code.extend(0_i32.to_le_bytes());
|
||||
position
|
||||
}
|
||||
|
||||
fn add_immediate(code: &mut Vec<u8>, value: i32) {
|
||||
if value != 0 {
|
||||
code.extend(ADD_RAX_IMM32);
|
||||
code.extend(value.to_le_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
fn predicate(code: &mut Vec<u8>, operand: Operand, length: VectorLength, scratch: Scratch) {
|
||||
if let Some(predicate) = operand.predicate {
|
||||
for word in 0..length.predicate_bytes().div_ceil(QWORD_BYTES as usize) {
|
||||
scalable::read_predicate_chunk(code, predicate, word, length);
|
||||
displacement(
|
||||
code,
|
||||
MOV_RSP_DISP32_RAX,
|
||||
scratch.predicate + word as u32 * QWORD_BYTES,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn inactive_branch(code: &mut Vec<u8>, bit: usize, scratch: Scratch) -> usize {
|
||||
let word = bit / PREDICATE_WORD_BITS;
|
||||
displacement(
|
||||
code,
|
||||
MOV_RAX_RSP_DISP32,
|
||||
scratch.predicate + word as u32 * QWORD_BYTES,
|
||||
);
|
||||
code.extend(BT_RAX_IMM8);
|
||||
code.push((bit % PREDICATE_WORD_BITS) as u8);
|
||||
branch(code, JNC_REL32)
|
||||
}
|
||||
|
||||
fn access_flags(operand: Operand) -> u32 {
|
||||
(if operand.tag_checked {
|
||||
flags::TAG_CHECKED
|
||||
} else {
|
||||
0
|
||||
}) | (if operand.non_temporal {
|
||||
flags::NON_TEMPORAL
|
||||
} else {
|
||||
0
|
||||
}) | (if operand.predicate.is_some() {
|
||||
flags::SVE_PREDICATED
|
||||
} else {
|
||||
0
|
||||
})
|
||||
}
|
||||
|
||||
/// Requirements for the complete consumed artifact, validated before entry.
|
||||
/// Original SP16 plus encoded element-scaled offsets makes SP-base elements
|
||||
/// naturally aligned; unconstrained multibyte GPR-base reads may cross8 inside16.
|
||||
pub(crate) fn requirements(operand: Operand) -> MemoryRequirements {
|
||||
MemoryRequirements {
|
||||
required_sp_alignment: if operand.address.base == Register::Sp {
|
||||
SpAlignmentRequirement::Enabled
|
||||
} else {
|
||||
SpAlignmentRequirement::Any
|
||||
},
|
||||
required_flags: access_flags(operand),
|
||||
required_host_caps: if operand.memory_element != ElementSize::Byte
|
||||
&& operand.address.base != Register::Sp
|
||||
{
|
||||
host_caps::ATOMIC_LOAD16
|
||||
} else {
|
||||
0
|
||||
},
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| if operand.tag_checked {
|
||||
profile_requirements::TAG_GRANULES | profile_requirements::SCALABLE_TAG_CHECKS
|
||||
} else {
|
||||
0
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
fn request(
|
||||
code: &mut Vec<u8>,
|
||||
operand: Operand,
|
||||
scratch: Scratch,
|
||||
source_offset: usize,
|
||||
destination_offset: u32,
|
||||
pc: u64,
|
||||
failed: &mut Vec<usize>,
|
||||
) {
|
||||
displacement(code, MOV_RAX_RSP_DISP32, scratch.address);
|
||||
add_immediate(code, source_offset as i32);
|
||||
scalable::memory::request(
|
||||
code,
|
||||
scratch.request,
|
||||
destination_offset,
|
||||
operand.memory_element.bytes() as u32,
|
||||
access_flags(operand),
|
||||
pc,
|
||||
);
|
||||
scalable::memory::call(code, scratch.request);
|
||||
failed.push(scalable::memory::branch_failed(code));
|
||||
}
|
||||
|
||||
fn read_value(code: &mut Vec<u8>, source: u32, element: ElementSize, extension: Extension) {
|
||||
let opcode = match (element, extension) {
|
||||
(ElementSize::Byte, Extension::Zero) => MOVZX_EAX_BYTE_RSP_DISP32,
|
||||
(ElementSize::Halfword, Extension::Zero) => MOVZX_EAX_WORD_RSP_DISP32,
|
||||
(ElementSize::Word, Extension::Zero) => MOV_EAX_RSP_DISP32,
|
||||
(ElementSize::Byte, Extension::Sign) => MOVSX_RAX_BYTE_RSP_DISP32,
|
||||
(ElementSize::Halfword, Extension::Sign) => MOVSX_RAX_WORD_RSP_DISP32,
|
||||
(ElementSize::Word, Extension::Sign) => MOVSXD_RAX_RSP_DISP32,
|
||||
(ElementSize::Doubleword, _) => MOV_RAX_RSP_DISP32,
|
||||
(ElementSize::Quadword, _) => unreachable!("SVE load scalar element is at most64 bits"),
|
||||
};
|
||||
displacement(code, opcode, source);
|
||||
}
|
||||
|
||||
fn write_value(code: &mut Vec<u8>, destination: u32, element: ElementSize) {
|
||||
let opcode = match element {
|
||||
ElementSize::Byte => MOV_RSP_DISP32_AL,
|
||||
ElementSize::Halfword => MOV_RSP_DISP32_AX,
|
||||
ElementSize::Word => MOV_RSP_DISP32_EAX,
|
||||
ElementSize::Doubleword => MOV_RSP_DISP32_RAX,
|
||||
ElementSize::Quadword => unreachable!("SVE load scalar element is at most64 bits"),
|
||||
};
|
||||
displacement(code, opcode, destination);
|
||||
}
|
||||
|
||||
fn lanes(
|
||||
code: &mut Vec<u8>,
|
||||
operand: Operand,
|
||||
length: VectorLength,
|
||||
scratch: Scratch,
|
||||
pc: u64,
|
||||
failed: &mut Vec<usize>,
|
||||
) {
|
||||
let bytes = if operand.kind == Kind::ReplicateQuad {
|
||||
VECTOR_CHUNK_BYTES
|
||||
} else {
|
||||
length.bytes()
|
||||
};
|
||||
for lane in 0..bytes / operand.element.bytes() {
|
||||
let destination = (lane * operand.element.bytes()) as u32;
|
||||
let inactive = inactive_branch(code, lane * operand.element.bytes(), scratch);
|
||||
request(
|
||||
code,
|
||||
operand,
|
||||
scratch,
|
||||
lane * operand.memory_element.bytes(),
|
||||
destination,
|
||||
pc,
|
||||
failed,
|
||||
);
|
||||
if operand.extension == Extension::Sign {
|
||||
read_value(code, destination, operand.memory_element, operand.extension);
|
||||
write_value(code, destination, operand.element);
|
||||
}
|
||||
let end = code.len();
|
||||
scalable::memory::patch_branch(code, inactive, end);
|
||||
}
|
||||
}
|
||||
|
||||
fn scalar_replicate(
|
||||
code: &mut Vec<u8>,
|
||||
operand: Operand,
|
||||
length: VectorLength,
|
||||
scratch: Scratch,
|
||||
pc: u64,
|
||||
failed: &mut Vec<usize>,
|
||||
target: TargetCpu,
|
||||
) {
|
||||
let mut active = Vec::new();
|
||||
for word in 0..length.predicate_bytes().div_ceil(QWORD_BYTES as usize) {
|
||||
displacement(
|
||||
code,
|
||||
MOV_RAX_RSP_DISP32,
|
||||
scratch.predicate + word as u32 * QWORD_BYTES,
|
||||
);
|
||||
let first_bit = word * PREDICATE_WORD_BITS;
|
||||
let valid_bits = (length.bytes() - first_bit).min(PREDICATE_WORD_BITS);
|
||||
let mask = (0..valid_bits)
|
||||
.step_by(operand.element.bytes())
|
||||
.fold(0_u64, |mask, bit| mask | 1_u64 << bit);
|
||||
if mask != u64::MAX {
|
||||
code.extend(MOVABS_RCX_IMM64);
|
||||
code.extend(mask.to_le_bytes());
|
||||
code.extend(AND_RAX_RCX);
|
||||
}
|
||||
code.extend(TEST_RAX_RAX);
|
||||
active.push(branch(code, JNZ_REL32));
|
||||
}
|
||||
let empty = branch(code, JMP_REL32);
|
||||
let start = code.len();
|
||||
for active in active {
|
||||
scalable::memory::patch_branch(code, active, start);
|
||||
}
|
||||
request(code, operand, scratch, 0, scratch.scalar, pc, failed);
|
||||
read_value(
|
||||
code,
|
||||
scratch.scalar,
|
||||
operand.memory_element,
|
||||
operand.extension,
|
||||
);
|
||||
Host::MoveGprQword.append(code, target);
|
||||
code.push(SIMD_MODRM_REGISTER);
|
||||
match operand.element {
|
||||
ElementSize::Byte => {
|
||||
Host::UnpackLowByte.register(code, 0, 0, target);
|
||||
Host::UnpackLowWord.register(code, 0, 0, target);
|
||||
Host::ShuffleDword.register(code, 0, 0, target);
|
||||
code.push(REPEAT_LOW_DWORD);
|
||||
}
|
||||
ElementSize::Halfword => {
|
||||
Host::UnpackLowWord.register(code, 0, 0, target);
|
||||
Host::ShuffleDword.register(code, 0, 0, target);
|
||||
code.push(REPEAT_LOW_DWORD);
|
||||
}
|
||||
ElementSize::Word => {
|
||||
Host::ShuffleDword.register(code, 0, 0, target);
|
||||
code.push(REPEAT_LOW_DWORD);
|
||||
}
|
||||
ElementSize::Doubleword => Host::UnpackLowQword.register(code, 0, 0, target),
|
||||
ElementSize::Quadword => unreachable!("scalar replicate element is at most64 bits"),
|
||||
}
|
||||
for chunk in 0..length.chunks() {
|
||||
scalable::read_predicate_mask(
|
||||
code,
|
||||
operand.predicate.expect("replicate is predicated"),
|
||||
chunk,
|
||||
operand.element,
|
||||
1,
|
||||
2,
|
||||
length,
|
||||
target,
|
||||
);
|
||||
Host::MoveAligned.register(code, 3, 0, target);
|
||||
Host::And.register(code, 3, 1, target);
|
||||
displacement(
|
||||
code,
|
||||
MOVDQU_RSP_DISP32_XMM3,
|
||||
(chunk * VECTOR_CHUNK_BYTES) as u32,
|
||||
);
|
||||
}
|
||||
let end = code.len();
|
||||
scalable::memory::patch_branch(code, empty, end);
|
||||
}
|
||||
|
||||
fn commit(code: &mut Vec<u8>, operand: Operand, length: VectorLength, target: TargetCpu) {
|
||||
if operand.kind == Kind::WholePredicate {
|
||||
for word in 0..length.predicate_bytes().div_ceil(QWORD_BYTES as usize) {
|
||||
displacement(code, MOV_RAX_RSP_DISP32, word as u32 * QWORD_BYTES);
|
||||
scalable::write_predicate_chunk(code, operand.data, word, length);
|
||||
}
|
||||
} else {
|
||||
if operand.kind == Kind::ReplicateQuad {
|
||||
displacement(code, MOVDQU_XMM0_RSP_DISP32, 0);
|
||||
}
|
||||
for chunk in 0..length.chunks() {
|
||||
if operand.kind != Kind::ReplicateQuad {
|
||||
displacement(
|
||||
code,
|
||||
MOVDQU_XMM0_RSP_DISP32,
|
||||
(chunk * VECTOR_CHUNK_BYTES) as u32,
|
||||
);
|
||||
}
|
||||
scalable::store_z_chunk(code, operand.data, chunk, 0, length, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Emit one callback-backed instruction. Failure cleans up before returning
|
||||
/// through the shared inner-body epilogue; success falls through. Both paths
|
||||
/// restore the exact private stack allocation.
|
||||
/// The declared data profile has SCTLR.A=0; original SP alignment remains checked.
|
||||
pub(crate) fn emit(
|
||||
code: &mut Vec<u8>,
|
||||
operand: Operand,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
) {
|
||||
let scratch = Scratch::new(length);
|
||||
displacement(code, SUB_RSP_IMM32, scratch.bytes);
|
||||
scalable::memory::begin(code);
|
||||
let zero_chunks = match operand.kind {
|
||||
Kind::WholeVector | Kind::WholePredicate => 0,
|
||||
Kind::ReplicateQuad => 1,
|
||||
Kind::Contiguous | Kind::ReplicateScalar => length.chunks(),
|
||||
};
|
||||
if zero_chunks != 0 {
|
||||
code.extend(PXOR_XMM0_XMM0);
|
||||
}
|
||||
for chunk in 0..zero_chunks {
|
||||
displacement(
|
||||
code,
|
||||
MOVDQU_RSP_DISP32_XMM0,
|
||||
(chunk * VECTOR_CHUNK_BYTES) as u32,
|
||||
);
|
||||
}
|
||||
predicate(code, operand, length, scratch);
|
||||
let mut failed = Vec::new();
|
||||
if let Some(fault) = super::memory::check_sp(code, operand.address.base, pc) {
|
||||
failed.push(fault);
|
||||
}
|
||||
super::memory::address(code, operand.address, length);
|
||||
displacement(code, MOV_RSP_DISP32_RAX, scratch.address);
|
||||
match operand.kind {
|
||||
Kind::Contiguous | Kind::ReplicateQuad => {
|
||||
lanes(code, operand, length, scratch, pc, &mut failed)
|
||||
}
|
||||
Kind::ReplicateScalar => {
|
||||
scalar_replicate(code, operand, length, scratch, pc, &mut failed, target)
|
||||
}
|
||||
Kind::WholeVector | Kind::WholePredicate => {
|
||||
let bytes = if operand.kind == Kind::WholePredicate {
|
||||
length.predicate_bytes()
|
||||
} else {
|
||||
length.bytes()
|
||||
};
|
||||
for byte in 0..bytes {
|
||||
request(code, operand, scratch, byte, byte as u32, pc, &mut failed);
|
||||
}
|
||||
}
|
||||
}
|
||||
commit(code, operand, length, target);
|
||||
code.extend(XOR_EAX_EAX);
|
||||
let cleanup = code.len();
|
||||
for failed in failed {
|
||||
scalable::memory::patch_branch(code, failed, cleanup);
|
||||
}
|
||||
displacement(code, ADD_RSP_IMM32, scratch.bytes);
|
||||
super::memory::return_if_failed(code);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::aarch64::sve::memory_load;
|
||||
|
||||
const LD1B_Z1_P0_X5: u32 = 0xa400_a0a1;
|
||||
const LD1D_Z1_P0_X5: u32 = 0xa5e0_a0a1;
|
||||
const LD1D_Z1_P0_SP: u32 = 0xa5e0_a3e1;
|
||||
|
||||
fn decoded(word: u32) -> Operand {
|
||||
memory_load::decode(word).unwrap().unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preflight_distinguishes_checked_bytes_generic_reads_and_aligned_sp() {
|
||||
let checked = flags::TAG_CHECKED | flags::SVE_PREDICATED;
|
||||
let checked_profile = profile_requirements::NATIVE_ACCESS
|
||||
| profile_requirements::TAG_GRANULES
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS;
|
||||
assert_eq!(
|
||||
requirements(decoded(LD1B_Z1_P0_X5)),
|
||||
MemoryRequirements {
|
||||
required_sp_alignment: SpAlignmentRequirement::Any,
|
||||
required_flags: checked,
|
||||
required_host_caps: 0,
|
||||
required_profile: checked_profile,
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
requirements(decoded(LD1D_Z1_P0_X5)),
|
||||
MemoryRequirements {
|
||||
required_sp_alignment: SpAlignmentRequirement::Any,
|
||||
required_flags: checked,
|
||||
required_host_caps: host_caps::ATOMIC_LOAD16,
|
||||
required_profile: checked_profile,
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
requirements(decoded(LD1D_Z1_P0_SP)),
|
||||
MemoryRequirements {
|
||||
required_sp_alignment: SpAlignmentRequirement::Enabled,
|
||||
required_flags: flags::SVE_PREDICATED,
|
||||
required_host_caps: 0,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS,
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,378 @@
|
||||
//! Callback candidate for exact reached-element multi-vector memory transfers.
|
||||
//!
|
||||
//! Private staging keeps every load destination unchanged until the complete
|
||||
//! tuple succeeds. Stores submit ascending elements without rolling back RAM.
|
||||
use super::super::{isa::SimdOpcode as Host, scalable};
|
||||
use super::memory as common;
|
||||
use super::predicate::{emit_prepared_counter_chunk, prepare_counter};
|
||||
use crate::{
|
||||
TargetCpu,
|
||||
aarch64::{
|
||||
Register,
|
||||
scalable::{ElementSize, VECTOR_CHUNK_BYTES, VectorLength},
|
||||
sve::memory_multi::Operand,
|
||||
},
|
||||
context::memory::{
|
||||
MEMORY_REQUEST_BYTES, MEMORY_REQUEST_DATA_OFFSET, MemoryRequirements,
|
||||
SpAlignmentRequirement, flags, host_caps, profile_requirements,
|
||||
},
|
||||
};
|
||||
|
||||
const HOST_QWORD_BYTES: u32 = size_of::<u64>() as u32;
|
||||
const STACK_ALIGNMENT: u32 = 16;
|
||||
const PACKED_CHUNK_BITS: usize = u64::BITS as usize;
|
||||
const REQUEST_OFFSET: u32 = 0;
|
||||
const ADDRESS_OFFSET: u32 = MEMORY_REQUEST_BYTES as u32;
|
||||
const INDEX_OFFSET: u32 = ADDRESS_OFFSET + HOST_QWORD_BYTES;
|
||||
const MASK_OFFSET: u32 = INDEX_OFFSET + HOST_QWORD_BYTES;
|
||||
const VECTOR_TEMPORARY: u8 = 0;
|
||||
const SUB_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xec];
|
||||
const ADD_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xc4];
|
||||
const MOV_RSP_DISP32_RAX: &[u8] = &[0x48, 0x89, 0x84, 0x24];
|
||||
const MOV_RAX_RSP_DISP32: &[u8] = &[0x48, 0x8b, 0x84, 0x24];
|
||||
const MOV_RCX_RSP_DISP32: &[u8] = &[0x48, 0x8b, 0x8c, 0x24];
|
||||
const MOV_RSP_DISP32_IMM32: &[u8] = &[0x48, 0xc7, 0x84, 0x24];
|
||||
const ADD_RAX_RCX: &[u8] = &[0x48, 0x01, 0xc8];
|
||||
const BT_RSP_DISP32_RCX: &[u8] = &[0x48, 0x0f, 0xa3, 0x8c, 0x24];
|
||||
const ADD_RSP_DISP32_RCX: &[u8] = &[0x48, 0x01, 0x8c, 0x24];
|
||||
const ADD_RSP_DISP32_IMM8: &[u8] = &[0x48, 0x83, 0x84, 0x24];
|
||||
const CMP_RSP_DISP32_IMM32: &[u8] = &[0x48, 0x81, 0xbc, 0x24];
|
||||
const JNC_REL32: &[u8] = &[0x0f, 0x83];
|
||||
const JB_REL32: &[u8] = &[0x0f, 0x82];
|
||||
const XOR_EAX_EAX: &[u8] = &[0x31, 0xc0];
|
||||
const STACK_MEMORY_MODRM: u8 = 0x84;
|
||||
const STACK_SIB: u8 = 0x24;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
struct Scratch {
|
||||
data: u32,
|
||||
bytes: u32,
|
||||
}
|
||||
|
||||
impl Scratch {
|
||||
fn new(tuple_bytes: usize) -> Self {
|
||||
let mask_bytes = tuple_bytes.div_ceil(PACKED_CHUNK_BITS) as u32 * HOST_QWORD_BYTES;
|
||||
let data = MASK_OFFSET + mask_bytes.next_multiple_of(STACK_ALIGNMENT);
|
||||
Self {
|
||||
data,
|
||||
bytes: data + tuple_bytes as u32,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn stack_vector(code: &mut Vec<u8>, offset: u32, loading: bool, target: TargetCpu) {
|
||||
let opcode = if loading {
|
||||
Host::LoadUnaligned
|
||||
} else {
|
||||
Host::StoreUnaligned
|
||||
};
|
||||
opcode.append(code, target);
|
||||
code.extend([STACK_MEMORY_MODRM, STACK_SIB]);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn branch(code: &mut Vec<u8>, opcode: &[u8]) -> usize {
|
||||
code.extend(opcode);
|
||||
let displacement = code.len();
|
||||
code.extend(0_i32.to_le_bytes());
|
||||
displacement
|
||||
}
|
||||
|
||||
fn prepare_iteration(code: &mut Vec<u8>, operand: &Operand, length: VectorLength) {
|
||||
common::address(code, operand.address, length);
|
||||
code.extend(MOV_RSP_DISP32_RAX);
|
||||
code.extend(ADDRESS_OFFSET.to_le_bytes());
|
||||
code.extend(MOV_RSP_DISP32_IMM32);
|
||||
code.extend(INDEX_OFFSET.to_le_bytes());
|
||||
code.extend(0_u32.to_le_bytes());
|
||||
}
|
||||
|
||||
fn prepare_vector_staging(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &Operand,
|
||||
scratch: Scratch,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
) {
|
||||
if operand.loading {
|
||||
Host::Xor.register(code, VECTOR_TEMPORARY, VECTOR_TEMPORARY, target);
|
||||
}
|
||||
for register in 0..operand.registers {
|
||||
for chunk in 0..length.chunks() {
|
||||
if !operand.loading {
|
||||
scalable::load_z_chunk(
|
||||
code,
|
||||
operand.first + register,
|
||||
chunk,
|
||||
VECTOR_TEMPORARY,
|
||||
length,
|
||||
target,
|
||||
);
|
||||
}
|
||||
let position = usize::from(register) * length.bytes() + chunk * VECTOR_CHUNK_BYTES;
|
||||
stack_vector(code, scratch.data + position as u32, false, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Decode PN once, then spill its packed mask before any memory callback.
|
||||
/// The published chunk helper preserves R8/R9/R10 preparation state. Only
|
||||
/// private-stack stores intervene, so no callback clobber crosses that interval.
|
||||
fn prepare_predicate_staging(code: &mut Vec<u8>, operand: &Operand, length: VectorLength) {
|
||||
let predicate_bits = usize::from(operand.registers) * length.bytes();
|
||||
scalable::read_predicate_chunk(code, operand.predicate, 0, length);
|
||||
prepare_counter(code, length);
|
||||
for chunk in 0..predicate_bits.div_ceil(PACKED_CHUNK_BITS) {
|
||||
emit_prepared_counter_chunk(code, chunk, length);
|
||||
code.extend(MOV_RSP_DISP32_RAX);
|
||||
code.extend((MASK_OFFSET + chunk as u32 * HOST_QWORD_BYTES).to_le_bytes());
|
||||
}
|
||||
}
|
||||
|
||||
fn commit_load(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &Operand,
|
||||
scratch: Scratch,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
) {
|
||||
for register in 0..operand.registers {
|
||||
for chunk in 0..length.chunks() {
|
||||
let position = usize::from(register) * length.bytes() + chunk * VECTOR_CHUNK_BYTES;
|
||||
stack_vector(code, scratch.data + position as u32, true, target);
|
||||
scalable::store_z_chunk(
|
||||
code,
|
||||
operand.first + register,
|
||||
chunk,
|
||||
VECTOR_TEMPORARY,
|
||||
length,
|
||||
target,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn access_flags(operand: &Operand) -> u32 {
|
||||
// These PN-governed forms call the four-argument CreateAccDescSVE overload,
|
||||
// which sets descriptor.predicated=false independently of the PN mask.
|
||||
(if operand.loading { 0 } else { flags::WRITE })
|
||||
| if operand.tag_checked() {
|
||||
flags::TAG_CHECKED
|
||||
} else {
|
||||
0
|
||||
}
|
||||
| if operand.non_temporal {
|
||||
flags::NON_TEMPORAL
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
/// Requirements of this complete body, admitted before any guest effect.
|
||||
/// The shared SP check specializes SA-enabled execution: tuple-scaled immediate
|
||||
/// and element-scaled register offsets keep every SP-base element naturally
|
||||
/// aligned. Generic multibyte loads may need an enclosing atomic16 snapshot.
|
||||
/// Scalar stores use XCHG and need no optional host capability.
|
||||
pub(crate) fn requirements(operand: &Operand) -> MemoryRequirements {
|
||||
MemoryRequirements {
|
||||
required_sp_alignment: if operand.address.base == Register::Sp {
|
||||
SpAlignmentRequirement::Enabled
|
||||
} else {
|
||||
SpAlignmentRequirement::Any
|
||||
},
|
||||
required_flags: access_flags(operand),
|
||||
required_host_caps: if operand.loading
|
||||
&& operand.element != ElementSize::Byte
|
||||
&& operand.address.base != Register::Sp
|
||||
{
|
||||
host_caps::ATOMIC_LOAD16
|
||||
} else {
|
||||
0
|
||||
},
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| if operand.tag_checked() {
|
||||
profile_requirements::TAG_GRANULES | profile_requirements::SCALABLE_TAG_CHECKS
|
||||
} else {
|
||||
0
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Candidate context-memory emission. Entry has RDI=State, R15=Context and
|
||||
/// RSP=8 modulo16. Failure restores scratch then returns the inner body to its
|
||||
/// outer context wrapper; success has EAX=0 and falls through. RDI/R15 survive.
|
||||
pub(crate) fn emit(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &Operand,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
) {
|
||||
use scalable::memory;
|
||||
let tuple_bytes = usize::from(operand.registers) * length.bytes();
|
||||
let scratch = Scratch::new(tuple_bytes);
|
||||
code.extend(SUB_RSP_IMM32);
|
||||
code.extend(scratch.bytes.to_le_bytes());
|
||||
memory::begin(code);
|
||||
let alignment_failure = common::check_sp(code, operand.address.base, pc);
|
||||
prepare_iteration(code, operand, length);
|
||||
prepare_vector_staging(code, operand, scratch, length, target);
|
||||
prepare_predicate_staging(code, operand, length);
|
||||
let loop_start = code.len();
|
||||
code.extend(MOV_RCX_RSP_DISP32);
|
||||
code.extend(INDEX_OFFSET.to_le_bytes());
|
||||
code.extend(BT_RSP_DISP32_RCX);
|
||||
code.extend(MASK_OFFSET.to_le_bytes());
|
||||
let inactive = branch(code, JNC_REL32);
|
||||
code.extend(MOV_RAX_RSP_DISP32);
|
||||
code.extend(ADDRESS_OFFSET.to_le_bytes());
|
||||
code.extend(ADD_RAX_RCX);
|
||||
memory::request(
|
||||
code,
|
||||
REQUEST_OFFSET,
|
||||
scratch.data,
|
||||
operand.element.bytes() as u32,
|
||||
access_flags(operand),
|
||||
pc,
|
||||
);
|
||||
// request() clobbers RCX/RDX. Reload the saved linear byte offset before
|
||||
// selecting this element's private staging, never an architectural Z slot.
|
||||
code.extend(MOV_RCX_RSP_DISP32);
|
||||
code.extend(INDEX_OFFSET.to_le_bytes());
|
||||
code.extend(ADD_RSP_DISP32_RCX);
|
||||
code.extend((REQUEST_OFFSET + MEMORY_REQUEST_DATA_OFFSET).to_le_bytes());
|
||||
memory::call(code, REQUEST_OFFSET);
|
||||
let callback_failure = memory::branch_failed(code);
|
||||
let next_element = code.len();
|
||||
memory::patch_branch(code, inactive, next_element);
|
||||
code.extend(ADD_RSP_DISP32_IMM8);
|
||||
code.extend(INDEX_OFFSET.to_le_bytes());
|
||||
code.push(operand.element.bytes() as u8);
|
||||
code.extend(CMP_RSP_DISP32_IMM32);
|
||||
code.extend(INDEX_OFFSET.to_le_bytes());
|
||||
code.extend((tuple_bytes as u32).to_le_bytes());
|
||||
let repeat = branch(code, JB_REL32);
|
||||
memory::patch_branch(code, repeat, loop_start);
|
||||
if operand.loading {
|
||||
commit_load(code, operand, scratch, length, target);
|
||||
}
|
||||
code.extend(XOR_EAX_EAX);
|
||||
let cleanup = code.len();
|
||||
memory::patch_branch(code, callback_failure, cleanup);
|
||||
if let Some(failure) = alignment_failure {
|
||||
memory::patch_branch(code, failure, cleanup);
|
||||
}
|
||||
code.extend(ADD_RSP_IMM32);
|
||||
code.extend(scratch.bytes.to_le_bytes());
|
||||
common::return_if_failed(code);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn private_scratch_is_bounded_aligned_and_disjoint() {
|
||||
for vector_bytes in [16, 32, 64, 128, 256] {
|
||||
for registers in [2, 4] {
|
||||
let tuple_bytes = vector_bytes * registers;
|
||||
let scratch = Scratch::new(tuple_bytes);
|
||||
assert_eq!(scratch.bytes % STACK_ALIGNMENT, 0);
|
||||
assert!(scratch.data >= MASK_OFFSET + tuple_bytes.div_ceil(8) as u32);
|
||||
assert_eq!(scratch.bytes, scratch.data + tuple_bytes as u32);
|
||||
assert!(scratch.bytes <= 1200);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn one_callback_site_handles_all_lengths_and_restores_stack_on_each_exit() {
|
||||
for vector_bytes in [16, 32, 64, 128, 256] {
|
||||
let length = VectorLength::from_bytes(vector_bytes).unwrap();
|
||||
for word in [0xa040_0000, 0xa060_e001, 0xa03f_6000, 0xa040_03e0] {
|
||||
let operand = crate::aarch64::sve::memory_multi::decode(word)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
let mut code = Vec::new();
|
||||
emit(&mut code, &operand, length, TargetCpu::Baseline, 0x1000);
|
||||
let scratch = Scratch::new(usize::from(operand.registers) * vector_bytes);
|
||||
assert!(code.starts_with(SUB_RSP_IMM32));
|
||||
let cleanup = [ADD_RSP_IMM32, &scratch.bytes.to_le_bytes()].concat();
|
||||
assert_eq!(
|
||||
code.windows(cleanup.len())
|
||||
.filter(|bytes| *bytes == cleanup)
|
||||
.count(),
|
||||
1
|
||||
);
|
||||
assert_eq!(
|
||||
code.windows(3)
|
||||
.filter(|bytes| *bytes == [0xff, 0x57, 8])
|
||||
.count(),
|
||||
1
|
||||
);
|
||||
assert!(code.len() < 8192);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn descriptors_and_preentry_requirements_use_actual_element_widths() {
|
||||
use crate::aarch64::sve::memory_multi::decode;
|
||||
const LD1B_PAIR_X5: u32 = 0xa040_00a0;
|
||||
const LD1D_PAIR_X5: u32 = 0xa040_60a0;
|
||||
const LD1D_PAIR_SP: u32 = 0xa040_63e0;
|
||||
const LDNT1D_PAIR_SP_REGISTER: u32 = 0xa000_63e1;
|
||||
const ST1D_QUAD_X5: u32 = 0xa060_e0a0;
|
||||
for (word, descriptor, capabilities, profile) in [
|
||||
(
|
||||
LD1B_PAIR_X5,
|
||||
flags::TAG_CHECKED,
|
||||
0,
|
||||
profile_requirements::NATIVE_ACCESS | profile_requirements::TAG_GRANULES,
|
||||
),
|
||||
(
|
||||
LD1D_PAIR_X5,
|
||||
flags::TAG_CHECKED,
|
||||
host_caps::ATOMIC_LOAD16,
|
||||
profile_requirements::NATIVE_ACCESS | profile_requirements::TAG_GRANULES,
|
||||
),
|
||||
(LD1D_PAIR_SP, 0, 0, profile_requirements::NATIVE_ACCESS),
|
||||
(
|
||||
LDNT1D_PAIR_SP_REGISTER,
|
||||
flags::TAG_CHECKED | flags::NON_TEMPORAL,
|
||||
0,
|
||||
profile_requirements::NATIVE_ACCESS | profile_requirements::TAG_GRANULES,
|
||||
),
|
||||
(
|
||||
ST1D_QUAD_X5,
|
||||
flags::TAG_CHECKED | flags::WRITE,
|
||||
0,
|
||||
profile_requirements::NATIVE_ACCESS | profile_requirements::TAG_GRANULES,
|
||||
),
|
||||
] {
|
||||
let operand = decode(word).unwrap().unwrap();
|
||||
assert_eq!(
|
||||
requirements(&operand),
|
||||
MemoryRequirements {
|
||||
required_sp_alignment: if operand.address.base == Register::Sp {
|
||||
SpAlignmentRequirement::Enabled
|
||||
} else {
|
||||
SpAlignmentRequirement::Any
|
||||
},
|
||||
required_flags: descriptor,
|
||||
required_host_caps: capabilities,
|
||||
required_profile: profile
|
||||
| if operand.tag_checked() {
|
||||
profile_requirements::SCALABLE_TAG_CHECKS
|
||||
} else {
|
||||
0
|
||||
},
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
access_flags(&operand) & (flags::SME | flags::SVE_PREDICATED),
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,402 @@
|
||||
//! Context-memory callback candidate for exact scalable store prefixes.
|
||||
//!
|
||||
//! Sources and loop state live in private stack storage across callback calls.
|
||||
//! One request describes one reached Mem element; the runtime owns its exact
|
||||
//! single-copy decomposition and physical writer participation. Whole-register
|
||||
//! stores retain their specified ascending byte requests.
|
||||
use super::memory as shared_address;
|
||||
use crate::{
|
||||
TargetCpu,
|
||||
aarch64::{
|
||||
Register,
|
||||
scalable::{VECTOR_CHUNK_BYTES, VectorLength},
|
||||
sve::{
|
||||
memory::{Address, Offset},
|
||||
memory_store::{Operand, Store, WholeStore, WholeTarget},
|
||||
},
|
||||
},
|
||||
context::memory::{
|
||||
MEMORY_REQUEST_BYTES, MEMORY_REQUEST_DATA_OFFSET, MemoryRequirements,
|
||||
SpAlignmentRequirement, flags, host_caps, profile_requirements,
|
||||
},
|
||||
x86_64::{
|
||||
isa::SimdOpcode as Host,
|
||||
scalable::{load_z_chunk, memory, read_predicate_chunk},
|
||||
},
|
||||
};
|
||||
|
||||
const REQUEST_OFFSET: u32 = 0;
|
||||
const ADDRESS_OFFSET: u32 = MEMORY_REQUEST_BYTES as u32;
|
||||
const INDEX_OFFSET: u32 = ADDRESS_OFFSET + size_of::<u64>() as u32;
|
||||
const PREDICATE_OFFSET: u32 = INDEX_OFFSET + size_of::<u64>() as u32;
|
||||
const STACK_ALIGNMENT_BYTES: u32 = 16;
|
||||
const HOST_QWORD_BYTES: usize = size_of::<u64>();
|
||||
const SOURCE_XMM: u8 = 0;
|
||||
const X86_MODRM_DISP32: u8 = 0x84;
|
||||
const X86_SIB_RSP: u8 = 0x24;
|
||||
const SUB_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xec];
|
||||
const ADD_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xc4];
|
||||
const MOV_RSP_DISP32_RAX: &[u8] = &[0x48, 0x89, 0x84, 0x24];
|
||||
const MOV_RAX_RSP_DISP32: &[u8] = &[0x48, 0x8b, 0x84, 0x24];
|
||||
const MOV_ECX_RSP_DISP8: &[u8] = &[0x8b, 0x4c, 0x24];
|
||||
const MOV_RSP_DISP32_IMM32_QWORD: &[u8] = &[0x48, 0xc7, 0x84, 0x24];
|
||||
const ADD_RSP_DISP32_IMM8: &[u8] = &[0x48, 0x83, 0x84, 0x24];
|
||||
const LEA_RAX_RSP_RCX_DISP8: &[u8] = &[0x48, 0x8d, 0x44, 0x0c];
|
||||
const LEA_RAX_RSP_RCX_DISP32: &[u8] = &[0x48, 0x8d, 0x84, 0x0c];
|
||||
const MOV_RSP_DISP8_RAX: &[u8] = &[0x48, 0x89, 0x44, 0x24];
|
||||
const _: () = assert!(INDEX_OFFSET <= i8::MAX as u32);
|
||||
const _: () = assert!(REQUEST_OFFSET + MEMORY_REQUEST_DATA_OFFSET <= i8::MAX as u32);
|
||||
const CMP_RSP_DISP32_IMM32: &[u8] = &[0x48, 0x81, 0xbc, 0x24];
|
||||
const BT_RSP_DISP32_RCX: &[u8] = &[0x48, 0x0f, 0xa3, 0x8c, 0x24];
|
||||
const XOR_EAX_EAX: &[u8] = &[0x31, 0xc0];
|
||||
const XOR_R8D_R8D: &[u8] = &[0x45, 0x31, 0xc0];
|
||||
const MOVABS_RCX_IMM64: &[u8] = &[0x48, 0xb9];
|
||||
const AND_RAX_RCX: &[u8] = &[0x48, 0x21, 0xc8];
|
||||
const OR_R8_RAX: &[u8] = &[0x49, 0x09, 0xc0];
|
||||
const TEST_R8_R8: &[u8] = &[0x4d, 0x85, 0xc0];
|
||||
const JZ_REL32: &[u8] = &[0x0f, 0x84];
|
||||
const JMP_REL32: &[u8] = &[0xe9];
|
||||
const JNC_REL32: &[u8] = &[0x0f, 0x83];
|
||||
const JB_REL32: &[u8] = &[0x0f, 0x82];
|
||||
|
||||
struct Layout {
|
||||
source: u32,
|
||||
bytes: u32,
|
||||
}
|
||||
|
||||
impl Layout {
|
||||
fn new(length: VectorLength, source_bytes: usize) -> Self {
|
||||
let source = align(PREDICATE_OFFSET + length.predicate_bytes() as u32);
|
||||
Self {
|
||||
source,
|
||||
bytes: align(source + source_bytes as u32),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn align(bytes: u32) -> u32 {
|
||||
bytes.div_ceil(STACK_ALIGNMENT_BYTES) * STACK_ALIGNMENT_BYTES
|
||||
}
|
||||
|
||||
fn store_stack_chunk(code: &mut Vec<u8>, offset: u32, target: TargetCpu) {
|
||||
Host::StoreUnaligned.append(code, target);
|
||||
code.extend([X86_MODRM_DISP32, X86_SIB_RSP]);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn stack_rax(code: &mut Vec<u8>, offset: u32, store: bool) {
|
||||
code.extend(if store {
|
||||
MOV_RSP_DISP32_RAX
|
||||
} else {
|
||||
MOV_RAX_RSP_DISP32
|
||||
});
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn set_index(code: &mut Vec<u8>) {
|
||||
code.extend(MOV_RSP_DISP32_IMM32_QWORD);
|
||||
code.extend(INDEX_OFFSET.to_le_bytes());
|
||||
code.extend(0_u32.to_le_bytes());
|
||||
}
|
||||
|
||||
fn load_index(code: &mut Vec<u8>) {
|
||||
code.extend(MOV_ECX_RSP_DISP8);
|
||||
code.push(INDEX_OFFSET as u8);
|
||||
}
|
||||
|
||||
fn add_stack(code: &mut Vec<u8>, offset: u32, bytes: u8) {
|
||||
debug_assert!(bytes <= i8::MAX as u8);
|
||||
code.extend(ADD_RSP_DISP32_IMM8);
|
||||
code.extend(offset.to_le_bytes());
|
||||
code.push(bytes);
|
||||
}
|
||||
|
||||
fn branch(code: &mut Vec<u8>, opcode: &[u8]) -> usize {
|
||||
code.extend(opcode);
|
||||
let displacement = code.len();
|
||||
code.extend(0_i32.to_le_bytes());
|
||||
displacement
|
||||
}
|
||||
|
||||
fn copy_sources(
|
||||
code: &mut Vec<u8>,
|
||||
source: u8,
|
||||
count: u8,
|
||||
layout: &Layout,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
) {
|
||||
for member in 0..count {
|
||||
let register =
|
||||
source.wrapping_add(member) % crate::aarch64::scalable::VECTOR_REGISTER_COUNT;
|
||||
for chunk in 0..length.chunks() {
|
||||
load_z_chunk(code, register, chunk, SOURCE_XMM, length, target);
|
||||
let offset = layout.source
|
||||
+ (usize::from(member) * length.bytes() + chunk * VECTOR_CHUNK_BYTES) as u32;
|
||||
store_stack_chunk(code, offset, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn copy_predicate(code: &mut Vec<u8>, predicate: u8, destination: u32, length: VectorLength) {
|
||||
for chunk in 0..length.predicate_bytes().div_ceil(HOST_QWORD_BYTES) {
|
||||
read_predicate_chunk(code, predicate, chunk, length);
|
||||
stack_rax(code, destination + (chunk * HOST_QWORD_BYTES) as u32, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// Snapshot P and branch around all source staging when no element is active.
|
||||
fn copy_active_predicate(code: &mut Vec<u8>, store: &Store, length: VectorLength) -> usize {
|
||||
let mask = (0..u64::BITS as usize)
|
||||
.step_by(store.element.bytes())
|
||||
.fold(0_u64, |bits, bit| bits | (1_u64 << bit));
|
||||
code.extend(XOR_R8D_R8D);
|
||||
for chunk in 0..length.predicate_bytes().div_ceil(HOST_QWORD_BYTES) {
|
||||
read_predicate_chunk(code, store.predicate, chunk, length);
|
||||
stack_rax(
|
||||
code,
|
||||
PREDICATE_OFFSET + (chunk * HOST_QWORD_BYTES) as u32,
|
||||
true,
|
||||
);
|
||||
if mask != u64::MAX {
|
||||
code.extend(MOVABS_RCX_IMM64);
|
||||
code.extend(mask.to_le_bytes());
|
||||
code.extend(AND_RAX_RCX);
|
||||
}
|
||||
code.extend(OR_R8_RAX);
|
||||
}
|
||||
code.extend(TEST_R8_R8);
|
||||
branch(code, JZ_REL32)
|
||||
}
|
||||
|
||||
fn submit(
|
||||
code: &mut Vec<u8>,
|
||||
source: u32,
|
||||
bytes: u32,
|
||||
descriptor: u32,
|
||||
pc: u64,
|
||||
failures: &mut Vec<usize>,
|
||||
) {
|
||||
stack_rax(code, ADDRESS_OFFSET, false);
|
||||
memory::request(code, REQUEST_OFFSET, source, bytes, descriptor, pc);
|
||||
// request() clobbers RCX. Reload the saved byte index only afterward and
|
||||
// point at the reached element in the immutable private source snapshot.
|
||||
// The request width selects its exact low bytes, including narrowing stores.
|
||||
load_index(code);
|
||||
if source <= i8::MAX as u32 {
|
||||
code.extend(LEA_RAX_RSP_RCX_DISP8);
|
||||
code.push(source as u8);
|
||||
} else {
|
||||
code.extend(LEA_RAX_RSP_RCX_DISP32);
|
||||
code.extend(source.to_le_bytes());
|
||||
}
|
||||
code.extend(MOV_RSP_DISP8_RAX);
|
||||
code.push((REQUEST_OFFSET + MEMORY_REQUEST_DATA_OFFSET) as u8);
|
||||
memory::call(code, REQUEST_OFFSET);
|
||||
failures.push(memory::branch_failed(code));
|
||||
}
|
||||
|
||||
fn loop_end(code: &mut Vec<u8>, step: u8, limit: u32, start: usize) {
|
||||
add_stack(code, INDEX_OFFSET, step);
|
||||
code.extend(CMP_RSP_DISP32_IMM32);
|
||||
code.extend(INDEX_OFFSET.to_le_bytes());
|
||||
code.extend(limit.to_le_bytes());
|
||||
let repeat = branch(code, JB_REL32);
|
||||
memory::patch_branch(code, repeat, start);
|
||||
}
|
||||
|
||||
fn store_loop(
|
||||
code: &mut Vec<u8>,
|
||||
store: &Store,
|
||||
layout: &Layout,
|
||||
length: VectorLength,
|
||||
pc: u64,
|
||||
failures: &mut Vec<usize>,
|
||||
) {
|
||||
let start = code.len();
|
||||
load_index(code);
|
||||
code.extend(BT_RSP_DISP32_RCX);
|
||||
code.extend(PREDICATE_OFFSET.to_le_bytes());
|
||||
let inactive = branch(code, JNC_REL32);
|
||||
let descriptor = descriptor(store.address, store.non_temporal, true);
|
||||
for member in 0..store.register_count {
|
||||
let source = layout.source + u32::from(member) * length.bytes() as u32;
|
||||
submit(
|
||||
code,
|
||||
source,
|
||||
store.memory_element.bytes() as u32,
|
||||
descriptor,
|
||||
pc,
|
||||
failures,
|
||||
);
|
||||
add_stack(code, ADDRESS_OFFSET, store.memory_element.bytes() as u8);
|
||||
}
|
||||
let active_done = branch(code, JMP_REL32);
|
||||
let inactive_start = code.len();
|
||||
memory::patch_branch(code, inactive, inactive_start);
|
||||
add_stack(
|
||||
code,
|
||||
ADDRESS_OFFSET,
|
||||
store.memory_element.bytes() as u8 * store.register_count,
|
||||
);
|
||||
let next_lane = code.len();
|
||||
memory::patch_branch(code, active_done, next_lane);
|
||||
loop_end(
|
||||
code,
|
||||
store.element.bytes() as u8,
|
||||
length.bytes() as u32,
|
||||
start,
|
||||
);
|
||||
}
|
||||
|
||||
fn whole_loop(
|
||||
code: &mut Vec<u8>,
|
||||
store: &WholeStore,
|
||||
layout: &Layout,
|
||||
bytes: usize,
|
||||
pc: u64,
|
||||
failures: &mut Vec<usize>,
|
||||
) {
|
||||
let start = code.len();
|
||||
submit(
|
||||
code,
|
||||
layout.source,
|
||||
1,
|
||||
descriptor(store.address, false, false),
|
||||
pc,
|
||||
failures,
|
||||
);
|
||||
add_stack(code, ADDRESS_OFFSET, 1);
|
||||
loop_end(code, 1, bytes as u32, start);
|
||||
}
|
||||
|
||||
fn descriptor(address: Address, non_temporal: bool, predicated: bool) -> u32 {
|
||||
let tag_checked =
|
||||
address.base != Register::Sp || matches!(address.offset, Offset::Register { .. });
|
||||
flags::WRITE
|
||||
| if tag_checked { flags::TAG_CHECKED } else { 0 }
|
||||
| if non_temporal { flags::NON_TEMPORAL } else { 0 }
|
||||
| if predicated { flags::SVE_PREDICATED } else { 0 }
|
||||
}
|
||||
|
||||
/// Requirements for the complete consumed body, checked before guest effects.
|
||||
/// Q stores can reach one aligned16-byte part and therefore preflight CX16 even
|
||||
/// when a particular invocation later selects empty predicates or split parts.
|
||||
/// Narrow stores use scalar XCHG parts and require no 16-byte host capability.
|
||||
/// Whole-register stores submit byte requests; ignored prefetch submits none.
|
||||
pub(crate) fn requirements(operand: &Operand) -> MemoryRequirements {
|
||||
let (required_flags, required_host_caps) = match operand {
|
||||
Operand::Store(store) => (
|
||||
descriptor(store.address, store.non_temporal, true),
|
||||
if store.memory_element.bytes() == VECTOR_CHUNK_BYTES {
|
||||
host_caps::CX16
|
||||
} else {
|
||||
0
|
||||
},
|
||||
),
|
||||
Operand::Whole(store) => (descriptor(store.address, false, false), 0),
|
||||
Operand::Prefetch(_) => return MemoryRequirements::default(),
|
||||
};
|
||||
MemoryRequirements {
|
||||
required_flags,
|
||||
required_host_caps,
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| if required_flags & flags::TAG_CHECKED != 0 {
|
||||
profile_requirements::TAG_GRANULES | profile_requirements::SCALABLE_TAG_CHECKS
|
||||
} else {
|
||||
0
|
||||
},
|
||||
required_sp_alignment: match operand {
|
||||
Operand::Store(store) if store.address.base == Register::Sp => {
|
||||
SpAlignmentRequirement::Enabled
|
||||
}
|
||||
Operand::Whole(store) if store.address.base == Register::Sp => {
|
||||
SpAlignmentRequirement::Enabled
|
||||
}
|
||||
_ => SpAlignmentRequirement::Any,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// Candidate extended body, returning MemoryStatus in EAX with private stack
|
||||
/// storage released. The enclosing dispatcher must exit on nonzero status.
|
||||
/// The declared Normal-RAM profile has AlignmentEnforced=false; original SP16
|
||||
/// still checks before any offset, including the empty-predicate choice.
|
||||
pub(crate) fn emit(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &Operand,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
) {
|
||||
let (address, source_bytes) = match operand {
|
||||
Operand::Prefetch(_) => {
|
||||
// Hint_Prefetch has a documented implementation-defined ignored
|
||||
// behavior. The shared dispatcher already checked the mode.
|
||||
code.extend(XOR_EAX_EAX);
|
||||
return;
|
||||
}
|
||||
Operand::Store(store) => (
|
||||
store.address,
|
||||
usize::from(store.register_count) * length.bytes(),
|
||||
),
|
||||
Operand::Whole(store) => (
|
||||
store.address,
|
||||
match store.target {
|
||||
WholeTarget::Vector(_) => length.bytes(),
|
||||
WholeTarget::Predicate(_) => length.predicate_bytes(),
|
||||
},
|
||||
),
|
||||
};
|
||||
let layout = Layout::new(length, source_bytes);
|
||||
code.extend(SUB_RSP_IMM32);
|
||||
code.extend(layout.bytes.to_le_bytes());
|
||||
memory::begin(code);
|
||||
let mut failures = Vec::new();
|
||||
if let Some(failure) = shared_address::check_sp(code, address.base, pc) {
|
||||
failures.push(failure);
|
||||
}
|
||||
shared_address::address(code, address, length);
|
||||
stack_rax(code, ADDRESS_OFFSET, true);
|
||||
set_index(code);
|
||||
let empty = match operand {
|
||||
Operand::Store(store) => {
|
||||
let empty = copy_active_predicate(code, store, length);
|
||||
copy_sources(
|
||||
code,
|
||||
store.source,
|
||||
store.register_count,
|
||||
&layout,
|
||||
length,
|
||||
target,
|
||||
);
|
||||
store_loop(code, store, &layout, length, pc, &mut failures);
|
||||
Some(empty)
|
||||
}
|
||||
Operand::Whole(store) => {
|
||||
match store.target {
|
||||
WholeTarget::Vector(source) => {
|
||||
copy_sources(code, source, 1, &layout, length, target);
|
||||
}
|
||||
WholeTarget::Predicate(source) => {
|
||||
copy_predicate(code, source, layout.source, length);
|
||||
}
|
||||
}
|
||||
whole_loop(code, store, &layout, source_bytes, pc, &mut failures);
|
||||
None
|
||||
}
|
||||
Operand::Prefetch(_) => unreachable!("prefetch returned before stack allocation"),
|
||||
};
|
||||
let success = code.len();
|
||||
if let Some(empty) = empty {
|
||||
memory::patch_branch(code, empty, success);
|
||||
}
|
||||
code.extend(XOR_EAX_EAX);
|
||||
let cleanup = code.len();
|
||||
for failure in failures {
|
||||
memory::patch_branch(code, failure, cleanup);
|
||||
}
|
||||
code.extend(ADD_RSP_IMM32);
|
||||
code.extend(layout.bytes.to_le_bytes());
|
||||
shared_address::return_if_failed(code);
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
//! Staged structured SVE loads through the architectural memory callback.
|
||||
//!
|
||||
//! This correctness candidate keeps every destination unchanged until all
|
||||
//! reached reads succeed. Runtime owns address resolution and atomic splitting.
|
||||
use super::super::{
|
||||
isa::SimdOpcode as Host,
|
||||
scalable::{self, memory},
|
||||
};
|
||||
use super::memory as transfer;
|
||||
use crate::{
|
||||
TargetCpu,
|
||||
aarch64::{
|
||||
Register,
|
||||
scalable::{ElementSize, VECTOR_CHUNK_BYTES, VectorLength},
|
||||
sve::{memory::Offset, memory_structure::Operand},
|
||||
},
|
||||
context::memory::{
|
||||
MEMORY_REQUEST_BYTES, MEMORY_REQUEST_DATA_OFFSET, MemoryRequirements,
|
||||
SpAlignmentRequirement, flags, host_caps, profile_requirements,
|
||||
},
|
||||
};
|
||||
|
||||
const POINTER_BYTES: u32 = size_of::<u64>() as u32;
|
||||
const STACK_ALIGNMENT: u32 = 16;
|
||||
const PREDICATE_CHUNK_BITS: usize = u64::BITS as usize;
|
||||
const PREDICATE_SELECTED: u8 = 1;
|
||||
const STACK_SIB: u8 = 0x24;
|
||||
const STACK_DISP32_XMM0: u8 = 0x84;
|
||||
const ZERO_XMM: u8 = 0;
|
||||
const SUB_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xec];
|
||||
const ADD_RSP_IMM32: &[u8] = &[0x48, 0x81, 0xc4];
|
||||
const MOV_RSP_DISP32_RAX: &[u8] = &[0x48, 0x89, 0x84, STACK_SIB];
|
||||
const MOV_RAX_RSP_DISP32: &[u8] = &[0x48, 0x8b, 0x84, STACK_SIB];
|
||||
const MOV_R8_RSP_DISP32: &[u8] = &[0x4c, 0x8b, 0x84, STACK_SIB];
|
||||
const ADD_RSP_DISP32_R8: &[u8] = &[0x4c, 0x01, 0x84, STACK_SIB];
|
||||
const MOV_RSP_DISP32_IMM32: &[u8] = &[0x48, 0xc7, 0x84, STACK_SIB];
|
||||
const ADD_RSP_DISP32_IMM32: &[u8] = &[0x48, 0x81, 0x84, STACK_SIB];
|
||||
const CMP_RSP_DISP32_IMM32: &[u8] = &[0x48, 0x81, 0xbc, STACK_SIB];
|
||||
const SHR_RSP_DISP32_IMM8: &[u8] = &[0x48, 0xc1, 0xac, STACK_SIB];
|
||||
const TEST_RSP_DISP32_IMM8: &[u8] = &[0xf6, 0x84, STACK_SIB];
|
||||
const XOR_EAX_EAX: &[u8] = &[0x31, 0xc0];
|
||||
const JZ_REL32: &[u8] = &[0x0f, 0x84];
|
||||
const JB_REL32: &[u8] = &[0x0f, 0x82];
|
||||
const JMP_REL32: &[u8] = &[0xe9];
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
struct Scratch {
|
||||
data_bytes: u32,
|
||||
address: u32,
|
||||
lane: u32,
|
||||
predicate: u32,
|
||||
request: u32,
|
||||
bytes: u32,
|
||||
}
|
||||
|
||||
impl Scratch {
|
||||
fn new(registers: u8, length: VectorLength) -> Self {
|
||||
let data_bytes = u32::from(registers) * length.bytes() as u32;
|
||||
let address = data_bytes;
|
||||
let lane = address + POINTER_BYTES;
|
||||
let predicate = lane + POINTER_BYTES;
|
||||
let request = data_bytes + 2 * STACK_ALIGNMENT;
|
||||
let bytes = request + MEMORY_REQUEST_BYTES as u32;
|
||||
debug_assert_eq!(bytes % STACK_ALIGNMENT, 0);
|
||||
Self {
|
||||
data_bytes,
|
||||
address,
|
||||
lane,
|
||||
predicate,
|
||||
request,
|
||||
bytes,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn stack_immediate(code: &mut Vec<u8>, opcode: &[u8], offset: u32, value: u32) {
|
||||
code.extend(opcode);
|
||||
code.extend(offset.to_le_bytes());
|
||||
code.extend(value.to_le_bytes());
|
||||
}
|
||||
|
||||
fn stack_operand(code: &mut Vec<u8>, opcode: &[u8], offset: u32) {
|
||||
code.extend(opcode);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn branch(code: &mut Vec<u8>, opcode: &[u8]) -> usize {
|
||||
code.extend(opcode);
|
||||
let displacement = code.len();
|
||||
code.extend(0_i32.to_le_bytes());
|
||||
displacement
|
||||
}
|
||||
|
||||
fn stack_vector(code: &mut Vec<u8>, opcode: Host, offset: u32, target: TargetCpu) {
|
||||
opcode.append(code, target);
|
||||
code.extend([STACK_DISP32_XMM0, STACK_SIB]);
|
||||
code.extend(offset.to_le_bytes());
|
||||
}
|
||||
|
||||
fn access_flags(operand: Operand) -> u32 {
|
||||
flags::SVE_PREDICATED
|
||||
| if operand.address.base != Register::Sp
|
||||
|| matches!(operand.address.offset, Offset::Register { .. })
|
||||
{
|
||||
flags::TAG_CHECKED
|
||||
} else {
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
/// Source-derived requirements for every reached structured-load quantity.
|
||||
/// Q reads need a coherent aligned16 snapshot even with a naturally aligned SP.
|
||||
/// Smaller SP-based quantities are naturally aligned by the checked SP16 and
|
||||
/// element-scaled offset; unconstrained multibyte GPR reads can cross host8.
|
||||
pub(crate) fn requirements(operand: Operand) -> MemoryRequirements {
|
||||
let required_flags = access_flags(operand);
|
||||
MemoryRequirements {
|
||||
required_flags,
|
||||
required_host_caps: if operand.element == ElementSize::Quadword
|
||||
|| (operand.element != ElementSize::Byte && operand.address.base != Register::Sp)
|
||||
{
|
||||
host_caps::ATOMIC_LOAD16
|
||||
} else {
|
||||
0
|
||||
},
|
||||
required_sp_alignment: if operand.address.base == Register::Sp {
|
||||
SpAlignmentRequirement::Enabled
|
||||
} else {
|
||||
SpAlignmentRequirement::Any
|
||||
},
|
||||
required_profile: profile_requirements::NATIVE_ACCESS
|
||||
| if required_flags & flags::TAG_CHECKED != 0 {
|
||||
profile_requirements::TAG_GRANULES | profile_requirements::SCALABLE_TAG_CHECKS
|
||||
} else {
|
||||
0
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/// RDI/R15 and entry RSP are preserved. Failures return their MemoryStatus in
|
||||
/// EAX to the outer wrapper; success sets EAX=0 and falls through. The fixed
|
||||
/// profile checks original SP even when every predicate lane is inactive.
|
||||
pub(crate) fn emit(
|
||||
code: &mut Vec<u8>,
|
||||
operand: &Operand,
|
||||
length: VectorLength,
|
||||
target: TargetCpu,
|
||||
pc: u64,
|
||||
) {
|
||||
let scratch = Scratch::new(operand.registers, length);
|
||||
let width = operand.element.bytes() as u32;
|
||||
let access_flags = access_flags(*operand);
|
||||
let mut failures = Vec::new();
|
||||
code.extend(SUB_RSP_IMM32);
|
||||
code.extend(scratch.bytes.to_le_bytes());
|
||||
memory::begin(code);
|
||||
if let Some(failure) = transfer::check_sp(code, operand.address.base, pc) {
|
||||
failures.push(failure);
|
||||
}
|
||||
transfer::address(code, operand.address, length);
|
||||
stack_operand(code, MOV_RSP_DISP32_RAX, scratch.address);
|
||||
stack_immediate(code, MOV_RSP_DISP32_IMM32, scratch.lane, 0);
|
||||
Host::Xor.register(code, ZERO_XMM, ZERO_XMM, target);
|
||||
for offset in (0..scratch.data_bytes).step_by(VECTOR_CHUNK_BYTES) {
|
||||
stack_vector(code, Host::StoreUnaligned, offset, target);
|
||||
}
|
||||
// Each packed-P chunk governs up to64 vector bytes. The loop only retains
|
||||
// values in private stack slots because a C callback may clobber all XMMs
|
||||
// and caller-saved GPRs. Tuple callbacks retain element-major read order.
|
||||
let predicate_chunks = length.bytes().div_ceil(PREDICATE_CHUNK_BITS);
|
||||
for chunk in 0..predicate_chunks {
|
||||
scalable::read_predicate_chunk(code, operand.predicate, chunk, length);
|
||||
stack_operand(code, MOV_RSP_DISP32_RAX, scratch.predicate);
|
||||
let start = code.len();
|
||||
stack_operand(code, TEST_RSP_DISP32_IMM8, scratch.predicate);
|
||||
code.push(PREDICATE_SELECTED);
|
||||
let inactive = branch(code, JZ_REL32);
|
||||
for tuple_index in 0..operand.registers {
|
||||
stack_operand(code, MOV_RAX_RSP_DISP32, scratch.address);
|
||||
memory::request(
|
||||
code,
|
||||
scratch.request,
|
||||
u32::from(tuple_index) * length.bytes() as u32,
|
||||
width,
|
||||
access_flags,
|
||||
pc,
|
||||
);
|
||||
stack_operand(code, MOV_R8_RSP_DISP32, scratch.lane);
|
||||
stack_operand(
|
||||
code,
|
||||
ADD_RSP_DISP32_R8,
|
||||
scratch.request + MEMORY_REQUEST_DATA_OFFSET,
|
||||
);
|
||||
memory::call(code, scratch.request);
|
||||
failures.push(memory::branch_failed(code));
|
||||
stack_immediate(code, ADD_RSP_DISP32_IMM32, scratch.address, width);
|
||||
}
|
||||
let active_done = branch(code, JMP_REL32);
|
||||
let inactive_start = code.len();
|
||||
memory::patch_branch(code, inactive, inactive_start);
|
||||
stack_immediate(
|
||||
code,
|
||||
ADD_RSP_DISP32_IMM32,
|
||||
scratch.address,
|
||||
u32::from(operand.registers) * width,
|
||||
);
|
||||
let advance = code.len();
|
||||
memory::patch_branch(code, active_done, advance);
|
||||
stack_operand(code, SHR_RSP_DISP32_IMM8, scratch.predicate);
|
||||
code.push(width as u8);
|
||||
stack_immediate(code, ADD_RSP_DISP32_IMM32, scratch.lane, width);
|
||||
let end = ((chunk + 1) * PREDICATE_CHUNK_BITS).min(length.bytes()) as u32;
|
||||
stack_immediate(code, CMP_RSP_DISP32_IMM32, scratch.lane, end);
|
||||
let repeat = branch(code, JB_REL32);
|
||||
memory::patch_branch(code, repeat, start);
|
||||
}
|
||||
// Architectural Z writes begin only after all callbacks have succeeded.
|
||||
for tuple_index in 0..operand.registers {
|
||||
for chunk in 0..length.chunks() {
|
||||
let offset = usize::from(tuple_index) * length.bytes() + chunk * VECTOR_CHUNK_BYTES;
|
||||
stack_vector(code, Host::LoadUnaligned, offset as u32, target);
|
||||
scalable::store_z_chunk(
|
||||
code,
|
||||
operand.destination_register(tuple_index),
|
||||
chunk,
|
||||
ZERO_XMM,
|
||||
length,
|
||||
target,
|
||||
);
|
||||
}
|
||||
}
|
||||
code.extend(XOR_EAX_EAX);
|
||||
let cleanup = code.len();
|
||||
for failure in failures {
|
||||
memory::patch_branch(code, failure, cleanup);
|
||||
}
|
||||
code.extend(ADD_RSP_IMM32);
|
||||
code.extend(scratch.bytes.to_le_bytes());
|
||||
transfer::return_if_failed(code);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::aarch64::{scalable::ElementSize, sve::memory_structure};
|
||||
|
||||
const LENGTHS: [usize; 5] = [16, 32, 64, 128, 256];
|
||||
const TEST_PC: u64 = 0x1_4000_1000;
|
||||
const MAX_REFERENCE_BODY_BYTES: usize = 8 * 1024;
|
||||
const CALL_MEMORY_CALLBACK: &[u8] = &[
|
||||
0xff,
|
||||
0x57,
|
||||
crate::context::memory::MEMORY_CALLBACK_OFFSET as u8,
|
||||
];
|
||||
|
||||
#[test]
|
||||
fn requirements_bind_predication_tags_and_wide_read_capability() {
|
||||
const WIDTH_CLASSES: [(u32, ElementSize, bool); 10] = [
|
||||
(0xa420_e000, ElementSize::Byte, true),
|
||||
(0xa420_c000, ElementSize::Byte, false),
|
||||
(0xa4a0_e000, ElementSize::Halfword, true),
|
||||
(0xa4a0_c000, ElementSize::Halfword, false),
|
||||
(0xa520_e000, ElementSize::Word, true),
|
||||
(0xa520_c000, ElementSize::Word, false),
|
||||
(0xa5a0_e000, ElementSize::Doubleword, true),
|
||||
(0xa5a0_c000, ElementSize::Doubleword, false),
|
||||
(0xa490_e000, ElementSize::Quadword, true),
|
||||
(0xa4a0_8000, ElementSize::Quadword, false),
|
||||
];
|
||||
const SP_ENCODING: u32 = 31 << 5;
|
||||
for (class, element, immediate) in WIDTH_CLASSES {
|
||||
for base in [0, SP_ENCODING] {
|
||||
let operand = memory_structure::decode(class | base).unwrap().unwrap();
|
||||
let required = requirements(operand);
|
||||
assert_eq!(
|
||||
required.required_sp_alignment,
|
||||
if base == SP_ENCODING {
|
||||
SpAlignmentRequirement::Enabled
|
||||
} else {
|
||||
SpAlignmentRequirement::Any
|
||||
}
|
||||
);
|
||||
let tag_checked = !immediate || base != SP_ENCODING;
|
||||
assert_eq!(
|
||||
required.required_flags,
|
||||
flags::SVE_PREDICATED | if tag_checked { flags::TAG_CHECKED } else { 0 }
|
||||
);
|
||||
let wide_read = element == ElementSize::Quadword
|
||||
|| (element != ElementSize::Byte && base != SP_ENCODING);
|
||||
assert_eq!(
|
||||
required.required_host_caps,
|
||||
if wide_read {
|
||||
host_caps::ATOMIC_LOAD16
|
||||
} else {
|
||||
0
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
required.required_profile,
|
||||
profile_requirements::NATIVE_ACCESS
|
||||
| if tag_checked {
|
||||
profile_requirements::TAG_GRANULES
|
||||
| profile_requirements::SCALABLE_TAG_CHECKS
|
||||
} else {
|
||||
0
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn private_staging_and_requests_are_disjoint_and_stack_aligned() {
|
||||
for bytes in LENGTHS {
|
||||
let length = VectorLength::from_bytes(bytes).unwrap();
|
||||
for registers in 2..=4 {
|
||||
let scratch = Scratch::new(registers, length);
|
||||
assert_eq!(scratch.bytes % STACK_ALIGNMENT, 0);
|
||||
assert_eq!(scratch.address, u32::from(registers) * bytes as u32);
|
||||
assert!(scratch.predicate + POINTER_BYTES <= scratch.request);
|
||||
assert_eq!(scratch.request + MEMORY_REQUEST_BYTES as u32, scratch.bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn callback_body_grows_with_predicate_chunks_instead_of_each_byte_lane() {
|
||||
let operand = memory_structure::decode(0xa460_e000).unwrap().unwrap();
|
||||
assert_eq!(operand.element, ElementSize::Byte);
|
||||
for bytes in LENGTHS {
|
||||
let length = VectorLength::from_bytes(bytes).unwrap();
|
||||
let mut code = Vec::new();
|
||||
emit(&mut code, &operand, length, TargetCpu::Baseline, TEST_PC);
|
||||
let calls = code
|
||||
.windows(CALL_MEMORY_CALLBACK.len())
|
||||
.filter(|window| *window == CALL_MEMORY_CALLBACK)
|
||||
.count();
|
||||
assert_eq!(
|
||||
calls,
|
||||
usize::from(operand.registers) * bytes.div_ceil(PREDICATE_CHUNK_BITS)
|
||||
);
|
||||
assert!(code.len() < MAX_REFERENCE_BODY_BYTES);
|
||||
assert!(code.starts_with(SUB_RSP_IMM32));
|
||||
let cleanup = code
|
||||
.windows(ADD_RSP_IMM32.len())
|
||||
.rposition(|bytes| bytes == ADD_RSP_IMM32)
|
||||
.unwrap();
|
||||
let immediate = cleanup + ADD_RSP_IMM32.len();
|
||||
assert_eq!(
|
||||
&code[immediate..immediate + size_of::<u32>()],
|
||||
&Scratch::new(operand.registers, length).bytes.to_le_bytes()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -235,6 +235,23 @@ pub(crate) mod platform {
|
||||
Ok(unsafe { function(state, context) })
|
||||
}
|
||||
|
||||
/// Invoke the two-argument context-leaf ABI. Architectural failure is
|
||||
/// recorded in the owned memory view, never inferred from RAX.
|
||||
pub unsafe fn call_context(
|
||||
&self,
|
||||
state: &mut GuestState,
|
||||
context: &mut stela_compiler::context::ExecutionContext,
|
||||
) -> Result<()> {
|
||||
// SAFETY: The context entry owns the checked source/profile and
|
||||
// validates its live borrowed views before this synchronous call.
|
||||
let function: unsafe extern "C" fn(
|
||||
*mut GuestState,
|
||||
*mut stela_compiler::context::ExecutionContext,
|
||||
) = unsafe { std::mem::transmute(self.pointer.as_ptr()) };
|
||||
unsafe { function(state, context) };
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub unsafe fn call_block(
|
||||
&self,
|
||||
state: &mut GuestState,
|
||||
@@ -294,6 +311,14 @@ pub(crate) mod platform {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
pub unsafe fn call_context(
|
||||
&self,
|
||||
_state: &mut GuestState,
|
||||
_context: &mut stela_compiler::context::ExecutionContext,
|
||||
) -> Result<()> {
|
||||
ensure_supported()
|
||||
}
|
||||
|
||||
pub unsafe fn call_block(
|
||||
&self,
|
||||
_state: &mut GuestState,
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
//! Thread-owned scalable register storage; the existing V registers own low Z bits.
|
||||
|
||||
mod context;
|
||||
pub mod leaf;
|
||||
|
||||
use anyhow::{Result, ensure};
|
||||
use stela_compiler::{
|
||||
GuestState,
|
||||
@@ -95,6 +98,12 @@ impl ScalableState {
|
||||
operation(loan.state, &mut loan.storage[..bytes])
|
||||
}
|
||||
|
||||
/// Whether this owner reserves ZT0 backing storage. This allocation
|
||||
/// capability does not establish guest feature availability or access.
|
||||
pub const fn has_zt0_storage(&self) -> bool {
|
||||
self.sme2
|
||||
}
|
||||
|
||||
pub fn vector_length(&self) -> VectorLength {
|
||||
self.length
|
||||
}
|
||||
@@ -651,4 +660,3 @@ mod tests {
|
||||
}
|
||||
|
||||
pub mod block;
|
||||
mod context;
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Scoped context pointers shared by owned synchronous leaf/block entries.
|
||||
|
||||
use stela_compiler::context::{ExecutionContext, ScalableStateView};
|
||||
use stela_compiler::context::{ExecutionContext, ScalableStateView, memory::MemoryContextView};
|
||||
|
||||
/// Pointers are restored before the matching register/service loan expires,
|
||||
/// including ordinary Rust error unwinding around a completed native call.
|
||||
@@ -28,6 +28,12 @@ impl<'a> ContextLoan<'a> {
|
||||
loan
|
||||
}
|
||||
|
||||
pub(super) fn memory(context: &'a mut ExecutionContext, view: &mut MemoryContextView) -> Self {
|
||||
let loan = Self::new(context);
|
||||
loan.context.memory = std::ptr::from_mut(view).cast();
|
||||
loan
|
||||
}
|
||||
|
||||
pub(super) fn context(&mut self) -> &mut ExecutionContext {
|
||||
self.context
|
||||
}
|
||||
|
||||
@@ -0,0 +1,266 @@
|
||||
//! Owned context-leaf preparation and synchronous checked memory entry.
|
||||
//!
|
||||
//! Source, generated code and requirements share one immutable identity. This
|
||||
//! entry is independent of instruction families and does not interpret RAX as
|
||||
//! a block exit or a memory status.
|
||||
use std::marker::PhantomData;
|
||||
use std::rc::Rc;
|
||||
|
||||
use anyhow::{Context, Result, ensure};
|
||||
use stela_compiler::{
|
||||
GuestAddress, GuestState, SOURCE_FINGERPRINT_MATERIAL, TargetCpu,
|
||||
aarch64::scalable::execution::{
|
||||
SCALABLE_EXECUTION_REQUIREMENTS_VERSION, ScalableExecutionRequirements,
|
||||
},
|
||||
context::{
|
||||
CONTEXT_LEAF_ABI, ExecutionContext,
|
||||
memory::{
|
||||
MEMORY_IMPLEMENTATION_PROFILE_ID, MemoryRequirements, MemoryStatus,
|
||||
profile_requirements,
|
||||
},
|
||||
},
|
||||
extended::{self, ScalableProfile},
|
||||
};
|
||||
use stela_core::sha256;
|
||||
|
||||
use super::{ScalableState, context::ContextLoan};
|
||||
use crate::{
|
||||
execution::{MAX_NATIVE_BYTES, platform},
|
||||
memory::domain::{DataPolicy, MemoryThread},
|
||||
};
|
||||
|
||||
/// Complete identity of the exact source and generated context leaf.
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct ScalableLeafIdentity {
|
||||
pub source_sha256: String,
|
||||
pub native_sha256: String,
|
||||
pub compiler_source_sha256: String,
|
||||
pub guest_base: GuestAddress,
|
||||
pub abi: &'static str,
|
||||
pub target_cpu: String,
|
||||
pub profile: ScalableProfile,
|
||||
pub memory_requirements: MemoryRequirements,
|
||||
pub execution_requirements_version: u32,
|
||||
pub execution_requirements: ScalableExecutionRequirements,
|
||||
/// Translation target identity, including the fixed CHECKSPNONEACTIVE choice.
|
||||
/// Runtime policy matching is required only by SCALABLE_TAG_CHECKS.
|
||||
pub memory_implementation_profile: Option<&'static str>,
|
||||
}
|
||||
|
||||
/// Memory-service outcome after the still-faulting guest instruction returned.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct MemoryFault {
|
||||
pub status: MemoryStatus,
|
||||
pub address: GuestAddress,
|
||||
pub pc: GuestAddress,
|
||||
pub completed_bytes: u64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum ScalableLeafExit {
|
||||
Returned,
|
||||
/// Effective controls or platform storage declined before native entry.
|
||||
EntryDeclined(MemoryStatus),
|
||||
/// Includes architectural faults and explicit callback service failures.
|
||||
MemoryFault(MemoryFault),
|
||||
/// The body returned, but common fault settlement or domain health failed.
|
||||
/// Original architectural fault provenance remains distinct from this failure.
|
||||
FinalizationFailed {
|
||||
status: MemoryStatus,
|
||||
native_executed: bool,
|
||||
completed_bytes: u64,
|
||||
original_fault: Option<MemoryFault>,
|
||||
},
|
||||
}
|
||||
|
||||
/// Immutable owned RX code, derived requirements and original source bytes.
|
||||
/// Calls remain serialized, matching the existing native leaf boundary.
|
||||
#[derive(Debug)]
|
||||
pub struct PreparedScalableLeaf {
|
||||
identity: ScalableLeafIdentity,
|
||||
source: Box<[u8]>,
|
||||
source_map: Box<[(GuestAddress, usize)]>,
|
||||
native_bytes: usize,
|
||||
target: TargetCpu,
|
||||
mapping: platform::Mapping,
|
||||
_serialized: PhantomData<Rc<()>>,
|
||||
}
|
||||
|
||||
impl PreparedScalableLeaf {
|
||||
/// Compile a fixed context profile and bind its requirements to that exact
|
||||
/// source. Native bytes and caller-supplied requirements are never accepted.
|
||||
pub fn prepare(
|
||||
source: &[u8],
|
||||
base: GuestAddress,
|
||||
profile: ScalableProfile,
|
||||
target: TargetCpu,
|
||||
) -> Result<Self> {
|
||||
ensure!(
|
||||
source.len() <= MAX_NATIVE_BYTES,
|
||||
"context leaf source exceeds the native preparation bound"
|
||||
);
|
||||
platform::ensure_supported()?;
|
||||
ensure!(
|
||||
target.supported(),
|
||||
"host lacks context-leaf CPU requirements"
|
||||
);
|
||||
let source: Box<[u8]> = source.into();
|
||||
let prepared = extended::prepare_leaf(&source, base, profile, target)
|
||||
.context("prepare context leaf and source requirements")?;
|
||||
let native = prepared.native;
|
||||
let requirements = prepared.memory_requirements;
|
||||
ensure!(
|
||||
!native.x86_64_code.is_empty() && native.x86_64_code.len() <= MAX_NATIVE_BYTES,
|
||||
"generated context leaf exceeds the native preparation bound"
|
||||
);
|
||||
let identity = ScalableLeafIdentity {
|
||||
source_sha256: sha256(&source),
|
||||
native_sha256: sha256(&native.x86_64_code),
|
||||
compiler_source_sha256: sha256(SOURCE_FINGERPRINT_MATERIAL.as_bytes()),
|
||||
guest_base: base,
|
||||
abi: CONTEXT_LEAF_ABI,
|
||||
target_cpu: target.id(),
|
||||
profile,
|
||||
memory_requirements: requirements,
|
||||
execution_requirements_version: SCALABLE_EXECUTION_REQUIREMENTS_VERSION,
|
||||
execution_requirements: prepared.execution_requirements,
|
||||
memory_implementation_profile: (requirements.required_profile
|
||||
& profile_requirements::NATIVE_ACCESS
|
||||
!= 0)
|
||||
.then_some(MEMORY_IMPLEMENTATION_PROFILE_ID),
|
||||
};
|
||||
let mapping = platform::Mapping::new(&native.x86_64_code)?;
|
||||
Ok(Self {
|
||||
identity,
|
||||
source,
|
||||
source_map: native.source_map.into_boxed_slice(),
|
||||
native_bytes: native.x86_64_code.len(),
|
||||
target,
|
||||
mapping,
|
||||
_serialized: PhantomData,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn identity(&self) -> &ScalableLeafIdentity {
|
||||
&self.identity
|
||||
}
|
||||
|
||||
pub fn source(&self) -> &[u8] {
|
||||
&self.source
|
||||
}
|
||||
|
||||
pub fn source_map(&self) -> &[(GuestAddress, usize)] {
|
||||
&self.source_map
|
||||
}
|
||||
|
||||
pub fn native_bytes(&self) -> usize {
|
||||
self.native_bytes
|
||||
}
|
||||
|
||||
/// Invoke after complete-body memory preflight and owned-view validation.
|
||||
/// Platform declines leave guest state unchanged. Genuine faults retain
|
||||
/// completed preceding instructions and the memory service's reached prefix.
|
||||
///
|
||||
/// # Safety
|
||||
/// The CPU owner must establish that the prepared guest feature/SMCR profile
|
||||
/// and `profile.required_dit()` match effective controls, and current-EL
|
||||
/// FP/SVE/SME access is enabled (including CPACR/CPTR trap permissions).
|
||||
/// Native memory requires little-endian data execution,
|
||||
/// AlignmentEnforced=false and CPA2 disabled.
|
||||
/// View validation and memory preflight do not observe those CPU controls;
|
||||
/// memory preflight separately validates effective SA/SA0 and its requested
|
||||
/// named memory implementation profile.
|
||||
/// The source must be trusted to return in finite time. Guest backing storage
|
||||
/// must remain disjoint from guest register owners, this RX mapping, context,
|
||||
/// native stack and live Rust references for the synchronous invocation.
|
||||
/// The backing owners must uphold their pinned-host-rights contract. No
|
||||
/// signal recovery or unwind through generated native code is provided.
|
||||
pub unsafe fn execute<P: DataPolicy>(
|
||||
&self,
|
||||
registers: &mut GuestState,
|
||||
scalable: &mut ScalableState,
|
||||
memory: &mut MemoryThread<P>,
|
||||
context: &mut ExecutionContext,
|
||||
) -> Result<ScalableLeafExit> {
|
||||
ensure!(
|
||||
context.has_supported_header(),
|
||||
"unsupported execution context"
|
||||
);
|
||||
ensure!(
|
||||
self.target.supported(),
|
||||
"context-leaf host requirements changed"
|
||||
);
|
||||
ensure!(
|
||||
scalable.vector_length() == self.identity.profile.vector_length()
|
||||
&& scalable.mode() == self.identity.profile.mode(),
|
||||
"owned scalable state differs from prepared profile"
|
||||
);
|
||||
// SAFETY: The state owner retains all register allocations. The nested
|
||||
// guards restore service pointers before their respective loans expire;
|
||||
// the execution caller supplies disjoint backing and finite execution.
|
||||
unsafe {
|
||||
scalable.with_view(|view| {
|
||||
let mut scalable_loan = ContextLoan::scalable(context, view);
|
||||
self.identity
|
||||
.profile
|
||||
.validate_view(scalable_loan.context(), view)?;
|
||||
let entry = match memory.prepare(self.identity.memory_requirements) {
|
||||
Ok(entry) => entry,
|
||||
Err(status) => return Ok(ScalableLeafExit::EntryDeclined(status)),
|
||||
};
|
||||
let mut native_executed = false;
|
||||
let mut completed_bytes = 0;
|
||||
let mut original_fault = None;
|
||||
let result = entry.with_checked_view(|memory_view| {
|
||||
let mut memory_loan = ContextLoan::memory(scalable_loan.context(), memory_view);
|
||||
self.mapping
|
||||
.call_context(registers, memory_loan.context())?;
|
||||
native_executed = true;
|
||||
completed_bytes = memory_view.completed_bytes;
|
||||
let status = memory_status(memory_view.fault_kind)?;
|
||||
if status == MemoryStatus::Success {
|
||||
return Ok(ScalableLeafExit::Returned);
|
||||
}
|
||||
let fault = MemoryFault {
|
||||
status,
|
||||
address: GuestAddress(memory_view.fault_address),
|
||||
pc: GuestAddress(memory_view.fault_pc),
|
||||
completed_bytes: memory_view.completed_bytes,
|
||||
};
|
||||
// Checked finalization can discard the callback result.
|
||||
// Retain the original fault before validating its source PC.
|
||||
original_fault = Some(fault);
|
||||
ensure!(
|
||||
self.source_map
|
||||
.iter()
|
||||
.any(|(address, _)| *address == fault.pc),
|
||||
"memory service reported a PC outside the consumed source"
|
||||
);
|
||||
Ok(ScalableLeafExit::MemoryFault(fault))
|
||||
});
|
||||
match result {
|
||||
Ok(exit) => exit,
|
||||
Err(status) => Ok(ScalableLeafExit::FinalizationFailed {
|
||||
status,
|
||||
native_executed,
|
||||
completed_bytes,
|
||||
original_fault,
|
||||
}),
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn memory_status(raw: u32) -> Result<MemoryStatus> {
|
||||
MemoryStatus::from_code(raw)
|
||||
.ok_or_else(|| anyhow::anyhow!("memory service returned an unknown status {raw}"))
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
test,
|
||||
target_arch = "x86_64",
|
||||
any(target_os = "macos", target_os = "linux")
|
||||
))]
|
||||
#[path = "leaf/tests.rs"]
|
||||
mod tests;
|
||||
@@ -0,0 +1,188 @@
|
||||
//! Actual generated-leaf consumers of the provider's test-only late failure.
|
||||
use super::*;
|
||||
|
||||
const ACTIVE_LOAD_BYTES: u64 = 2;
|
||||
const REENTRY_X0_SENTINEL: u64 = 0x9abc_def0_1234_5678;
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
enum LateFailure {
|
||||
Returned,
|
||||
CallbackFault,
|
||||
StackFault,
|
||||
InvalidFaultPc,
|
||||
Reentry,
|
||||
}
|
||||
|
||||
fn mxcsr() -> u32 {
|
||||
let mut value = 0_u32;
|
||||
// SAFETY: STMXCSR writes exactly this live aligned u32 on x86-64.
|
||||
unsafe {
|
||||
std::arch::asm!("stmxcsr [{pointer}]", pointer = in(reg) &mut value,
|
||||
options(nostack, preserves_flags));
|
||||
}
|
||||
value
|
||||
}
|
||||
|
||||
struct HostMxcsr(u32);
|
||||
impl HostMxcsr {
|
||||
fn seeded() -> Self {
|
||||
let previous = mxcsr();
|
||||
const PRECISION_STICKY: u32 = 1 << 5;
|
||||
// SAFETY: preserve every effective mask/control and set one legal sticky bit.
|
||||
unsafe { Self::write(previous | PRECISION_STICKY) };
|
||||
Self(previous)
|
||||
}
|
||||
|
||||
unsafe fn write(value: u32) {
|
||||
// SAFETY: the caller supplies an already valid host MXCSR value.
|
||||
unsafe {
|
||||
std::arch::asm!("ldmxcsr [{pointer}]", pointer = in(reg) &value,
|
||||
options(nostack, preserves_flags));
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Drop for HostMxcsr {
|
||||
fn drop(&mut self) {
|
||||
// SAFETY: restore the exact legal value captured on this test thread.
|
||||
unsafe { Self::write(self.0) };
|
||||
}
|
||||
}
|
||||
|
||||
fn assert_scalable_storage(actual: &ScalableState, before: &ScalableState) {
|
||||
assert_eq!(actual.length, before.length);
|
||||
assert_eq!(actual.sme2, before.sme2);
|
||||
assert_eq!(actual.mode, before.mode);
|
||||
assert_eq!(actual.tpidr2_el0, before.tpidr2_el0);
|
||||
assert_eq!(actual.fpmr, before.fpmr);
|
||||
assert_eq!(actual.vectors, before.vectors);
|
||||
assert_eq!(actual.matrices, before.matrices);
|
||||
}
|
||||
|
||||
fn late_failure(case: LateFailure) {
|
||||
let stack_fault = matches!(case, LateFailure::StackFault);
|
||||
let callback_fault = matches!(
|
||||
case,
|
||||
LateFailure::CallbackFault | LateFailure::InvalidFaultPc | LateFailure::Reentry
|
||||
);
|
||||
let load = if stack_fault {
|
||||
LD1B_Z1_P0_SP
|
||||
} else {
|
||||
LD1B_Z1_P0_X5
|
||||
};
|
||||
let mut leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[MOV_X0_SEVEN, load, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
if matches!(case, LateFailure::InvalidFaultPc) {
|
||||
// Deliberately corrupt only test metadata so PC validation itself fails.
|
||||
leaf.source_map = leaf
|
||||
.source_map
|
||||
.iter()
|
||||
.copied()
|
||||
.filter(|(pc, _)| pc.0 != GUEST_BASE + size_of::<u32>() as u64)
|
||||
.collect::<Vec<_>>()
|
||||
.into_boxed_slice();
|
||||
}
|
||||
let (storage, mut memory) = owner(false, callback_fault);
|
||||
let ram_before = storage.bytes();
|
||||
let (mut registers, mut scalable) = state();
|
||||
scalable
|
||||
.apply_mode(&mut registers, ScalableMode::new(true, true))
|
||||
.unwrap();
|
||||
scalable.matrices.as_mut().unwrap().fill(0x6d);
|
||||
scalable
|
||||
.apply_mode(&mut registers, profile().mode())
|
||||
.unwrap();
|
||||
scalable.set_tpidr2_el0(0x1234_5678_9abc_def0);
|
||||
scalable.set_fpmr(0x2468_ace0);
|
||||
if stack_fault {
|
||||
registers.sp = RAM_BASE + 1;
|
||||
scalable.write_predicate(0, &[0, 0]).unwrap();
|
||||
}
|
||||
let scalable_before = scalable.clone();
|
||||
let mut expected = registers.clone();
|
||||
expected.x[0] = 7;
|
||||
if !stack_fault && !callback_fault {
|
||||
expected.v[DESTINATION as usize] = [u64::from_le_bytes([0, 1, 0, 0, 0, 0, 0, 0]), 0];
|
||||
}
|
||||
let original_fault = if stack_fault {
|
||||
Some(MemoryFault {
|
||||
status: MemoryStatus::StackAlignment,
|
||||
address: GuestAddress(RAM_BASE + 1),
|
||||
pc: GuestAddress(GUEST_BASE + size_of::<u32>() as u64),
|
||||
completed_bytes: 0,
|
||||
})
|
||||
} else if callback_fault {
|
||||
Some(MemoryFault {
|
||||
status: MemoryStatus::Permission,
|
||||
address: GuestAddress(RAM_BASE + 1),
|
||||
pc: GuestAddress(GUEST_BASE + size_of::<u32>() as u64),
|
||||
completed_bytes: 1,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let mut context = context();
|
||||
let pointers = (context.memory, context.scalable, context.system);
|
||||
let _mxcsr_guard = HostMxcsr::seeded();
|
||||
let mxcsr_before = mxcsr();
|
||||
memory.inject_post_body_failure_once_for_test();
|
||||
// SAFETY: finite real generated leaf, explicit CPU controls and disjoint
|
||||
// pinned owners. Provider injection runs only after the actual body returns.
|
||||
let exit =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }.unwrap();
|
||||
assert_eq!(
|
||||
exit,
|
||||
ScalableLeafExit::FinalizationFailed {
|
||||
status: MemoryStatus::Domain,
|
||||
native_executed: true,
|
||||
completed_bytes: original_fault
|
||||
.map_or(ACTIVE_LOAD_BYTES, |fault| fault.completed_bytes),
|
||||
original_fault,
|
||||
}
|
||||
);
|
||||
assert_eq!(registers, expected);
|
||||
assert_scalable_storage(&scalable, &scalable_before);
|
||||
assert_eq!(storage.bytes(), ram_before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
assert_eq!(mxcsr(), mxcsr_before);
|
||||
if matches!(case, LateFailure::Reentry) {
|
||||
registers.x[0] = REENTRY_X0_SENTINEL;
|
||||
expected.x[0] = REENTRY_X0_SENTINEL;
|
||||
// SAFETY: same finite source and owners; failed real domain must decline
|
||||
// before executing another prefix or modifying any architectural state.
|
||||
let exit =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }
|
||||
.unwrap();
|
||||
assert_eq!(exit, ScalableLeafExit::EntryDeclined(MemoryStatus::Domain));
|
||||
assert_eq!(registers, expected);
|
||||
assert_scalable_storage(&scalable, &scalable_before);
|
||||
assert_eq!(storage.bytes(), ram_before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
assert_eq!(mxcsr(), mxcsr_before);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn returned_native_body_cannot_escape_failed_health_finalization() {
|
||||
late_failure(LateFailure::Returned);
|
||||
}
|
||||
#[test]
|
||||
fn callback_fault_keeps_original_prefix_after_failed_finalization() {
|
||||
late_failure(LateFailure::CallbackFault);
|
||||
}
|
||||
#[test]
|
||||
fn emitted_inactive_sp_fault_keeps_original_provenance_after_failed_finalization() {
|
||||
late_failure(LateFailure::StackFault);
|
||||
}
|
||||
#[test]
|
||||
fn pc_validation_error_cannot_discard_fault_during_failed_finalization() {
|
||||
late_failure(LateFailure::InvalidFaultPc);
|
||||
}
|
||||
#[test]
|
||||
fn failed_finalization_restores_owners_and_blocks_next_entry() {
|
||||
late_failure(LateFailure::Reentry);
|
||||
}
|
||||
@@ -0,0 +1,598 @@
|
||||
#[path = "finalization_tests.rs"]
|
||||
mod finalization_tests;
|
||||
|
||||
use super::*;
|
||||
use crate::memory::{
|
||||
backing::{AccessPermissions, MemoryBacking, MemoryView},
|
||||
domain::{MappingAttributes, MemoryDomain, MemorySystem},
|
||||
policy::{LowerAddressProfile, MemoryControls, TagCheckFaultMode},
|
||||
};
|
||||
use std::{
|
||||
alloc::{Layout, alloc_zeroed, dealloc},
|
||||
ptr::NonNull,
|
||||
sync::Arc,
|
||||
};
|
||||
use stela_compiler::{
|
||||
aarch64::scalable::{ScalableMode, VectorLength},
|
||||
context::{ScalableStateView, memory::MemoryImplementationProfile},
|
||||
};
|
||||
|
||||
const RET_X30: u32 = 0xd65f_03c0;
|
||||
const NOP: u32 = 0xd503_201f;
|
||||
const MOV_X0_SEVEN: u32 = 0xd280_00e0;
|
||||
// MOVZ XZR, #2 stages a Permission-shaped value in host RAX without changing
|
||||
// any guest register. RET leaves that host return register unconstrained.
|
||||
const MOV_XZR_PERMISSION: u32 = 0xd280_005f;
|
||||
const LD1B_Z1_P0_X5: u32 = 0xa400_a0a1;
|
||||
const LD1B_Z1_P0_SP: u32 = 0xa400_a3e1;
|
||||
const LD1D_Z1_P0_X5: u32 = 0xa5e0_a0a1;
|
||||
const GUEST_BASE: u64 = 0x1000;
|
||||
const RAM_BASE: u64 = 0x1400_74000;
|
||||
const RAM_BYTES: usize = 8192;
|
||||
const GRANULE_BYTES: usize = 16;
|
||||
const DESTINATION: u8 = 1;
|
||||
const BASE_REGISTER: usize = 5;
|
||||
const DECLARED_ADDRESS_BITS: u8 = 39;
|
||||
const PERMISSIONS: AccessPermissions = AccessPermissions {
|
||||
readable: true,
|
||||
writable: true,
|
||||
executable: false,
|
||||
};
|
||||
|
||||
struct Storage {
|
||||
pointer: NonNull<u8>,
|
||||
layout: Layout,
|
||||
}
|
||||
// SAFETY: bytes have no Rust references; tests access them only outside each
|
||||
// serialized domain invocation, and the Arc owns their complete live extent.
|
||||
unsafe impl Send for Storage {}
|
||||
// SAFETY: sharing retains only raw storage metadata; no method accesses bytes
|
||||
// concurrently with native execution or another domain writer.
|
||||
unsafe impl Sync for Storage {}
|
||||
impl Storage {
|
||||
fn new() -> Arc<Self> {
|
||||
let layout = Layout::from_size_align(RAM_BYTES, GRANULE_BYTES).unwrap();
|
||||
// SAFETY: valid initialized allocation; the matching owner deallocates it.
|
||||
let pointer = NonNull::new(unsafe { alloc_zeroed(layout) }).unwrap();
|
||||
for offset in 0..RAM_BYTES {
|
||||
// SAFETY: fresh exclusive initialized storage before publication.
|
||||
unsafe {
|
||||
pointer
|
||||
.as_ptr()
|
||||
.add(offset)
|
||||
.write((offset & u8::MAX as usize) as u8);
|
||||
}
|
||||
}
|
||||
Arc::new(Self { pointer, layout })
|
||||
}
|
||||
|
||||
fn bytes(&self) -> Vec<u8> {
|
||||
(0..RAM_BYTES)
|
||||
.map(|offset| {
|
||||
// SAFETY: every test calls this outside synchronous execution, with
|
||||
// no competing byte access; storage remains live through this Arc.
|
||||
unsafe { self.pointer.as_ptr().add(offset).read() }
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
impl Drop for Storage {
|
||||
fn drop(&mut self) {
|
||||
// SAFETY: the final Arc releases the exact original allocation/layout.
|
||||
unsafe {
|
||||
dealloc(self.pointer.as_ptr(), self.layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn profile() -> ScalableProfile {
|
||||
ScalableProfile::new(
|
||||
VectorLength::from_bytes(GRANULE_BYTES).unwrap(),
|
||||
ScalableMode::new(true, false),
|
||||
)
|
||||
}
|
||||
fn words(input: &[u32]) -> Vec<u8> {
|
||||
input.iter().flat_map(|word| word.to_le_bytes()).collect()
|
||||
}
|
||||
fn unbound_controls(asynchronous: bool) -> MemoryControls {
|
||||
MemoryControls::new(
|
||||
LowerAddressProfile::new(DECLARED_ADDRESS_BITS, asynchronous).unwrap(),
|
||||
false,
|
||||
asynchronous,
|
||||
false,
|
||||
if asynchronous {
|
||||
TagCheckFaultMode::Asynchronous
|
||||
} else {
|
||||
TagCheckFaultMode::Ignore
|
||||
},
|
||||
false,
|
||||
)
|
||||
}
|
||||
fn raw_controls(asynchronous: bool) -> MemoryControls {
|
||||
unbound_controls(asynchronous).with_effective_sp_alignment(true)
|
||||
}
|
||||
fn controls(asynchronous: bool) -> MemoryControls {
|
||||
raw_controls(asynchronous)
|
||||
.with_implementation_profile(MemoryImplementationProfile::ScalableTagChecks)
|
||||
}
|
||||
fn owner(
|
||||
asynchronous: bool,
|
||||
split_permission: bool,
|
||||
) -> (Arc<Storage>, MemoryThread<MemoryControls>) {
|
||||
let storage = Storage::new();
|
||||
// SAFETY: raw allocation remains owned, disjoint and RW; no byte references
|
||||
// exist, and all published accesses use this one serialized domain.
|
||||
let backing = unsafe {
|
||||
MemoryBacking::new(
|
||||
storage.pointer,
|
||||
RAM_BYTES,
|
||||
PERMISSIONS,
|
||||
Arc::clone(&storage),
|
||||
)
|
||||
}
|
||||
.unwrap();
|
||||
let views = if split_permission {
|
||||
vec![
|
||||
MemoryView::new(Arc::clone(&backing), RAM_BASE, 0, 1, PERMISSIONS).unwrap(),
|
||||
MemoryView::new(
|
||||
backing,
|
||||
RAM_BASE + 1,
|
||||
1,
|
||||
RAM_BYTES - 1,
|
||||
AccessPermissions {
|
||||
readable: false,
|
||||
writable: false,
|
||||
executable: false,
|
||||
},
|
||||
)
|
||||
.unwrap(),
|
||||
]
|
||||
} else {
|
||||
vec![MemoryView::new(backing, RAM_BASE, 0, RAM_BYTES, PERMISSIONS).unwrap()]
|
||||
};
|
||||
let views = views
|
||||
.into_iter()
|
||||
.map(|view| {
|
||||
(
|
||||
view,
|
||||
MappingAttributes {
|
||||
tagged: false,
|
||||
shareable: true,
|
||||
},
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
let domain = MemoryDomain::new(
|
||||
MemorySystem::new(GRANULE_BYTES as u64, GRANULE_BYTES).unwrap(),
|
||||
views,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
(storage, domain.thread(controls(asynchronous)))
|
||||
}
|
||||
fn state() -> (GuestState, ScalableState) {
|
||||
let mut registers = GuestState::default();
|
||||
let mut scalable = ScalableState::new(profile().vector_length(), true);
|
||||
scalable
|
||||
.apply_mode(&mut registers, profile().mode())
|
||||
.unwrap();
|
||||
registers.x[BASE_REGISTER] = RAM_BASE;
|
||||
scalable
|
||||
.write_z(&mut registers, DESTINATION, &[0xa5; GRANULE_BYTES])
|
||||
.unwrap();
|
||||
scalable.write_predicate(0, &[3, 0]).unwrap();
|
||||
(registers, scalable)
|
||||
}
|
||||
fn context() -> ExecutionContext {
|
||||
ExecutionContext {
|
||||
memory: std::ptr::dangling_mut::<u8>().cast(),
|
||||
scalable: std::ptr::dangling_mut::<ScalableStateView>(),
|
||||
system: std::ptr::dangling_mut::<u8>().cast(),
|
||||
..ExecutionContext::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn source_and_requirements_are_owned_not_caller_supplied() {
|
||||
let mut input = words(&[LD1B_Z1_P0_X5, RET_X30]);
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&input,
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let original = input.clone();
|
||||
input.fill(0);
|
||||
assert_eq!(leaf.source(), original);
|
||||
assert_eq!(leaf.identity().source_sha256, sha256(&original));
|
||||
assert_eq!(leaf.identity().abi, CONTEXT_LEAF_ABI);
|
||||
assert_eq!(
|
||||
leaf.identity().memory_implementation_profile,
|
||||
Some(MEMORY_IMPLEMENTATION_PROFILE_ID)
|
||||
);
|
||||
assert_eq!(leaf.identity().memory_requirements.required_host_caps, 0);
|
||||
assert_eq!(leaf.source_map()[0].0, GuestAddress(GUEST_BASE));
|
||||
assert!(leaf.native_bytes() > extended::CONTEXT_WRAPPER_BYTES);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pure_ret_ignores_unconstrained_rax_and_restores_context() {
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[NOP, MOV_XZR_PERMISSION, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let (_storage, mut memory) = owner(false, false);
|
||||
*memory.policy_mut() = raw_controls(false);
|
||||
assert_eq!(leaf.identity().memory_implementation_profile, None);
|
||||
let (mut registers, mut scalable) = state();
|
||||
let before = registers.clone();
|
||||
let mut context = context();
|
||||
let pointers = (context.memory, context.scalable, context.system);
|
||||
// SAFETY: declared test CPU controls match this fixed profile; all owners
|
||||
// are disjoint and source is a finite NOP/MOVZ/RET leaf.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }.unwrap();
|
||||
assert_eq!(result, ScalableLeafExit::Returned);
|
||||
assert_eq!(registers, before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn checked_async_preflight_precedes_the_gpr_prefix() {
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[MOV_X0_SEVEN, LD1B_Z1_P0_X5, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let (_storage, mut memory) = owner(true, false);
|
||||
let (mut registers, mut scalable) = state();
|
||||
let before = registers.clone();
|
||||
let mut context = context();
|
||||
let pointers = (context.memory, context.scalable, context.system);
|
||||
// SAFETY: owners are disjoint and the finite declared profile is explicit;
|
||||
// effective async controls must decline before invoking any native byte.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }.unwrap();
|
||||
assert_eq!(
|
||||
result,
|
||||
ScalableLeafExit::EntryDeclined(MemoryStatus::Unsupported)
|
||||
);
|
||||
assert_eq!(registers, before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn missing_runtime_atomic_capability_precedes_the_gpr_prefix() {
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[MOV_X0_SEVEN, LD1D_Z1_P0_X5, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let (_storage, mut memory) = owner(false, false);
|
||||
let (mut registers, mut scalable) = state();
|
||||
let before = registers.clone();
|
||||
// SAFETY: a finite profile and disjoint owners; the baseline domain lacks
|
||||
// this body's source-derived generic multibyte AtomicLoad16 requirement.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context()) }
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
result,
|
||||
ScalableLeafExit::EntryDeclined(MemoryStatus::Unsupported)
|
||||
);
|
||||
assert_eq!(registers, before);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn later_memory_fault_retains_prefix_but_not_the_staged_destination() {
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[MOV_X0_SEVEN, LD1B_Z1_P0_X5, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
for permission in [false, true] {
|
||||
let (storage, mut memory) = owner(false, permission);
|
||||
let ram_before = storage.bytes();
|
||||
let (mut registers, mut scalable) = state();
|
||||
registers.x[BASE_REGISTER] = if permission {
|
||||
RAM_BASE
|
||||
} else {
|
||||
RAM_BASE + RAM_BYTES as u64 - 1
|
||||
};
|
||||
let mut expected = registers.clone();
|
||||
expected.x[0] = 7;
|
||||
let mut context = context();
|
||||
let pointers = (context.memory, context.scalable, context.system);
|
||||
// SAFETY: disjoint pinned owners and finite fixed-profile source. The
|
||||
// controlled service fault returns normally through the inner wrapper.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }
|
||||
.unwrap();
|
||||
let status = if permission {
|
||||
MemoryStatus::Permission
|
||||
} else {
|
||||
MemoryStatus::Translation
|
||||
};
|
||||
let fault_address = if permission {
|
||||
RAM_BASE + 1
|
||||
} else {
|
||||
RAM_BASE + RAM_BYTES as u64
|
||||
};
|
||||
assert_eq!(
|
||||
result,
|
||||
ScalableLeafExit::MemoryFault(MemoryFault {
|
||||
status,
|
||||
address: GuestAddress(fault_address),
|
||||
pc: GuestAddress(GUEST_BASE + size_of::<u32>() as u64),
|
||||
completed_bytes: 1,
|
||||
})
|
||||
);
|
||||
assert_eq!(registers, expected);
|
||||
assert_eq!(storage.bytes(), ram_before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn checked_streaming_profile_is_validated_before_the_gpr_prefix() {
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[MOV_X0_SEVEN, LD1B_Z1_P0_X5, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
for implementation in [
|
||||
None,
|
||||
Some(MemoryImplementationProfile::StreamingSveTagSuppression),
|
||||
Some(MemoryImplementationProfile::SmeTagSuppression),
|
||||
Some(MemoryImplementationProfile::ScalableTagChecks),
|
||||
] {
|
||||
let (storage, mut memory) = owner(false, false);
|
||||
let policy = raw_controls(false);
|
||||
*memory.policy_mut() = match implementation {
|
||||
Some(implementation) => policy.with_implementation_profile(implementation),
|
||||
None => policy,
|
||||
};
|
||||
let ram_before = storage.bytes();
|
||||
let (mut registers, mut scalable) = state();
|
||||
let mut expected = registers.clone();
|
||||
let mut context = context();
|
||||
let pointers = (context.memory, context.scalable, context.system);
|
||||
// SAFETY: disjoint owned buffers and finite source. The strict named
|
||||
// artifact contract is independent of current ATA/TCO/TBI bypasses.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }
|
||||
.unwrap();
|
||||
if implementation == Some(MemoryImplementationProfile::ScalableTagChecks) {
|
||||
expected.x[0] = 7;
|
||||
expected.v[DESTINATION as usize] = [u64::from_le_bytes([0, 1, 0, 0, 0, 0, 0, 0]), 0];
|
||||
assert_eq!(result, ScalableLeafExit::Returned);
|
||||
} else {
|
||||
assert_eq!(
|
||||
result,
|
||||
ScalableLeafExit::EntryDeclined(MemoryStatus::Unsupported)
|
||||
);
|
||||
}
|
||||
assert_eq!(registers, expected);
|
||||
assert_eq!(storage.bytes(), ram_before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unknown_or_disabled_sp_alignment_preflight_precedes_the_gpr_prefix() {
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[MOV_X0_SEVEN, LD1B_Z1_P0_SP, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
for effective_sp_alignment in [None, Some(false)] {
|
||||
let (storage, mut memory) = owner(false, false);
|
||||
let policy = unbound_controls(false)
|
||||
.with_implementation_profile(MemoryImplementationProfile::ScalableTagChecks);
|
||||
*memory.policy_mut() = match effective_sp_alignment {
|
||||
Some(enabled) => policy.with_effective_sp_alignment(enabled),
|
||||
None => policy,
|
||||
};
|
||||
let ram_before = storage.bytes();
|
||||
let (mut registers, mut scalable) = state();
|
||||
registers.sp = RAM_BASE + 1;
|
||||
let before = registers.clone();
|
||||
let mut context = context();
|
||||
let pointers = (context.memory, context.scalable, context.system);
|
||||
// SAFETY: disjoint owners and finite source. Unknown or disabled SA0/SA
|
||||
// declines this Enabled specialization before MOV, local SP or RAM.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
result,
|
||||
ScalableLeafExit::EntryDeclined(MemoryStatus::Unsupported)
|
||||
);
|
||||
assert_eq!(registers, before);
|
||||
assert_eq!(storage.bytes(), ram_before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn inactive_sp_fault_is_local_and_the_next_entry_clears_it() {
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[MOV_X0_SEVEN, LD1B_Z1_P0_SP, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let (storage, mut memory) = owner(false, false);
|
||||
let ram_before = storage.bytes();
|
||||
let (mut registers, mut scalable) = state();
|
||||
scalable.write_predicate(0, &[0, 0]).unwrap();
|
||||
registers.sp = RAM_BASE + 1;
|
||||
let mut expected = registers.clone();
|
||||
expected.x[0] = 7;
|
||||
let mut context = context();
|
||||
let pointers = (context.memory, context.scalable, context.system);
|
||||
// SAFETY: the finite body has disjoint owned buffers. The declared SA0 and
|
||||
// CHECKSPNONEACTIVE profile faults before issuing any memory request.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }.unwrap();
|
||||
assert_eq!(
|
||||
result,
|
||||
ScalableLeafExit::MemoryFault(MemoryFault {
|
||||
status: MemoryStatus::StackAlignment,
|
||||
address: GuestAddress(RAM_BASE + 1),
|
||||
pc: GuestAddress(GUEST_BASE + size_of::<u32>() as u64),
|
||||
completed_bytes: 0,
|
||||
})
|
||||
);
|
||||
assert_eq!(registers, expected);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
registers.sp = RAM_BASE;
|
||||
expected.sp = RAM_BASE;
|
||||
expected.v[DESTINATION as usize] = [0; 2];
|
||||
// SAFETY: identical owners and finite source; aligned inactive loads perform
|
||||
// no guest RAM access and commit their architectural zero destination.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) }.unwrap();
|
||||
assert_eq!(result, ScalableLeafExit::Returned);
|
||||
assert_eq!(registers, expected);
|
||||
assert_eq!(storage.bytes(), ram_before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn baseline_byte_load_preserves_enabled_vector_banks_at_every_length() {
|
||||
for bytes in [16, 32, 64, 128, 256] {
|
||||
let profile = ScalableProfile::new(
|
||||
VectorLength::from_bytes(bytes).unwrap(),
|
||||
ScalableMode::new(true, false),
|
||||
);
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[LD1B_Z1_P0_X5, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let (storage, mut memory) = owner(false, false);
|
||||
let mut registers = GuestState::default();
|
||||
let mut scalable = ScalableState::new(profile.vector_length(), true);
|
||||
scalable.apply_mode(&mut registers, profile.mode()).unwrap();
|
||||
scalable.set_tpidr2_el0(0x1234_5678_9abc_def0);
|
||||
scalable.set_fpmr(0x2468_ace0);
|
||||
let controls_before = (scalable.tpidr2_el0(), scalable.fpmr(), scalable.mode());
|
||||
registers.x[BASE_REGISTER] = RAM_BASE;
|
||||
registers.nzcv = 0xa000_0000;
|
||||
registers.fpcr = 0x07c0_0000;
|
||||
registers.fpsr = 0x8800_009f;
|
||||
for register in 0..32 {
|
||||
scalable
|
||||
.write_z(&mut registers, register, &vec![register + 1; bytes])
|
||||
.unwrap();
|
||||
}
|
||||
for predicate in 0..16 {
|
||||
scalable
|
||||
.write_predicate(predicate, &vec![predicate.wrapping_mul(17); bytes / 8])
|
||||
.unwrap();
|
||||
}
|
||||
scalable.write_predicate(0, &vec![0x55; bytes / 8]).unwrap();
|
||||
scalable.write_ffr(&vec![0xa5; bytes / 8]).unwrap();
|
||||
let before = registers.clone();
|
||||
let ram = storage.bytes();
|
||||
// SAFETY: fixed declared CPU controls, disjoint pinned owners and finite
|
||||
// baseline byte accesses; caller-saved host values are not guest state.
|
||||
let result =
|
||||
unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context()) }
|
||||
.unwrap();
|
||||
assert_eq!(result, ScalableLeafExit::Returned);
|
||||
let output: Vec<u8> = (0..bytes)
|
||||
.map(|byte| if byte % 2 == 0 { ram[byte] } else { 0 })
|
||||
.collect();
|
||||
let mut expected = before;
|
||||
for (limb, value) in expected.v[DESTINATION as usize].iter_mut().zip(
|
||||
output[..GRANULE_BYTES]
|
||||
.as_chunks::<{ size_of::<u64>() }>()
|
||||
.0,
|
||||
) {
|
||||
*limb = u64::from_le_bytes(*value);
|
||||
}
|
||||
assert_eq!(registers, expected);
|
||||
for register in 0..32 {
|
||||
let mut actual = vec![0; bytes];
|
||||
scalable.read_z(®isters, register, &mut actual).unwrap();
|
||||
assert_eq!(
|
||||
actual,
|
||||
if register == DESTINATION {
|
||||
output.clone()
|
||||
} else {
|
||||
vec![register + 1; bytes]
|
||||
}
|
||||
);
|
||||
}
|
||||
for predicate in 0..16 {
|
||||
let mut actual = vec![0; bytes / 8];
|
||||
scalable.read_predicate(predicate, &mut actual).unwrap();
|
||||
assert_eq!(
|
||||
actual,
|
||||
vec![
|
||||
if predicate == 0 {
|
||||
0x55
|
||||
} else {
|
||||
predicate.wrapping_mul(17)
|
||||
};
|
||||
bytes / 8
|
||||
]
|
||||
);
|
||||
}
|
||||
let mut ffr = vec![0; bytes / 8];
|
||||
scalable.read_ffr(&mut ffr).unwrap();
|
||||
assert_eq!(ffr, vec![0xa5; bytes / 8]);
|
||||
assert_eq!(
|
||||
(scalable.tpidr2_el0(), scalable.fpmr(), scalable.mode()),
|
||||
controls_before
|
||||
);
|
||||
assert_eq!(storage.bytes(), ram);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_owned_view_restores_pointers_before_returning_error() {
|
||||
let profile = ScalableProfile::new(
|
||||
VectorLength::from_bytes(GRANULE_BYTES).unwrap(),
|
||||
ScalableMode::new(true, true),
|
||||
);
|
||||
let leaf = PreparedScalableLeaf::prepare(
|
||||
&words(&[NOP, RET_X30]),
|
||||
GuestAddress(GUEST_BASE),
|
||||
profile,
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
let (_storage, mut memory) = owner(false, false);
|
||||
let mut registers = GuestState::default();
|
||||
let mut scalable = ScalableState::new(profile.vector_length(), false);
|
||||
scalable.apply_mode(&mut registers, profile.mode()).unwrap();
|
||||
let before = registers.clone();
|
||||
let mut context = context();
|
||||
let pointers = (context.memory, context.scalable, context.system);
|
||||
// SAFETY: no native call is allowed: the prepared SME2 ZA view requires ZT0,
|
||||
// while this explicit non-SME2 owner provides no ZT0 backing.
|
||||
let result = unsafe { leaf.execute(&mut registers, &mut scalable, &mut memory, &mut context) };
|
||||
assert!(result.is_err());
|
||||
assert_eq!(registers, before);
|
||||
assert_eq!((context.memory, context.scalable, context.system), pointers);
|
||||
}
|
||||
@@ -8,10 +8,12 @@ pub mod execution;
|
||||
pub mod fixed_controls;
|
||||
pub mod fixed_execution;
|
||||
pub mod identification;
|
||||
pub mod identification_snapshot;
|
||||
pub mod interrupt;
|
||||
pub mod process_memory;
|
||||
pub mod profile;
|
||||
pub mod pstate;
|
||||
pub mod scalable_controls;
|
||||
pub mod state;
|
||||
pub mod timer;
|
||||
pub mod translation;
|
||||
@@ -0,0 +1,260 @@
|
||||
//! Partial immutable named identification authority shared by MRS and qualifiers.
|
||||
//! No control/cache/device state, default CPU, guessed absence or host inference.
|
||||
mod qualifiers;
|
||||
|
||||
use super::identification::{Readback, Readbacks, Register};
|
||||
use std::{fmt, sync::Arc};
|
||||
|
||||
const STATIC_ID_COUNT: usize = 20;
|
||||
const STATIC_IDS: [Register; STATIC_ID_COUNT] = [
|
||||
Register::IdAa64Afr0El1,
|
||||
Register::IdAa64Afr1El1,
|
||||
Register::IdAa64Dfr0El1,
|
||||
Register::IdAa64Dfr1El1,
|
||||
Register::IdAa64Dfr2El1,
|
||||
Register::IdAa64Fpfr0El1,
|
||||
Register::IdAa64Isar0El1,
|
||||
Register::IdAa64Isar1El1,
|
||||
Register::IdAa64Isar2El1,
|
||||
Register::IdAa64Isar3El1,
|
||||
Register::IdAa64Mmfr0El1,
|
||||
Register::IdAa64Mmfr1El1,
|
||||
Register::IdAa64Mmfr2El1,
|
||||
Register::IdAa64Mmfr3El1,
|
||||
Register::IdAa64Mmfr4El1,
|
||||
Register::IdAa64Pfr0El1,
|
||||
Register::IdAa64Pfr1El1,
|
||||
Register::IdAa64Pfr2El1,
|
||||
Register::IdAa64Smfr0El1,
|
||||
Register::IdAa64Zfr0El1,
|
||||
];
|
||||
const DECLARATION_FORMAT: &[u8] = b"stela-partial-static-identification-v1\0";
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Origin {
|
||||
CapturedHardware,
|
||||
DeclaredGuest,
|
||||
}
|
||||
|
||||
/// Evidence identity, not independent authentication of hardware. Captured input
|
||||
/// is supplied by the trusted source owner after its acquisition verification.
|
||||
/// Retained bytes and offsets let later evidence review verify exact readbacks.
|
||||
pub struct Provenance {
|
||||
origin: Origin,
|
||||
source_identity: &'static str,
|
||||
input: Arc<[u8]>,
|
||||
input_sha256: String,
|
||||
captured_fields: Vec<(Register, usize)>,
|
||||
}
|
||||
impl Provenance {
|
||||
pub const fn origin(&self) -> Origin {
|
||||
self.origin
|
||||
}
|
||||
pub const fn source_identity(&self) -> &'static str {
|
||||
self.source_identity
|
||||
}
|
||||
pub fn input(&self) -> &[u8] {
|
||||
&self.input
|
||||
}
|
||||
pub fn input_sha256(&self) -> &str {
|
||||
&self.input_sha256
|
||||
}
|
||||
pub fn captured_fields(&self) -> &[(Register, usize)] {
|
||||
&self.captured_fields
|
||||
}
|
||||
}
|
||||
impl fmt::Debug for Provenance {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
formatter
|
||||
.debug_struct("Provenance")
|
||||
.field("origin", &self.origin)
|
||||
.field("source_identity", &self.source_identity)
|
||||
.field("input_sha256", &self.input_sha256)
|
||||
.field("input_bytes", &self.input.len())
|
||||
.finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
/// Non-Clone/non-Copy: consumers borrow this same immutable allocation. An Arc
|
||||
/// may retain its lifetime; equality of raw values does not imply source identity.
|
||||
#[derive(Debug)]
|
||||
pub struct Snapshot {
|
||||
values: [Option<u64>; STATIC_ID_COUNT],
|
||||
provenance: Provenance,
|
||||
}
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum InitializationError {
|
||||
EmptyIdentity,
|
||||
EmbeddedIdentityNul,
|
||||
EmptyCapture,
|
||||
UnownedRegister(Register),
|
||||
DuplicateRegister(Register),
|
||||
CaptureBounds {
|
||||
register: Register,
|
||||
offset: usize,
|
||||
input_bytes: usize,
|
||||
},
|
||||
}
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Unsupported {
|
||||
MissingRegister(Register),
|
||||
UnownedRegister(Register),
|
||||
Field {
|
||||
register: Register,
|
||||
field: &'static str,
|
||||
value: u8,
|
||||
},
|
||||
EntryProfile(super::profile::EntryProfileError),
|
||||
EntryProfileMismatch,
|
||||
PauthLrTuple {
|
||||
apa: u8,
|
||||
api: u8,
|
||||
apa3: u8,
|
||||
},
|
||||
BaseSpe(super::profile::UnsupportedSpe),
|
||||
}
|
||||
impl fmt::Display for Unsupported {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
formatter,
|
||||
"unsupported identification requirement: {self:?}"
|
||||
)
|
||||
}
|
||||
}
|
||||
impl std::error::Error for Unsupported {}
|
||||
impl fmt::Display for InitializationError {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(formatter, "invalid identification initialization: {self:?}")
|
||||
}
|
||||
}
|
||||
impl std::error::Error for InitializationError {}
|
||||
|
||||
fn index(register: Register) -> Option<usize> {
|
||||
STATIC_IDS
|
||||
.iter()
|
||||
.position(|candidate| *candidate == register)
|
||||
}
|
||||
fn insert(
|
||||
values: &mut [Option<u64>; STATIC_ID_COUNT],
|
||||
register: Register,
|
||||
value: u64,
|
||||
) -> Result<(), InitializationError> {
|
||||
let slot = index(register).ok_or(InitializationError::UnownedRegister(register))?;
|
||||
if values[slot].replace(value).is_some() {
|
||||
return Err(InitializationError::DuplicateRegister(register));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
impl Snapshot {
|
||||
/// An explicit software-machine declaration; every supplied value is retained.
|
||||
/// Missing IDs remain missing. Canonical declaration bytes bind the machine
|
||||
/// name and supplied values without implying hardware evidence or features.
|
||||
pub fn declared(
|
||||
machine_identity: &'static str,
|
||||
entries: &[(Register, u64)],
|
||||
) -> Result<Self, InitializationError> {
|
||||
if machine_identity.is_empty() {
|
||||
return Err(InitializationError::EmptyIdentity);
|
||||
}
|
||||
if machine_identity.as_bytes().contains(&0) {
|
||||
return Err(InitializationError::EmbeddedIdentityNul);
|
||||
}
|
||||
let mut values = [None; STATIC_ID_COUNT];
|
||||
for &(register, value) in entries {
|
||||
insert(&mut values, register, value)?;
|
||||
}
|
||||
let mut input = DECLARATION_FORMAT.to_vec();
|
||||
input.extend(machine_identity.as_bytes());
|
||||
input.push(0);
|
||||
for (slot, register) in STATIC_IDS.iter().enumerate() {
|
||||
if let Some(value) = values[slot] {
|
||||
input.extend(register.encoding().selector().to_le_bytes());
|
||||
input.extend(value.to_le_bytes());
|
||||
}
|
||||
}
|
||||
let input_sha256 = stela_core::sha256(&input);
|
||||
Ok(Self {
|
||||
values,
|
||||
provenance: Provenance {
|
||||
origin: Origin::DeclaredGuest,
|
||||
source_identity: machine_identity,
|
||||
input: input.into(),
|
||||
input_sha256,
|
||||
captured_fields: Vec::new(),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/// Trusted acquisition adapter only: it supplies verified immutable input
|
||||
/// and source-format offsets. Values are extracted here, never independently
|
||||
/// supplied or normalized. This binding does not authenticate hardware; the
|
||||
/// actual acquisition/receipt owner remains responsible for that evidence.
|
||||
#[cfg(test)]
|
||||
pub(crate) fn captured(
|
||||
source_identity: &'static str,
|
||||
input: Arc<[u8]>,
|
||||
fields: &[(Register, usize)],
|
||||
) -> Result<Self, InitializationError> {
|
||||
if source_identity.is_empty() {
|
||||
return Err(InitializationError::EmptyIdentity);
|
||||
}
|
||||
if source_identity.as_bytes().contains(&0) {
|
||||
return Err(InitializationError::EmbeddedIdentityNul);
|
||||
}
|
||||
if input.is_empty() {
|
||||
return Err(InitializationError::EmptyCapture);
|
||||
}
|
||||
let mut values = [None; STATIC_ID_COUNT];
|
||||
for &(register, offset) in fields {
|
||||
let end = offset
|
||||
.checked_add(std::mem::size_of::<u64>())
|
||||
.filter(|end| *end <= input.len())
|
||||
.ok_or(InitializationError::CaptureBounds {
|
||||
register,
|
||||
offset,
|
||||
input_bytes: input.len(),
|
||||
})?;
|
||||
let value =
|
||||
u64::from_le_bytes(input[offset..end].try_into().expect("checked u64 readback"));
|
||||
insert(&mut values, register, value)?;
|
||||
}
|
||||
let input_sha256 = stela_core::sha256(&input);
|
||||
Ok(Self {
|
||||
values,
|
||||
provenance: Provenance {
|
||||
origin: Origin::CapturedHardware,
|
||||
source_identity,
|
||||
input,
|
||||
input_sha256,
|
||||
captured_fields: fields.to_vec(),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
pub fn read(&self, register: Register) -> Result<u64, Unsupported> {
|
||||
let slot = index(register).ok_or(Unsupported::UnownedRegister(register))?;
|
||||
self.values[slot].ok_or(Unsupported::MissingRegister(register))
|
||||
}
|
||||
pub const fn provenance(&self) -> &Provenance {
|
||||
&self.provenance
|
||||
}
|
||||
pub fn same_snapshot(&self, other: &Self) -> bool {
|
||||
std::ptr::eq(self, other)
|
||||
}
|
||||
}
|
||||
impl Readbacks for Snapshot {
|
||||
fn readback(&self, readback: Readback) -> Option<u64> {
|
||||
match readback {
|
||||
Readback::Register(register) => self.read(register).ok(),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
fn conditional_tid3(&self, _: Register) -> Option<bool> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "identification_snapshot/tests.rs"]
|
||||
mod tests;
|
||||
@@ -0,0 +1,247 @@
|
||||
//! Only the source-reviewed subset needed by the current fixed EL0/EL1 owner.
|
||||
//! Unrelated raw ID bits remain opaque. No controls or raw-field copies retained.
|
||||
use super::{Register, Snapshot, Unsupported};
|
||||
use crate::system::profile::{
|
||||
BaseSpeAbsence, EntryProfile, ScalableEntryAbsence, SystemEntryFeatures,
|
||||
};
|
||||
|
||||
const FIELD_MASK: u64 = 0xf;
|
||||
const FEATURE_ABSENT: u8 = 0;
|
||||
const A64_ONLY: u8 = 1;
|
||||
const A64_AND_A32: u8 = 2;
|
||||
const APA_SHIFT: u32 = 4;
|
||||
const API_SHIFT: u32 = 8;
|
||||
const APA3_SHIFT: u32 = 12;
|
||||
const APA_QARMA5_FAULTING_COMBINED: u8 = 5;
|
||||
const RAS_BASE_VERSION: u8 = 1;
|
||||
const TGRAN4_SHIFT: u32 = 28;
|
||||
const D128_SHIFT: u32 = 32;
|
||||
const EL0_SHIFT: u32 = 0;
|
||||
const EL1_SHIFT: u32 = 4;
|
||||
const EL2_SHIFT: u32 = 8;
|
||||
const EL3_SHIFT: u32 = 12;
|
||||
const RAS_SHIFT: u32 = 28;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
struct Field {
|
||||
register: Register,
|
||||
name: &'static str,
|
||||
shift: u32,
|
||||
}
|
||||
const REQUIRED_ABSENCES: &[Field] = &[
|
||||
Field {
|
||||
register: Register::IdAa64Dfr0El1,
|
||||
name: "BRBE",
|
||||
shift: 52,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Dfr0El1,
|
||||
name: "TraceBuffer",
|
||||
shift: 44,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Dfr0El1,
|
||||
name: "PMSVer",
|
||||
shift: 32,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Dfr1El1,
|
||||
name: "EBEP",
|
||||
shift: 48,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr0El1,
|
||||
name: "DIT",
|
||||
shift: 48,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr1El1,
|
||||
name: "BT",
|
||||
shift: 0,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr1El1,
|
||||
name: "PFAR",
|
||||
shift: 60,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr1El1,
|
||||
name: "DF2",
|
||||
shift: 56,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr1El1,
|
||||
name: "GCS",
|
||||
shift: 44,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr1El1,
|
||||
name: "NMI",
|
||||
shift: 36,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr1El1,
|
||||
name: "MTE",
|
||||
shift: 8,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr1El1,
|
||||
name: "SSBS",
|
||||
shift: 4,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Pfr2El1,
|
||||
name: "UINJ",
|
||||
shift: 16,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Mmfr0El1,
|
||||
name: "ExS",
|
||||
shift: 44,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Mmfr1El1,
|
||||
name: "PAN",
|
||||
shift: 20,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Mmfr2El1,
|
||||
name: "IESB",
|
||||
shift: 12,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Mmfr2El1,
|
||||
name: "UAO",
|
||||
shift: 4,
|
||||
},
|
||||
Field {
|
||||
register: Register::IdAa64Isar2El1,
|
||||
name: "MOPS",
|
||||
shift: 16,
|
||||
},
|
||||
];
|
||||
|
||||
impl Snapshot {
|
||||
fn field(&self, field: Field) -> Result<u8, Unsupported> {
|
||||
Ok(((self.read(field.register)? >> field.shift) & FIELD_MASK) as u8)
|
||||
}
|
||||
fn require_zero(&self, field: Field) -> Result<(), Unsupported> {
|
||||
let value = self.field(field)?;
|
||||
if value != FEATURE_ABSENT {
|
||||
return Err(Unsupported::Field {
|
||||
register: field.register,
|
||||
field: field.name,
|
||||
value,
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn check_fixed_exception_levels(&self) -> Result<(), Unsupported> {
|
||||
for (name, shift) in [("EL0", EL0_SHIFT), ("EL1", EL1_SHIFT)] {
|
||||
let value = self.field(Field {
|
||||
register: Register::IdAa64Pfr0El1,
|
||||
name,
|
||||
shift,
|
||||
})?;
|
||||
if !matches!(value, A64_ONLY | A64_AND_A32) {
|
||||
return Err(Unsupported::Field {
|
||||
register: Register::IdAa64Pfr0El1,
|
||||
field: name,
|
||||
value,
|
||||
});
|
||||
}
|
||||
}
|
||||
// With no EL3, an implemented EL2 is enabled by the exact EL2Enabled
|
||||
// helper. The fixed no-EL2/no-EL3 owner therefore requires both absent.
|
||||
for (name, shift) in [("EL2", EL2_SHIFT), ("EL3", EL3_SHIFT)] {
|
||||
self.require_zero(Field {
|
||||
register: Register::IdAa64Pfr0El1,
|
||||
name,
|
||||
shift,
|
||||
})?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Require implemented AArch64 EL0/EL1 and absent EL2/EL3 from these IDs.
|
||||
/// This checks implementation/regime facts, not dynamic CurrentEL or PSTATE.
|
||||
pub fn check_el10_regime(&self) -> Result<(), Unsupported> {
|
||||
self.check_fixed_exception_levels()
|
||||
}
|
||||
|
||||
/// Derive the existing bounded entry token from these exact raw IDs. This
|
||||
/// accepts only no-SVE/no-SME and the reviewed absent optional-entry effects.
|
||||
/// It is not a whole CPU-validity check or an instruction-feature allowlist.
|
||||
pub fn entry_profile(&self) -> Result<EntryProfile, Unsupported> {
|
||||
self.check_fixed_exception_levels()?;
|
||||
for &field in REQUIRED_ABSENCES {
|
||||
self.require_zero(field)?;
|
||||
}
|
||||
// DF2=0 does not establish DoubleFault absence: PFR0.RAS>=2 identifies it.
|
||||
let ras = self.field(Field {
|
||||
register: Register::IdAa64Pfr0El1,
|
||||
name: "RAS",
|
||||
shift: RAS_SHIFT,
|
||||
})?;
|
||||
if ras > RAS_BASE_VERSION {
|
||||
return Err(Unsupported::Field {
|
||||
register: Register::IdAa64Pfr0El1,
|
||||
field: "RAS",
|
||||
value: ras,
|
||||
});
|
||||
}
|
||||
let isar1 = self.read(Register::IdAa64Isar1El1)?;
|
||||
let isar2 = self.read(Register::IdAa64Isar2El1)?;
|
||||
let apa = ((isar1 >> APA_SHIFT) & FIELD_MASK) as u8;
|
||||
let api = ((isar1 >> API_SHIFT) & FIELD_MASK) as u8;
|
||||
let apa3 = ((isar2 >> APA3_SHIFT) & FIELD_MASK) as u8;
|
||||
// This narrow source-reviewed PAuth_LR-absence path supports the current
|
||||
// Auth2 algorithm tuple or all algorithms absent. Other tuples decline;
|
||||
// it never mistakes PAuth_LR absence for general PAuth absence.
|
||||
if !matches!(
|
||||
(apa, api, apa3),
|
||||
(FEATURE_ABSENT, FEATURE_ABSENT, FEATURE_ABSENT)
|
||||
| (APA_QARMA5_FAULTING_COMBINED, FEATURE_ABSENT, FEATURE_ABSENT)
|
||||
) {
|
||||
return Err(Unsupported::PauthLrTuple { apa, api, apa3 });
|
||||
}
|
||||
let scalable = ScalableEntryAbsence::from_id_registers(
|
||||
self.read(Register::IdAa64Pfr0El1)?,
|
||||
self.read(Register::IdAa64Pfr1El1)?,
|
||||
)
|
||||
.map_err(Unsupported::EntryProfile)?;
|
||||
// Primary MTE=0 is the absence fact. MTE_frac/MTEX are invalid under that
|
||||
// primary value and are not interpreted as independent absence claims.
|
||||
EntryProfile::base(SystemEntryFeatures::declared_absent(), scalable)
|
||||
.map_err(Unsupported::EntryProfile)
|
||||
}
|
||||
|
||||
pub fn check_entry_profile(&self, profile: EntryProfile) -> Result<(), Unsupported> {
|
||||
if self.entry_profile()? != profile {
|
||||
return Err(Unsupported::EntryProfileMismatch);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn base_spe_absence(&self) -> Result<BaseSpeAbsence, Unsupported> {
|
||||
BaseSpeAbsence::from_id_aa64dfr0_el1(self.read(Register::IdAa64Dfr0El1)?)
|
||||
.map_err(Unsupported::BaseSpe)
|
||||
}
|
||||
|
||||
/// Actual feature facts only: ordinary 4KB stage1 and FEAT_D128 absent. TCR,
|
||||
/// TCR2, effective sizes/TBI/TBID/MTX and current control generation remain
|
||||
/// the existing mutable control owner's responsibility.
|
||||
pub fn check_base_el10_4k(&self) -> Result<(), Unsupported> {
|
||||
self.check_fixed_exception_levels()?;
|
||||
self.require_zero(Field {
|
||||
register: Register::IdAa64Mmfr0El1,
|
||||
name: "TGran4",
|
||||
shift: TGRAN4_SHIFT,
|
||||
})?;
|
||||
self.require_zero(Field {
|
||||
register: Register::IdAa64Mmfr3El1,
|
||||
name: "D128",
|
||||
shift: D128_SHIFT,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,310 @@
|
||||
use super::*;
|
||||
use crate::system::profile::{EntryProfile, ScalableEntryAbsence, SystemEntryFeatures};
|
||||
|
||||
const IDENTITY: &str = "declared-bounded-el01-auth2-test";
|
||||
const APA_SHIFT: u32 = 4;
|
||||
const API_SHIFT: u32 = 8;
|
||||
const APA3_SHIFT: u32 = 12;
|
||||
const APA_FAULTING_COMBINED: u64 = 5;
|
||||
const A64_EL0_EL1_NO_HIGHER_EL: u64 = 0x11;
|
||||
const FIELD_MAX: u64 = 0xf;
|
||||
const PFAR_SHIFT: u32 = 60;
|
||||
const REGISTER_VALUE_BYTES: usize = std::mem::size_of::<u64>();
|
||||
|
||||
fn entries() -> Vec<(Register, u64)> {
|
||||
vec![
|
||||
(Register::IdAa64Isar1El1, APA_FAULTING_COMBINED << APA_SHIFT),
|
||||
(Register::IdAa64Isar2El1, 0),
|
||||
(Register::IdAa64Pfr0El1, A64_EL0_EL1_NO_HIGHER_EL),
|
||||
(Register::IdAa64Pfr1El1, 0),
|
||||
(Register::IdAa64Pfr2El1, 0),
|
||||
(Register::IdAa64Dfr0El1, 0),
|
||||
(Register::IdAa64Dfr1El1, 0),
|
||||
(Register::IdAa64Mmfr0El1, 0),
|
||||
(Register::IdAa64Mmfr1El1, 0),
|
||||
(Register::IdAa64Mmfr2El1, 0),
|
||||
(Register::IdAa64Mmfr3El1, 0),
|
||||
]
|
||||
}
|
||||
fn replace(entries: &mut [(Register, u64)], register: Register, value: u64) {
|
||||
entries
|
||||
.iter_mut()
|
||||
.find(|(candidate, _)| *candidate == register)
|
||||
.unwrap()
|
||||
.1 = value;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn partial_readbacks_are_exact_and_missing_never_becomes_zero() {
|
||||
let snapshot = Snapshot::declared(IDENTITY, &[(Register::IdAa64Isar1El1, u64::MAX)]).unwrap();
|
||||
assert_eq!(snapshot.read(Register::IdAa64Isar1El1), Ok(u64::MAX));
|
||||
assert_eq!(
|
||||
snapshot.read(Register::IdAa64Isar2El1),
|
||||
Err(Unsupported::MissingRegister(Register::IdAa64Isar2El1))
|
||||
);
|
||||
assert_eq!(
|
||||
Readbacks::readback(&snapshot, Readback::Register(Register::IdAa64Isar1El1)),
|
||||
Some(u64::MAX)
|
||||
);
|
||||
assert_eq!(
|
||||
Readbacks::readback(&snapshot, Readback::Register(Register::IdAa64Isar2El1)),
|
||||
None
|
||||
);
|
||||
assert_eq!(Readbacks::readback(&snapshot, Readback::DynamicDczid), None);
|
||||
assert_eq!(
|
||||
Readbacks::readback(&snapshot, Readback::SelectedCache(Register::CcsidrEl1)),
|
||||
None
|
||||
);
|
||||
assert_eq!(snapshot.provenance().origin(), Origin::DeclaredGuest);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn duplicate_dynamic_and_ambiguous_machine_identity_initialization_rejects() {
|
||||
assert!(matches!(
|
||||
Snapshot::declared(
|
||||
IDENTITY,
|
||||
&[(Register::IdAa64Pfr0El1, 0), (Register::IdAa64Pfr0El1, 1)]
|
||||
),
|
||||
Err(InitializationError::DuplicateRegister(_))
|
||||
));
|
||||
assert!(matches!(
|
||||
Snapshot::declared(IDENTITY, &[(Register::CsselrEl1, 0)]),
|
||||
Err(InitializationError::UnownedRegister(Register::CsselrEl1))
|
||||
));
|
||||
assert!(matches!(
|
||||
Snapshot::declared("", &[]),
|
||||
Err(InitializationError::EmptyIdentity)
|
||||
));
|
||||
assert!(matches!(
|
||||
Snapshot::declared("ambiguous\0machine", &[]),
|
||||
Err(InitializationError::EmbeddedIdentityNul)
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn declaration_digest_binds_named_values_and_identity_without_order_dependence() {
|
||||
let forward = entries();
|
||||
let mut reverse = forward.clone();
|
||||
reverse.reverse();
|
||||
let first = Snapshot::declared(IDENTITY, &forward).unwrap();
|
||||
let same_values = Snapshot::declared(IDENTITY, &reverse).unwrap();
|
||||
assert_eq!(
|
||||
first.provenance().input_sha256(),
|
||||
same_values.provenance().input_sha256()
|
||||
);
|
||||
assert!(!first.same_snapshot(&same_values));
|
||||
assert!(first.same_snapshot(&first));
|
||||
let other_machine = Snapshot::declared("another-declared-machine", &forward).unwrap();
|
||||
assert_ne!(
|
||||
first.provenance().input_sha256(),
|
||||
other_machine.provenance().input_sha256()
|
||||
);
|
||||
let mut changed = forward;
|
||||
replace(&mut changed, Register::IdAa64Isar2El1, 1);
|
||||
let changed = Snapshot::declared(IDENTITY, &changed).unwrap();
|
||||
assert_ne!(
|
||||
first.provenance().input_sha256(),
|
||||
changed.provenance().input_sha256()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn captured_readbacks_are_extracted_from_and_retain_actual_immutable_input() {
|
||||
let mut bytes = Vec::new();
|
||||
bytes.extend(0x0123_4567_89ab_cdef_u64.to_le_bytes());
|
||||
bytes.extend(u64::MAX.to_le_bytes());
|
||||
let input: Arc<[u8]> = bytes.into();
|
||||
let fields = [
|
||||
(Register::IdAa64Isar1El1, 0),
|
||||
(Register::IdAa64Isar2El1, REGISTER_VALUE_BYTES),
|
||||
];
|
||||
let snapshot = Snapshot::captured(
|
||||
"verified-acquisition-fixture-not-hardware-proof",
|
||||
Arc::clone(&input),
|
||||
&fields,
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
snapshot.read(Register::IdAa64Isar1El1),
|
||||
Ok(0x0123_4567_89ab_cdef)
|
||||
);
|
||||
assert_eq!(snapshot.read(Register::IdAa64Isar2El1), Ok(u64::MAX));
|
||||
assert_eq!(snapshot.provenance().origin(), Origin::CapturedHardware);
|
||||
assert_eq!(snapshot.provenance().input(), input.as_ref());
|
||||
assert_eq!(
|
||||
snapshot.provenance().input_sha256(),
|
||||
stela_core::sha256(&input)
|
||||
);
|
||||
assert_eq!(snapshot.provenance().captured_fields(), fields);
|
||||
assert!(Arc::ptr_eq(&input, &snapshot.provenance.input));
|
||||
assert!(matches!(
|
||||
Snapshot::captured(
|
||||
"fixture",
|
||||
Arc::clone(&input),
|
||||
&[(Register::IdAa64Isar1El1, usize::MAX)]
|
||||
),
|
||||
Err(InitializationError::CaptureBounds { .. })
|
||||
));
|
||||
assert!(matches!(
|
||||
Snapshot::captured(
|
||||
"fixture",
|
||||
input,
|
||||
&[
|
||||
(Register::IdAa64Isar1El1, 0),
|
||||
(Register::IdAa64Isar1El1, REGISTER_VALUE_BYTES)
|
||||
]
|
||||
),
|
||||
Err(InitializationError::DuplicateRegister(_))
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn entry_spe_and_regime_qualifiers_consume_the_same_explicit_named_readbacks() {
|
||||
let snapshot = Snapshot::declared(IDENTITY, &entries()).unwrap();
|
||||
let expected = EntryProfile::base(
|
||||
SystemEntryFeatures::declared_absent(),
|
||||
ScalableEntryAbsence::from_id_registers(A64_EL0_EL1_NO_HIGHER_EL, 0).unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(snapshot.entry_profile(), Ok(expected));
|
||||
assert_eq!(snapshot.check_entry_profile(expected), Ok(()));
|
||||
assert!(snapshot.base_spe_absence().is_ok());
|
||||
assert_eq!(snapshot.check_base_el10_4k(), Ok(()));
|
||||
for missing in [
|
||||
Register::IdAa64Isar2El1,
|
||||
Register::IdAa64Pfr0El1,
|
||||
Register::IdAa64Dfr0El1,
|
||||
] {
|
||||
let mut partial = entries();
|
||||
partial.retain(|(register, _)| *register != missing);
|
||||
assert_eq!(
|
||||
Snapshot::declared(IDENTITY, &partial)
|
||||
.unwrap()
|
||||
.entry_profile(),
|
||||
Err(Unsupported::MissingRegister(missing))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_higher_el_granule_d128_and_spe_facts_never_mint_absence() {
|
||||
for (register, shift) in [
|
||||
(Register::IdAa64Pfr0El1, 8),
|
||||
(Register::IdAa64Pfr0El1, 12),
|
||||
(Register::IdAa64Mmfr0El1, 28),
|
||||
(Register::IdAa64Mmfr3El1, 32),
|
||||
] {
|
||||
for value in 1..=FIELD_MAX {
|
||||
let mut raw = entries();
|
||||
let prior = raw
|
||||
.iter()
|
||||
.find(|(candidate, _)| *candidate == register)
|
||||
.unwrap()
|
||||
.1;
|
||||
replace(
|
||||
&mut raw,
|
||||
register,
|
||||
(prior & !(FIELD_MAX << shift)) | (value << shift),
|
||||
);
|
||||
assert!(
|
||||
Snapshot::declared(IDENTITY, &raw)
|
||||
.unwrap()
|
||||
.check_base_el10_4k()
|
||||
.is_err()
|
||||
);
|
||||
}
|
||||
}
|
||||
for value in 1..=FIELD_MAX {
|
||||
let mut raw = entries();
|
||||
replace(&mut raw, Register::IdAa64Dfr0El1, value << 32);
|
||||
let snapshot = Snapshot::declared(IDENTITY, &raw).unwrap();
|
||||
assert!(snapshot.base_spe_absence().is_err());
|
||||
assert!(snapshot.entry_profile().is_err());
|
||||
}
|
||||
let mut raw = entries();
|
||||
replace(&mut raw, Register::IdAa64Pfr0El1, 0);
|
||||
assert!(
|
||||
Snapshot::declared(IDENTITY, &raw)
|
||||
.unwrap()
|
||||
.entry_profile()
|
||||
.is_err()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doublefault_sve_sme_and_pauth_lr_are_not_inferred_from_unrelated_absences() {
|
||||
for (register, shift, value) in [
|
||||
(Register::IdAa64Pfr0El1, 28, 2),
|
||||
(Register::IdAa64Pfr0El1, 32, 1),
|
||||
(Register::IdAa64Pfr1El1, 24, 1),
|
||||
(Register::IdAa64Isar1El1, APA_SHIFT, 6),
|
||||
(Register::IdAa64Isar1El1, API_SHIFT, 1),
|
||||
(Register::IdAa64Isar2El1, APA3_SHIFT, 1),
|
||||
] {
|
||||
let mut raw = entries();
|
||||
let prior = raw
|
||||
.iter()
|
||||
.find(|(candidate, _)| *candidate == register)
|
||||
.unwrap()
|
||||
.1;
|
||||
replace(
|
||||
&mut raw,
|
||||
register,
|
||||
(prior & !(FIELD_MAX << shift)) | (value << shift),
|
||||
);
|
||||
assert!(
|
||||
Snapshot::declared(IDENTITY, &raw)
|
||||
.unwrap()
|
||||
.entry_profile()
|
||||
.is_err()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn opaque_unrelated_fields_are_preserved_and_invalid_mte_fraction_not_interpreted() {
|
||||
let mut raw = entries();
|
||||
// Under primary MTE=0, MTE_frac/MTEX are invalid and not absence indicators.
|
||||
let opaque = (FIELD_MAX << 40) | (FIELD_MAX << 52);
|
||||
replace(&mut raw, Register::IdAa64Pfr1El1, opaque);
|
||||
let snapshot = Snapshot::declared(IDENTITY, &raw).unwrap();
|
||||
assert_eq!(snapshot.read(Register::IdAa64Pfr1El1), Ok(opaque));
|
||||
assert!(snapshot.entry_profile().is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pfar_absence_requires_a_named_readback_and_rejects_present_or_reserved_values() {
|
||||
let mut raw = entries();
|
||||
raw.retain(|(register, _)| *register != Register::IdAa64Pfr1El1);
|
||||
let missing = Snapshot::declared(IDENTITY, &raw).unwrap();
|
||||
assert_eq!(
|
||||
missing.entry_profile(),
|
||||
Err(Unsupported::MissingRegister(Register::IdAa64Pfr1El1))
|
||||
);
|
||||
assert_eq!(
|
||||
Readbacks::readback(&missing, Readback::Register(Register::IdAa64Pfr1El1)),
|
||||
None
|
||||
);
|
||||
|
||||
let absent = Snapshot::declared(IDENTITY, &entries()).unwrap();
|
||||
let profile = absent.entry_profile().unwrap();
|
||||
assert_eq!(absent.check_entry_profile(profile), Ok(()));
|
||||
for value in 1..=FIELD_MAX {
|
||||
let mut raw = entries();
|
||||
let pfr1 = value << PFAR_SHIFT;
|
||||
replace(&mut raw, Register::IdAa64Pfr1El1, pfr1);
|
||||
let snapshot = Snapshot::declared(IDENTITY, &raw).unwrap();
|
||||
assert_eq!(snapshot.read(Register::IdAa64Pfr1El1), Ok(pfr1));
|
||||
assert_eq!(
|
||||
Readbacks::readback(&snapshot, Readback::Register(Register::IdAa64Pfr1El1)),
|
||||
Some(pfr1)
|
||||
);
|
||||
let expected = Err(Unsupported::Field {
|
||||
register: Register::IdAa64Pfr1El1,
|
||||
field: "PFAR",
|
||||
value: value as u8,
|
||||
});
|
||||
assert_eq!(snapshot.entry_profile(), expected);
|
||||
assert_eq!(snapshot.check_entry_profile(profile), expected.map(|_| ()));
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@ use super::{
|
||||
access::ExceptionLevel,
|
||||
events::EventEndpoint,
|
||||
execution::EntryBoundary,
|
||||
identification::Register,
|
||||
identification_snapshot::{Snapshot, Unsupported as IdentificationUnsupported},
|
||||
profile::BaseSpeAbsence,
|
||||
pstate::{DAIF_MASK, NZCV_MASK},
|
||||
state::{PSTATE_EL0T, PSTATE_IL_MASK, PSTATE_MODE_MASK, SystemState},
|
||||
@@ -16,6 +18,7 @@ use crate::memory::{
|
||||
domain::{DataPolicy, MemoryExecutionLoan, MemoryThread},
|
||||
policy::{LowerAddressProfile, MemoryControls, TagCheckFaultMode},
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use stela_compiler::{
|
||||
GuestState,
|
||||
block::ORDINARY_GPR_PROCESS_MEMORY_PROFILE_ID,
|
||||
@@ -27,6 +30,9 @@ use stela_compiler::{
|
||||
#[path = "process_memory/source.rs"]
|
||||
mod source;
|
||||
pub use source::SourceNormalWbDomain;
|
||||
#[path = "process_memory/scalable.rs"]
|
||||
mod scalable;
|
||||
pub use scalable::ScalableExecutionError;
|
||||
|
||||
const SCTLR_MMU_ENABLE: u64 = 1;
|
||||
const SCTLR_DATA_CACHE_ENABLE: u64 = 1 << 2;
|
||||
@@ -68,6 +74,7 @@ const SOURCE_PSTATE_MASK: u64 = NZCV_MASK | DAIF_MASK | PSTATE_MODE_MASK;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum ProcessMemoryError {
|
||||
Identification(IdentificationUnsupported),
|
||||
UnsupportedFeature {
|
||||
register: &'static str,
|
||||
field: &'static str,
|
||||
@@ -98,6 +105,25 @@ pub struct ProcessMemoryFeatures {
|
||||
}
|
||||
|
||||
impl ProcessMemoryFeatures {
|
||||
/// Derive only this bounded memory feature seal from the same named source.
|
||||
/// Missing IDs remain unsupported; no exception-feature absence is inferred.
|
||||
pub fn from_snapshot(identification: &Snapshot) -> Result<Self, ProcessMemoryError> {
|
||||
let read = |register| {
|
||||
identification
|
||||
.read(register)
|
||||
.map_err(ProcessMemoryError::Identification)
|
||||
};
|
||||
Self::from_id_registers(
|
||||
read(Register::IdAa64Mmfr0El1)?,
|
||||
read(Register::IdAa64Mmfr2El1)?,
|
||||
read(Register::IdAa64Isar3El1)?,
|
||||
read(Register::IdAa64Pfr1El1)?,
|
||||
identification
|
||||
.base_spe_absence()
|
||||
.map_err(ProcessMemoryError::Identification)?,
|
||||
)
|
||||
}
|
||||
|
||||
pub fn from_id_registers(
|
||||
id_aa64mmfr0_el1: u64,
|
||||
id_aa64mmfr2_el1: u64,
|
||||
@@ -155,6 +181,7 @@ impl ProcessMemoryFeatures {
|
||||
#[derive(Debug)]
|
||||
pub struct FixedProcessMemoryControls {
|
||||
_features: ProcessMemoryFeatures,
|
||||
identification: Option<Arc<Snapshot>>,
|
||||
sctlr_el1: u64,
|
||||
tcr_el1: u64,
|
||||
lower_address: LowerAddressProfile,
|
||||
@@ -196,6 +223,7 @@ impl FixedProcessMemoryControls {
|
||||
}
|
||||
Ok(Self {
|
||||
_features: features,
|
||||
identification: None,
|
||||
sctlr_el1,
|
||||
tcr_el1,
|
||||
lower_address,
|
||||
@@ -203,6 +231,32 @@ impl FixedProcessMemoryControls {
|
||||
})
|
||||
}
|
||||
|
||||
/// Construct a fresh scope whose memory features and EL10 regime are
|
||||
/// derived from this exact retained identification allocation. Dynamic
|
||||
/// CurrentEL/PSTATE and scalable access controls remain separate owners.
|
||||
/// This does not qualify PFAR or any other exception-entry optional effect.
|
||||
pub fn new_with_identification(
|
||||
identification: Arc<Snapshot>,
|
||||
sctlr_el1: u64,
|
||||
tcr_el1: u64,
|
||||
lower_address_bits: u8,
|
||||
source: SourceNormalWbDomain,
|
||||
) -> Result<Self, ProcessMemoryError> {
|
||||
identification
|
||||
.check_el10_regime()
|
||||
.map_err(ProcessMemoryError::Identification)?;
|
||||
let features = ProcessMemoryFeatures::from_snapshot(&identification)?;
|
||||
let mut controls = Self::new(features, sctlr_el1, tcr_el1, lower_address_bits, source)?;
|
||||
controls.identification = Some(identification);
|
||||
Ok(controls)
|
||||
}
|
||||
|
||||
/// The same immutable source used at construction, if this scope has one.
|
||||
/// Legacy raw-ID construction intentionally supplies no scalable authority.
|
||||
pub fn identification_snapshot(&self) -> Option<&Snapshot> {
|
||||
self.identification.as_deref()
|
||||
}
|
||||
|
||||
pub const fn sctlr_el1(&self) -> u64 {
|
||||
self.sctlr_el1
|
||||
}
|
||||
@@ -243,22 +297,7 @@ impl FixedProcessMemoryControls {
|
||||
thread: &'run mut MemoryThread<MemoryControls>,
|
||||
endpoint: Option<&'run EventEndpoint>,
|
||||
) -> Result<PreparedProcessMemory<'run>, ProcessMemoryError> {
|
||||
let pstate = system.pstate(registers);
|
||||
if pstate & PSTATE_IL_MASK != 0 {
|
||||
return Err(ProcessMemoryError::IllegalExecutionState);
|
||||
}
|
||||
if system.current_el() != ExceptionLevel::El0 || pstate & PSTATE_MODE_MASK != PSTATE_EL0T {
|
||||
return Err(ProcessMemoryError::UnsupportedMode(
|
||||
pstate & PSTATE_MODE_MASK,
|
||||
));
|
||||
}
|
||||
let unsupported = pstate & !SOURCE_PSTATE_MASK;
|
||||
if unsupported != 0 {
|
||||
return Err(ProcessMemoryError::UnsupportedPstate(unsupported));
|
||||
}
|
||||
if system.mte().is_some() || system.tag_check_override() {
|
||||
return Err(ProcessMemoryError::MteState);
|
||||
}
|
||||
self.validate_source_state(system, registers)?;
|
||||
// Capture the actual provider loan before validating source generation.
|
||||
// It owns the same domain Arc without borrowing/extracting the policy;
|
||||
// failed preparation releases it through Drop before returning.
|
||||
@@ -314,6 +353,30 @@ impl FixedProcessMemoryControls {
|
||||
})
|
||||
}
|
||||
|
||||
fn validate_source_state(
|
||||
&self,
|
||||
system: &SystemState,
|
||||
registers: &GuestState,
|
||||
) -> Result<(), ProcessMemoryError> {
|
||||
let pstate = system.pstate(registers);
|
||||
if pstate & PSTATE_IL_MASK != 0 {
|
||||
return Err(ProcessMemoryError::IllegalExecutionState);
|
||||
}
|
||||
if system.current_el() != ExceptionLevel::El0 || pstate & PSTATE_MODE_MASK != PSTATE_EL0T {
|
||||
return Err(ProcessMemoryError::UnsupportedMode(
|
||||
pstate & PSTATE_MODE_MASK,
|
||||
));
|
||||
}
|
||||
let unsupported = pstate & !SOURCE_PSTATE_MASK;
|
||||
if unsupported != 0 {
|
||||
return Err(ProcessMemoryError::UnsupportedPstate(unsupported));
|
||||
}
|
||||
if system.mte().is_some() || system.tag_check_override() {
|
||||
return Err(ProcessMemoryError::MteState);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn memory_controls(&self, system: &SystemState) -> MemoryControls {
|
||||
MemoryControls::new(
|
||||
self.lower_address,
|
||||
@@ -454,3 +517,7 @@ impl<P: DataPolicy> Drop for PolicyLoan<'_, P> {
|
||||
#[cfg(test)]
|
||||
#[path = "process_memory/tests.rs"]
|
||||
mod tests;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "process_memory/identification_tests.rs"]
|
||||
mod identification_tests;
|
||||
@@ -0,0 +1,155 @@
|
||||
//! Declared-source component tests; no captured-hardware or native admission.
|
||||
use super::*;
|
||||
use crate::memory::domain::{MemoryDomain, MemorySystem};
|
||||
use stela_compiler::TargetCpu;
|
||||
|
||||
const LOWER_ADDRESS_BITS: u8 = 39;
|
||||
const LOWER_SIZE: u64 = u64::BITS as u64 - LOWER_ADDRESS_BITS as u64;
|
||||
const EL10_IMPLEMENTED: u64 = 0x11;
|
||||
const FEATURE_PRESENT: u64 = 1;
|
||||
const EL2_FIELD_SHIFT: u32 = 8;
|
||||
const SPE_VERSION_SHIFT: u32 = 32;
|
||||
const TEST_ADDRESS_SPACE: u64 = 7;
|
||||
const ERG_BYTES: u64 = 16;
|
||||
const MONITOR_STRIPES: usize = 4;
|
||||
|
||||
fn ids() -> [(Register, u64); 6] {
|
||||
[
|
||||
(Register::IdAa64Pfr0El1, EL10_IMPLEMENTED),
|
||||
(
|
||||
Register::IdAa64Mmfr0El1,
|
||||
TGRAN4_SUPPORTED << MMFR0_TGRAN4_SHIFT,
|
||||
),
|
||||
(Register::IdAa64Mmfr2El1, MMFR2_AT_LSE2 << MMFR2_AT_SHIFT),
|
||||
(Register::IdAa64Isar3El1, FEATURE_ABSENT),
|
||||
(Register::IdAa64Pfr1El1, FEATURE_ABSENT),
|
||||
(Register::IdAa64Dfr0El1, FEATURE_ABSENT),
|
||||
]
|
||||
}
|
||||
fn snapshot(entries: &[(Register, u64)]) -> Arc<Snapshot> {
|
||||
Arc::new(Snapshot::declared("fixed-process-snapshot-component", entries).unwrap())
|
||||
}
|
||||
fn domain() -> Arc<MemoryDomain> {
|
||||
MemoryDomain::new_for_address_space(
|
||||
TEST_ADDRESS_SPACE,
|
||||
MemorySystem::new(ERG_BYTES, MONITOR_STRIPES).unwrap(),
|
||||
Vec::new(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
fn source(domain: &Arc<MemoryDomain>) -> SourceNormalWbDomain {
|
||||
// SAFETY: this fresh component has no mappings; it tests construction and
|
||||
// source identity only, and neither issues memory nor admits a native body.
|
||||
unsafe { SourceNormalWbDomain::from_source_resolved(Arc::clone(domain)) }
|
||||
.expect("fresh empty test domain has current source authority")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn retains_same_snapshot_and_keeps_legacy_constructor_unqualified() {
|
||||
let domain = domain();
|
||||
let identification = snapshot(&ids());
|
||||
let controls = FixedProcessMemoryControls::new_with_identification(
|
||||
Arc::clone(&identification),
|
||||
SCTLR_NATIVE_NORMAL_WB,
|
||||
LOWER_SIZE,
|
||||
LOWER_ADDRESS_BITS,
|
||||
source(&domain),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(identification.same_snapshot(controls.identification_snapshot().unwrap()));
|
||||
let equal_values = snapshot(&ids());
|
||||
assert!(!equal_values.same_snapshot(controls.identification_snapshot().unwrap()));
|
||||
let legacy = FixedProcessMemoryControls::new(
|
||||
ProcessMemoryFeatures::from_snapshot(&identification).unwrap(),
|
||||
SCTLR_NATIVE_NORMAL_WB,
|
||||
LOWER_SIZE,
|
||||
LOWER_ADDRESS_BITS,
|
||||
source(&domain),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(legacy.identification_snapshot().is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_required_named_id_must_be_supplied() {
|
||||
let domain = domain();
|
||||
let entries = ids();
|
||||
for missing in 0..entries.len() {
|
||||
let partial: Vec<_> = entries
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter(|(index, _)| *index != missing)
|
||||
.map(|(_, entry)| *entry)
|
||||
.collect();
|
||||
let error = FixedProcessMemoryControls::new_with_identification(
|
||||
snapshot(&partial),
|
||||
SCTLR_NATIVE_NORMAL_WB,
|
||||
LOWER_SIZE,
|
||||
LOWER_ADDRESS_BITS,
|
||||
source(&domain),
|
||||
)
|
||||
.unwrap_err();
|
||||
assert_eq!(
|
||||
error,
|
||||
ProcessMemoryError::Identification(IdentificationUnsupported::MissingRegister(
|
||||
entries[missing].0
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn same_source_feature_and_regime_failures_are_not_normalized() {
|
||||
let domain = domain();
|
||||
for (register, value) in [
|
||||
(
|
||||
Register::IdAa64Pfr0El1,
|
||||
EL10_IMPLEMENTED | FEATURE_PRESENT << EL2_FIELD_SHIFT,
|
||||
),
|
||||
(
|
||||
Register::IdAa64Mmfr0El1,
|
||||
ID_FIELD_MASK << MMFR0_TGRAN4_SHIFT,
|
||||
),
|
||||
(Register::IdAa64Mmfr2El1, FEATURE_ABSENT),
|
||||
(Register::IdAa64Isar3El1, FEATURE_PRESENT),
|
||||
(Register::IdAa64Pfr1El1, FEATURE_PRESENT << PFR1_MTE_SHIFT),
|
||||
(
|
||||
Register::IdAa64Dfr0El1,
|
||||
FEATURE_PRESENT << SPE_VERSION_SHIFT,
|
||||
),
|
||||
] {
|
||||
let mut entries = ids();
|
||||
entries
|
||||
.iter_mut()
|
||||
.find(|entry| entry.0 == register)
|
||||
.unwrap()
|
||||
.1 = value;
|
||||
assert!(
|
||||
FixedProcessMemoryControls::new_with_identification(
|
||||
snapshot(&entries),
|
||||
SCTLR_NATIVE_NORMAL_WB,
|
||||
LOWER_SIZE,
|
||||
LOWER_ADDRESS_BITS,
|
||||
source(&domain),
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
}
|
||||
let identification = snapshot(&ids());
|
||||
for (sctlr, tcr) in [
|
||||
(SCTLR_MMU_ENABLE, LOWER_SIZE),
|
||||
(SCTLR_NATIVE_NORMAL_WB, LOWER_SIZE + 1),
|
||||
] {
|
||||
assert!(
|
||||
FixedProcessMemoryControls::new_with_identification(
|
||||
Arc::clone(&identification),
|
||||
sctlr,
|
||||
tcr,
|
||||
LOWER_ADDRESS_BITS,
|
||||
source(&domain),
|
||||
)
|
||||
.is_err()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
//! Qualified scalable entry through the same fixed process-memory authority.
|
||||
//!
|
||||
//! Source obligations belong to the prepared compiler identity. The scalable
|
||||
//! control owner evaluates them while retaining its actual ID/control loan;
|
||||
//! this child composes that loan with the existing same-thread policy guard.
|
||||
|
||||
use super::{FixedProcessMemoryControls, PolicyLoan, ProcessMemoryError};
|
||||
use crate::{
|
||||
memory::{domain::MemoryThread, policy::MemoryControls},
|
||||
scalable::{
|
||||
ScalableState,
|
||||
leaf::{PreparedScalableLeaf, ScalableLeafExit},
|
||||
},
|
||||
system::{
|
||||
scalable_controls::{self, ScalableControlOwner, SourceAtomicity},
|
||||
state::SystemState,
|
||||
},
|
||||
};
|
||||
use stela_compiler::{
|
||||
GuestAddress, GuestState,
|
||||
aarch64::scalable::{
|
||||
ElementSize,
|
||||
execution::{GuestMemoryQuantity, SCALABLE_EXECUTION_REQUIREMENTS_VERSION},
|
||||
},
|
||||
context::{
|
||||
ExecutionContext,
|
||||
memory::{flags, profile_requirements},
|
||||
},
|
||||
};
|
||||
|
||||
const SCALABLE_REQUEST_FLAGS: u32 =
|
||||
flags::WRITE | flags::TAG_CHECKED | flags::NON_TEMPORAL | flags::SME | flags::SVE_PREDICATED;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ScalableExecutionError {
|
||||
MemoryAuthority {
|
||||
pc: GuestAddress,
|
||||
cause: ProcessMemoryError,
|
||||
},
|
||||
Control {
|
||||
entry_pc: GuestAddress,
|
||||
cause: scalable_controls::Error,
|
||||
},
|
||||
MissingIdentificationSnapshot {
|
||||
pc: GuestAddress,
|
||||
},
|
||||
WrongIdentificationSnapshot {
|
||||
pc: GuestAddress,
|
||||
},
|
||||
UnsupportedRequirementsVersion {
|
||||
pc: GuestAddress,
|
||||
version: u32,
|
||||
},
|
||||
UnsupportedSourceAtomicity {
|
||||
pc: GuestAddress,
|
||||
actual: SourceAtomicity,
|
||||
},
|
||||
UnsupportedMemoryClass {
|
||||
pc: GuestAddress,
|
||||
required_flags: u32,
|
||||
},
|
||||
UnqualifiedMemoryQuantity {
|
||||
pc: GuestAddress,
|
||||
},
|
||||
UnsupportedGuestQuantity {
|
||||
pc: GuestAddress,
|
||||
quantity: ElementSize,
|
||||
},
|
||||
Execution {
|
||||
entry_pc: GuestAddress,
|
||||
cause: anyhow::Error,
|
||||
},
|
||||
}
|
||||
|
||||
impl FixedProcessMemoryControls {
|
||||
/// Execute one immutable compiler-prepared body under retained CPU controls.
|
||||
/// This source scope remains EL0/MTE-absent. The shared CPU owner checks
|
||||
/// each source helper and feature clause; the prepared leaf checks the
|
||||
/// actual domain's storage profile and read/write capabilities before entry.
|
||||
/// Native memory also requires an explicit SCA16 source implementation.
|
||||
/// Quadword requests retain their emitted architectural descriptor, so the
|
||||
/// canonical memory service owns their alignment, partition and fault order.
|
||||
/// Unsupported source facts and access controls decline before any prefix.
|
||||
///
|
||||
/// # Safety
|
||||
/// Original source must return finitely. All raw guest backing must remain
|
||||
/// disjoint from these live state/context owners, this RX mapping and native
|
||||
/// stack; actual native rights and coherent storage remain pinned throughout
|
||||
/// invocation. No asynchronous reentry, host protection change or unwind /
|
||||
/// signal recovery through generated native code is permitted. Qualification
|
||||
/// establishes CPU/source authority, not these raw native-storage contracts.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub unsafe fn execute_scalable_leaf(
|
||||
&self,
|
||||
access: &ScalableControlOwner<'_>,
|
||||
prepared: &PreparedScalableLeaf,
|
||||
system: &mut SystemState,
|
||||
registers: &mut GuestState,
|
||||
scalable: &mut ScalableState,
|
||||
memory: &mut MemoryThread<MemoryControls>,
|
||||
context: &mut ExecutionContext,
|
||||
) -> Result<ScalableLeafExit, ScalableExecutionError> {
|
||||
let identity = prepared.identity();
|
||||
let pc = identity.guest_base;
|
||||
let memory_error = |cause| ScalableExecutionError::MemoryAuthority { pc, cause };
|
||||
// Same ordered source-state checks as the GPR authority, including IL
|
||||
// before identification, source or service access.
|
||||
self.validate_source_state(system, registers)
|
||||
.map_err(memory_error)?;
|
||||
// Legacy raw-ID GPR controls carry no shared identification authority.
|
||||
// This MTE0-only provider must retain the same actual Snapshot allocation.
|
||||
let identification = self
|
||||
.identification_snapshot()
|
||||
.ok_or(ScalableExecutionError::MissingIdentificationSnapshot { pc })?;
|
||||
if !std::ptr::eq(identification, access.identification_snapshot()) {
|
||||
return Err(ScalableExecutionError::WrongIdentificationSnapshot { pc });
|
||||
}
|
||||
// Pin this actual domain before validating its source generation.
|
||||
// Retain the loan through native finalization and policy/control restore;
|
||||
// the actual PE owner separately retains its outer PC-settlement loan.
|
||||
let _execution_loan = memory
|
||||
.execution_loan()
|
||||
.map_err(ProcessMemoryError::Memory)
|
||||
.map_err(memory_error)?;
|
||||
if !self.source.matches(memory) {
|
||||
return Err(memory_error(ProcessMemoryError::WrongMemoryDomain));
|
||||
}
|
||||
if identity.execution_requirements_version != SCALABLE_EXECUTION_REQUIREMENTS_VERSION {
|
||||
return Err(ScalableExecutionError::UnsupportedRequirementsVersion {
|
||||
pc,
|
||||
version: identity.execution_requirements_version,
|
||||
});
|
||||
}
|
||||
if identity.memory_requirements.required_flags & !SCALABLE_REQUEST_FLAGS != 0 {
|
||||
return Err(ScalableExecutionError::UnsupportedMemoryClass {
|
||||
pc,
|
||||
required_flags: identity.memory_requirements.required_flags,
|
||||
});
|
||||
}
|
||||
for instruction in identity.execution_requirements.instructions() {
|
||||
match instruction.guest_memory_quantity() {
|
||||
GuestMemoryQuantity::None
|
||||
| GuestMemoryQuantity::Maximum(
|
||||
ElementSize::Byte
|
||||
| ElementSize::Halfword
|
||||
| ElementSize::Word
|
||||
| ElementSize::Doubleword
|
||||
| ElementSize::Quadword,
|
||||
) => {}
|
||||
GuestMemoryQuantity::Unqualified => {
|
||||
return Err(ScalableExecutionError::UnqualifiedMemoryQuantity {
|
||||
pc: instruction.pc(),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
// Shared references to both actual fixed owners and SystemState remain
|
||||
// live for the callback. Guest/scalable mutable reborrows are its sole
|
||||
// subjects; no detached approval or conflicting immutable state survives.
|
||||
access
|
||||
.with_checked_execution(
|
||||
&identity.execution_requirements,
|
||||
identity.profile,
|
||||
system,
|
||||
registers,
|
||||
scalable,
|
||||
|effective, registers, scalable| {
|
||||
if identity.memory_requirements.required_profile
|
||||
& profile_requirements::NATIVE_ACCESS
|
||||
!= 0
|
||||
&& effective.source_atomicity() != SourceAtomicity::FixedSca16
|
||||
{
|
||||
return Err(ScalableExecutionError::UnsupportedSourceAtomicity {
|
||||
pc,
|
||||
actual: effective.source_atomicity(),
|
||||
});
|
||||
}
|
||||
let policy = self
|
||||
.memory_controls(system)
|
||||
.with_implementation_profile(effective.implementation_profile());
|
||||
let loan = PolicyLoan::new(memory, policy);
|
||||
// SAFETY: all source/CPU qualification precedes this actual
|
||||
// prepared mapping. The caller retains the raw backing contract.
|
||||
// The existing leaf alone prepares complete-body requirements,
|
||||
// publishes views, invokes native and settles checked finalization.
|
||||
unsafe { prepared.execute(registers, scalable, loan.thread, context) }.map_err(
|
||||
|cause| ScalableExecutionError::Execution {
|
||||
entry_pc: pc,
|
||||
cause,
|
||||
},
|
||||
)
|
||||
},
|
||||
)
|
||||
.map_err(|cause| ScalableExecutionError::Control {
|
||||
entry_pc: pc,
|
||||
cause,
|
||||
})?
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(all(
|
||||
test,
|
||||
target_arch = "x86_64",
|
||||
any(target_os = "macos", target_os = "linux")
|
||||
))]
|
||||
#[path = "scalable/tests.rs"]
|
||||
mod tests;
|
||||
@@ -0,0 +1,461 @@
|
||||
//! Frozen Store candidate consumer of the shared qualified process fixture.
|
||||
//! This adds tests to the existing runtime test binary, no raw native entry.
|
||||
use super::{Fixture, ScalableLeafExit, TargetCpu};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{fs::OpenOptions, io::Write, path::Path, time::Instant};
|
||||
|
||||
const RAM_BYTES: usize = 8192;
|
||||
const MAX_ITERATIONS: u64 = 1_000_000;
|
||||
const MAX_SAMPLE_NS: u128 = 250_000_000;
|
||||
const DEADLINE_BATCH: u64 = 64;
|
||||
const MARKER: &str = "STELA_STORE_OBSERVATION=";
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, PartialEq, Eq)]
|
||||
struct Frame {
|
||||
x: Vec<u64>,
|
||||
sp: u64,
|
||||
nzcv: u32,
|
||||
reserved: u32,
|
||||
fpcr: u32,
|
||||
fpsr: u32,
|
||||
z: Vec<Vec<u8>>,
|
||||
p: Vec<Vec<u8>>,
|
||||
ffr: Vec<u8>,
|
||||
za: Vec<u8>,
|
||||
zt0: Vec<u8>,
|
||||
tpidr2: u64,
|
||||
fpmr: u64,
|
||||
}
|
||||
#[derive(Deserialize)]
|
||||
struct Case {
|
||||
name: String,
|
||||
words: Vec<u32>,
|
||||
guest_base: u64,
|
||||
svl_bytes: usize,
|
||||
initial: Frame,
|
||||
expected: Frame,
|
||||
ram: Vec<u8>,
|
||||
expected_ram: Vec<u8>,
|
||||
expected_exit: serde_json::Value,
|
||||
compiler_cx16: bool,
|
||||
mappings: Vec<serde_json::Value>,
|
||||
historical_policy: Option<serde_json::Value>,
|
||||
expected_req4: Option<serde_json::Value>,
|
||||
#[serde(default)]
|
||||
projection: Option<String>,
|
||||
}
|
||||
impl Frame {
|
||||
fn import(&self, fixture: &mut Fixture) {
|
||||
assert_eq!(self.x.len(), fixture.registers.x.len());
|
||||
fixture.registers.x.copy_from_slice(&self.x);
|
||||
fixture.registers.sp = self.sp;
|
||||
fixture.registers.nzcv = self.nzcv;
|
||||
fixture.registers.reserved = self.reserved;
|
||||
for (index, value) in self.z.iter().enumerate() {
|
||||
fixture
|
||||
.scalable
|
||||
.write_z(&mut fixture.registers, index as u8, value)
|
||||
.unwrap();
|
||||
}
|
||||
for (index, value) in self.p.iter().enumerate() {
|
||||
fixture
|
||||
.scalable
|
||||
.write_predicate(index as u8, value)
|
||||
.unwrap();
|
||||
}
|
||||
fixture.scalable.write_ffr(&self.ffr).unwrap();
|
||||
fixture.scalable.write_za(0, &self.za).unwrap();
|
||||
fixture.scalable.write_zt0(0, &self.zt0).unwrap();
|
||||
fixture.scalable.set_tpidr2_el0(self.tpidr2);
|
||||
fixture.scalable.set_fpmr(self.fpmr);
|
||||
fixture.registers.fpcr = self.fpcr;
|
||||
fixture.registers.fpsr = self.fpsr;
|
||||
}
|
||||
fn observe(fixture: &Fixture) -> Self {
|
||||
let length = fixture.scalable.vector_length().bytes();
|
||||
let mut z = vec![vec![0; length]; 32];
|
||||
for (index, bytes) in z.iter_mut().enumerate() {
|
||||
fixture
|
||||
.scalable
|
||||
.read_z(&fixture.registers, index as u8, bytes)
|
||||
.unwrap();
|
||||
}
|
||||
let mut p = vec![vec![0; length / 8]; 16];
|
||||
for (index, bytes) in p.iter_mut().enumerate() {
|
||||
fixture.scalable.read_predicate(index as u8, bytes).unwrap();
|
||||
}
|
||||
let mut ffr = vec![0; length / 8];
|
||||
let mut za = vec![0; length * length];
|
||||
let mut zt0 = vec![0; 64];
|
||||
fixture.scalable.read_ffr(&mut ffr).unwrap();
|
||||
fixture.scalable.read_za(0, &mut za).unwrap();
|
||||
fixture.scalable.read_zt0(0, &mut zt0).unwrap();
|
||||
Self {
|
||||
x: fixture.registers.x.to_vec(),
|
||||
sp: fixture.registers.sp,
|
||||
nzcv: fixture.registers.nzcv,
|
||||
reserved: fixture.registers.reserved,
|
||||
fpcr: fixture.registers.fpcr,
|
||||
fpsr: fixture.registers.fpsr,
|
||||
z,
|
||||
p,
|
||||
ffr,
|
||||
za,
|
||||
zt0,
|
||||
tpidr2: fixture.scalable.tpidr2_el0(),
|
||||
fpmr: fixture.scalable.fpmr(),
|
||||
}
|
||||
}
|
||||
}
|
||||
fn cases() -> Vec<Case> {
|
||||
let path = std::env::var("STELA_STORE_FIXTURES").expect("source-bound fixture path required");
|
||||
serde_json::from_slice(&std::fs::read(path).unwrap()).unwrap()
|
||||
}
|
||||
fn make_fixture(case: &Case) -> Fixture {
|
||||
let target = if case.compiler_cx16 {
|
||||
TargetCpu::Cx16
|
||||
} else {
|
||||
TargetCpu::Baseline
|
||||
};
|
||||
let split = case.mappings.get(1).map(|entry| {
|
||||
(
|
||||
entry["offset"].as_u64().unwrap() as usize,
|
||||
entry["writable"].as_bool().unwrap(),
|
||||
)
|
||||
});
|
||||
let mut fixture = Fixture::new_program(
|
||||
&case.words,
|
||||
case.guest_base,
|
||||
case.svl_bytes,
|
||||
TargetCpu::Cx16,
|
||||
target,
|
||||
split,
|
||||
);
|
||||
case.initial.import(&mut fixture);
|
||||
assert_eq!(case.ram.len(), RAM_BYTES);
|
||||
// SAFETY: pinned fixture initialization precedes every synchronous entry.
|
||||
unsafe { fixture.storage.write_bytes(&case.ram) };
|
||||
fixture
|
||||
}
|
||||
fn mxcsr() -> u32 {
|
||||
let mut value = 0_u32;
|
||||
// SAFETY: valid writable u32; reads only caller floating control state.
|
||||
unsafe {
|
||||
std::arch::asm!("stmxcsr [{address}]", address = in(reg) &mut value,
|
||||
options(nostack, preserves_flags));
|
||||
}
|
||||
value
|
||||
}
|
||||
fn cpu_ns() -> u64 {
|
||||
let mut time = libc::timespec {
|
||||
tv_sec: 0,
|
||||
tv_nsec: 0,
|
||||
};
|
||||
// SAFETY: live writable timespec, read-only process CPU clock.
|
||||
assert_eq!(
|
||||
unsafe { libc::clock_gettime(libc::CLOCK_PROCESS_CPUTIME_ID, &mut time) },
|
||||
0
|
||||
);
|
||||
u64::try_from(time.tv_sec).unwrap() * 1_000_000_000 + u64::try_from(time.tv_nsec).unwrap()
|
||||
}
|
||||
fn durable(value: &serde_json::Value) {
|
||||
let path = std::env::var("STELA_STORE_RAW").expect("fresh durable journal path required");
|
||||
let mut stream = OpenOptions::new()
|
||||
.create(true)
|
||||
.append(true)
|
||||
.open(Path::new(&path))
|
||||
.unwrap();
|
||||
serde_json::to_writer(&mut stream, value).unwrap();
|
||||
stream.write_all(b"\n").unwrap();
|
||||
stream.sync_all().unwrap();
|
||||
}
|
||||
fn artifact(fixture: &Fixture) -> serde_json::Value {
|
||||
let identity = fixture.prepared.identity();
|
||||
serde_json::json!({
|
||||
"compiler_source_sha256":identity.compiler_source_sha256,
|
||||
"source_sha256":identity.source_sha256,
|
||||
"native_sha256":identity.native_sha256,
|
||||
"native_bytes":fixture.prepared.native_bytes(),
|
||||
"source_map":fixture.prepared.source_map().iter().map(|(pc,offset)|(pc.0,*offset)).collect::<Vec<_>>(),
|
||||
"memory_requirements":format!("{:?}",identity.memory_requirements),
|
||||
"per_pc_execution_requirements":format!("{:?}",identity.execution_requirements),
|
||||
"execution_requirements_version":identity.execution_requirements_version
|
||||
})
|
||||
}
|
||||
fn typed_exit(exit: &Result<ScalableLeafExit, super::ScalableExecutionError>) -> serde_json::Value {
|
||||
match exit {
|
||||
Ok(ScalableLeafExit::Returned) => serde_json::json!({"kind":"completed"}),
|
||||
Ok(ScalableLeafExit::MemoryFault(fault)) => serde_json::json!({
|
||||
"kind":"fault", "status_code":fault.status as u32,
|
||||
"address":fault.address.0,"pc":fault.pc.0,"completed_bytes":fault.completed_bytes}),
|
||||
Ok(ScalableLeafExit::EntryDeclined(status)) => {
|
||||
serde_json::json!({"kind":"declined","status_code":*status as u32})
|
||||
}
|
||||
other => serde_json::json!({"kind":"error","detail":format!("{other:?}")}),
|
||||
}
|
||||
}
|
||||
fn validate(
|
||||
case: &Case,
|
||||
fixture: &Fixture,
|
||||
observed: &serde_json::Value,
|
||||
before_context: (usize, usize, usize),
|
||||
before_mxcsr: u32,
|
||||
) {
|
||||
assert_eq!(
|
||||
Frame::observe(fixture),
|
||||
case.expected,
|
||||
"{} full frame",
|
||||
case.name
|
||||
);
|
||||
assert_eq!(
|
||||
fixture.storage.bytes(),
|
||||
case.expected_ram,
|
||||
"{} complete RAM",
|
||||
case.name
|
||||
);
|
||||
assert_eq!(
|
||||
before_context,
|
||||
(
|
||||
fixture.context.memory as usize,
|
||||
fixture.context.scalable as usize,
|
||||
fixture.context.system as usize
|
||||
)
|
||||
);
|
||||
assert_eq!(before_mxcsr, mxcsr());
|
||||
if let Some(expected) = &case.expected_req4 {
|
||||
let actual = fixture.prepared.identity().memory_requirements;
|
||||
assert_eq!(
|
||||
u64::from(actual.required_flags),
|
||||
expected["required_flags"].as_u64().unwrap()
|
||||
);
|
||||
assert_eq!(
|
||||
u64::from(actual.required_host_caps),
|
||||
expected["required_host_caps"].as_u64().unwrap()
|
||||
);
|
||||
assert_eq!(
|
||||
u64::from(actual.required_profile),
|
||||
expected["required_profile"].as_u64().unwrap()
|
||||
);
|
||||
assert_eq!(
|
||||
format!("{:?}", actual.required_sp_alignment),
|
||||
expected["required_sp_alignment"].as_str().unwrap()
|
||||
);
|
||||
}
|
||||
assert_eq!(
|
||||
fixture.prepared.identity().execution_requirements_version,
|
||||
stela_compiler::aarch64::scalable::execution::SCALABLE_EXECUTION_REQUIREMENTS_VERSION
|
||||
);
|
||||
assert_ne!(
|
||||
observed["kind"], "error",
|
||||
"{} unexpected outer/finalization error",
|
||||
case.name
|
||||
);
|
||||
for key in ["kind", "status_code", "address", "pc", "completed_bytes"] {
|
||||
if let Some(expected) = case.expected_exit.get(key)
|
||||
&& !expected.is_null()
|
||||
{
|
||||
assert_eq!(&observed[key], expected, "{} {key}", case.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
#[ignore = "explicit frozen three-compiler Store functional activation only"]
|
||||
fn qualified_store_current17() {
|
||||
let cases = cases();
|
||||
assert_eq!(cases.len(), 17);
|
||||
for case in &cases {
|
||||
let _historical_policy = &case.historical_policy;
|
||||
let mut fixture = make_fixture(case);
|
||||
let before_mxcsr = mxcsr();
|
||||
let before_context = (
|
||||
fixture.context.memory as usize,
|
||||
fixture.context.scalable as usize,
|
||||
fixture.context.system as usize,
|
||||
);
|
||||
let mut alternate = None;
|
||||
let typed;
|
||||
let raw_exit;
|
||||
match case.projection.as_deref() {
|
||||
Some("mte0_tco_constructor") => {
|
||||
use crate::system::{
|
||||
pstate::TCO_MASK,
|
||||
state::{El1Registers, PSTATE_EL0T, StateError, SystemState},
|
||||
};
|
||||
let result =
|
||||
SystemState::new(PSTATE_EL0T | TCO_MASK, 0, El1Registers::new(0, 0, 0, 0, 0));
|
||||
assert!(
|
||||
matches!(result, Err(StateError::UnsupportedPstateBits(bits)) if bits == TCO_MASK)
|
||||
);
|
||||
raw_exit = format!("{result:?}");
|
||||
typed = serde_json::json!({"kind":"constructor_refused"});
|
||||
}
|
||||
Some("suppressed_constructor") => {
|
||||
use crate::system::scalable_controls::{Error, Implementation};
|
||||
use stela_compiler::{
|
||||
aarch64::scalable::VectorLength, context::memory::MemoryImplementationProfile,
|
||||
};
|
||||
let result = Implementation::declared_sca16(
|
||||
&[VectorLength::from_bytes(case.svl_bytes).unwrap()],
|
||||
MemoryImplementationProfile::StreamingSveTagSuppression,
|
||||
);
|
||||
assert!(matches!(
|
||||
result,
|
||||
Err(Error::UnsupportedImplementationProfile)
|
||||
));
|
||||
raw_exit = format!("{result:?}");
|
||||
typed = serde_json::json!({"kind":"constructor_refused"});
|
||||
}
|
||||
projection => {
|
||||
if projection == Some("unspecified_sca16") {
|
||||
fixture.sca16 = false;
|
||||
}
|
||||
if matches!(projection, Some("wrong_snapshot" | "wrong_domain")) {
|
||||
alternate = Some(make_fixture(case));
|
||||
let other = alternate.as_mut().unwrap();
|
||||
if projection == Some("wrong_snapshot") {
|
||||
fixture.ids = std::sync::Arc::clone(&other.ids);
|
||||
} else {
|
||||
std::mem::swap(&mut fixture.memory, &mut other.memory);
|
||||
}
|
||||
}
|
||||
let exit = fixture.execute();
|
||||
raw_exit = format!("{exit:?}");
|
||||
if let Some(projection) = projection {
|
||||
use super::ScalableExecutionError as Error;
|
||||
match projection {
|
||||
"unspecified_sca16" => assert!(matches!(exit, Err(Error::UnsupportedSourceAtomicity { actual: crate::system::scalable_controls::SourceAtomicity::Unspecified, .. }))),
|
||||
"wrong_snapshot" => assert!(matches!(exit, Err(Error::WrongIdentificationSnapshot { .. }))),
|
||||
"wrong_domain" => assert!(matches!(exit, Err(Error::MemoryAuthority { cause: crate::system::process_memory::ProcessMemoryError::WrongMemoryDomain, .. }))),
|
||||
_ => panic!("unrecognized current projection"),
|
||||
}
|
||||
typed = serde_json::json!({"kind":"outer_refused"});
|
||||
} else {
|
||||
typed = typed_exit(&exit);
|
||||
}
|
||||
}
|
||||
}
|
||||
let _keep_alternate_domain_live = alternate;
|
||||
durable(&serde_json::json!({"name":case.name,"exit":typed,
|
||||
"raw_exit":raw_exit,"qualified_call_attempted":!matches!(case.projection.as_deref(),Some("suppressed_constructor"|"mte0_tco_constructor")),
|
||||
"native_executed":matches!(typed["kind"].as_str(),Some("completed"|"fault")),
|
||||
"frame":Frame::observe(&fixture),
|
||||
"ram":fixture.storage.bytes(),"identity":format!("{:?}", fixture.prepared.identity()),
|
||||
"expected_req4":case.expected_req4,"artifact":artifact(&fixture),"mxcsr":mxcsr()}));
|
||||
validate(case, &fixture, &typed, before_context, before_mxcsr);
|
||||
}
|
||||
}
|
||||
#[test]
|
||||
#[ignore = "broker-supervised source-bound qualified Store timing sample only"]
|
||||
fn qualified_store_timing_sample() {
|
||||
let cases = cases();
|
||||
assert_eq!(cases.len(), 14);
|
||||
let index: usize = std::env::var("STELA_STORE_COHORT")
|
||||
.unwrap()
|
||||
.parse()
|
||||
.unwrap();
|
||||
let iterations: u64 = std::env::var("STELA_STORE_ITERATIONS")
|
||||
.unwrap()
|
||||
.parse()
|
||||
.unwrap();
|
||||
assert!((1..=MAX_ITERATIONS).contains(&iterations));
|
||||
let case = &cases[index];
|
||||
let mut fixture = make_fixture(case);
|
||||
let before_mxcsr = mxcsr();
|
||||
let before_context = (
|
||||
fixture.context.memory as usize,
|
||||
fixture.context.scalable as usize,
|
||||
fixture.context.system as usize,
|
||||
);
|
||||
// One warm correctness entry establishes full repeated-store effects.
|
||||
let warm = fixture.execute();
|
||||
let typed = typed_exit(&warm);
|
||||
durable(
|
||||
&serde_json::json!({"phase":"warm","name":case.name,"exit":typed,
|
||||
"frame":Frame::observe(&fixture),"ram":fixture.storage.bytes()}),
|
||||
);
|
||||
validate(case, &fixture, &typed, before_context, before_mxcsr);
|
||||
let policy_before = *fixture.memory.policy_mut();
|
||||
let system_before = fixture.system.clone();
|
||||
let mut completed = 0_u64;
|
||||
let mut failure = None;
|
||||
// Construction and allocation are outside the sample. The returned owner
|
||||
// borrows the actual Snapshot and disjoint fixture fields for this whole
|
||||
// scope; each call still performs the actual source/state qualification.
|
||||
let (wall_ns, process_cpu_ns) = {
|
||||
let mut entry = super::retained::RetainedEntry::new(&mut fixture);
|
||||
let cpu_start = cpu_ns();
|
||||
let start = Instant::now();
|
||||
for _ in 0..iterations {
|
||||
let exit = entry.execute();
|
||||
if !matches!(exit, Ok(ScalableLeafExit::Returned)) {
|
||||
failure = Some(format!("{exit:?}"));
|
||||
break;
|
||||
}
|
||||
completed += 1;
|
||||
if completed.is_multiple_of(DEADLINE_BATCH)
|
||||
&& start.elapsed().as_nanos() > MAX_SAMPLE_NS
|
||||
{
|
||||
failure = Some("cooperative250ms deadline exceeded".to_owned());
|
||||
break;
|
||||
}
|
||||
}
|
||||
(start.elapsed().as_nanos(), cpu_ns() - cpu_start)
|
||||
};
|
||||
assert_eq!(*fixture.memory.policy_mut(), policy_before);
|
||||
assert_eq!(fixture.system, system_before);
|
||||
let observation = serde_json::json!({"phase":"sample","name":case.name,"index":index,
|
||||
"entry":"retained-owner-per-call-qualification","owner_constructions":1,
|
||||
"requested_iterations":iterations,"completed_iterations":completed,
|
||||
"wall_ns":wall_ns,"process_cpu_ns":process_cpu_ns,"failure":failure,
|
||||
"frame":Frame::observe(&fixture),"ram":fixture.storage.bytes(),
|
||||
"identity":format!("{:?}",fixture.prepared.identity()),"mxcsr":mxcsr(),
|
||||
"placements":{"registers":(&fixture.registers as *const _) as usize,
|
||||
"context":(&fixture.context as *const _) as usize,"scalable":(&fixture.scalable as *const _) as usize}});
|
||||
durable(&observation);
|
||||
assert!(failure.is_none());
|
||||
assert_eq!(completed, iterations);
|
||||
assert!(wall_ns <= MAX_SAMPLE_NS);
|
||||
validate(
|
||||
case,
|
||||
&fixture,
|
||||
&serde_json::json!({"kind":"completed"}),
|
||||
before_context,
|
||||
before_mxcsr,
|
||||
);
|
||||
println!(
|
||||
"{MARKER}{}",
|
||||
serde_json::json!({"name":case.name,"index":index,
|
||||
"entry":"retained-owner-per-call-qualification","owner_constructions":1,
|
||||
"requested_iterations":iterations,"completed_iterations":completed,
|
||||
"wall_ns":wall_ns,"process_cpu_ns":process_cpu_ns,
|
||||
"compiler_source_sha256":fixture.prepared.identity().compiler_source_sha256,
|
||||
"source_sha256":fixture.prepared.identity().source_sha256,
|
||||
"native_sha256":fixture.prepared.identity().native_sha256,
|
||||
"native_bytes":fixture.prepared.native_bytes(),
|
||||
"source_map":fixture.prepared.source_map().iter().map(|(pc,offset)|(pc.0,*offset)).collect::<Vec<_>>() })
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "source-bound success cohorts through the same qualified fixture"]
|
||||
fn qualified_store_success14() {
|
||||
let cases = cases();
|
||||
assert_eq!(cases.len(), 14);
|
||||
for (index, case) in cases.iter().enumerate() {
|
||||
let mut fixture = make_fixture(case);
|
||||
let before_mxcsr = mxcsr();
|
||||
let pointers = (
|
||||
fixture.context.memory as usize,
|
||||
fixture.context.scalable as usize,
|
||||
fixture.context.system as usize,
|
||||
);
|
||||
let exit = fixture.execute();
|
||||
let typed = typed_exit(&exit);
|
||||
durable(
|
||||
&serde_json::json!({"name":case.name,"index":index,"exit":typed,"artifact":artifact(&fixture),
|
||||
"raw_exit":format!("{exit:?}"),"frame":Frame::observe(&fixture),
|
||||
"ram":fixture.storage.bytes(),"identity":format!("{:?}",fixture.prepared.identity())}),
|
||||
);
|
||||
validate(case, &fixture, &typed, pointers, before_mxcsr);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,508 @@
|
||||
//! Source-qualified native acceptance through the actual process-memory owner.
|
||||
use super::*;
|
||||
use crate::{
|
||||
memory::domain::{MemoryDomain, MemorySystem},
|
||||
system::state::{El1Registers, PSTATE_EL0T, PSTATE_IL_MASK},
|
||||
};
|
||||
use fixture::*;
|
||||
use std::sync::Arc;
|
||||
use stela_compiler::{TargetCpu, aarch64::scalable::ScalableMode, context::memory::MemoryStatus};
|
||||
|
||||
#[path = "tests/fixture.rs"]
|
||||
mod fixture;
|
||||
#[path = "tests/retained.rs"]
|
||||
mod retained;
|
||||
#[path = "stores.rs"]
|
||||
mod stores;
|
||||
|
||||
#[test]
|
||||
fn qualified_entry_owns_source_and_executes_same_snapshot_domain() {
|
||||
for (word, bytes, target, ram_base) in [
|
||||
(LD1B_Z1_P0_X5, 2, TargetCpu::Baseline, RAM),
|
||||
(LD1D_Z1_P0_X5, 8, wide_target(), RAM),
|
||||
(LD1B_Z1_P0_X5, 2, TargetCpu::Baseline, 0x800_1400_7400),
|
||||
] {
|
||||
let mut f = Fixture::new_program_at(
|
||||
&[MOV_X3_SEVEN, word, RET_X30],
|
||||
PC,
|
||||
ram_base,
|
||||
VL,
|
||||
target,
|
||||
target,
|
||||
None,
|
||||
1,
|
||||
ScalableMode::new(true, true),
|
||||
);
|
||||
assert!(
|
||||
f.ids
|
||||
.same_snapshot(f.controls.identification_snapshot().unwrap())
|
||||
);
|
||||
assert_eq!(f.prepared.source_map()[0].0, GuestAddress(PC));
|
||||
assert_eq!(f.prepared.source_map()[1].0, GuestAddress(PC + 4));
|
||||
assert!(!f.prepared.identity().native_sha256.is_empty());
|
||||
let ram = f.storage.bytes();
|
||||
let mut expected = f.registers.clone();
|
||||
expected.x[3] = 7;
|
||||
let mut expected_scalable = f.scalable.clone();
|
||||
let mut output = [0; VL];
|
||||
output[..bytes].copy_from_slice(&ram[..bytes]);
|
||||
expected_scalable
|
||||
.write_z(&mut expected, 1, &output)
|
||||
.unwrap();
|
||||
assert_eq!(f.execute().unwrap(), ScalableLeafExit::Returned);
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(
|
||||
banks(&f.registers, &f.scalable),
|
||||
banks(&expected, &expected_scalable)
|
||||
);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
}
|
||||
// Whole ZA-row and ZT0 transfers use their source SME helpers even with
|
||||
// SM=0. This is the two-bank legal control from the six C1 originals;
|
||||
// these executions are current declared-owner acceptance only.
|
||||
for (word, bytes, lookup, write) in [
|
||||
(LDR_ZA_W12_X5, VL, false, false),
|
||||
(STR_ZA_W12_X5, VL, false, true),
|
||||
(
|
||||
LDR_ZT0_X5,
|
||||
stela_compiler::aarch64::scalable::LOOKUP_TABLE_BYTES,
|
||||
true,
|
||||
false,
|
||||
),
|
||||
(
|
||||
STR_ZT0_X5,
|
||||
stela_compiler::aarch64::scalable::LOOKUP_TABLE_BYTES,
|
||||
true,
|
||||
true,
|
||||
),
|
||||
] {
|
||||
let mut f = Fixture::new_program_at(
|
||||
&[MOV_X3_SEVEN, word, RET_X30],
|
||||
PC,
|
||||
RAM,
|
||||
VL,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
None,
|
||||
1,
|
||||
ScalableMode::new(false, true),
|
||||
);
|
||||
let mut ram = f.storage.bytes();
|
||||
let mut expected = f.registers.clone();
|
||||
expected.x[3] = 7;
|
||||
let mut scalable = f.scalable.clone();
|
||||
if write {
|
||||
ram[..bytes].fill(if lookup { 0x35 } else { 0x6d });
|
||||
} else if lookup {
|
||||
scalable.write_zt0(0, &ram[..bytes]).unwrap();
|
||||
} else {
|
||||
scalable.write_za(0, &ram[..bytes]).unwrap();
|
||||
}
|
||||
assert_eq!(f.execute().unwrap(), ScalableLeafExit::Returned);
|
||||
assert_eq!(f.registers, expected);
|
||||
// SM=0 intentionally makes Z/P/FFR public reads unavailable; Debug
|
||||
// observes the complete owned allocations without changing mode or
|
||||
// zeroing ZA by a false re-enable solely for inspection.
|
||||
assert_eq!(format!("{:?}", f.scalable), format!("{scalable:?}"));
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn same_domain_observation_excludes_scalable_entry_until_released() {
|
||||
let mut f = Fixture::new(
|
||||
LD1B_Z1_P0_X5,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
None,
|
||||
);
|
||||
let before = f.registers.clone();
|
||||
assert_ne!(before.x[3], 7);
|
||||
assert_eq!(&f.prepared.source()[..4], &MOV_X3_SEVEN.to_le_bytes());
|
||||
let state = banks(&f.registers, &f.scalable);
|
||||
let ram = f.storage.bytes();
|
||||
let generation = f.domain.generation().unwrap();
|
||||
// The opaque observation holds the actual thread's same-domain service
|
||||
// loan. Admission must decline before any prefix or policy installation.
|
||||
let observation = f.memory.observation_loan().unwrap();
|
||||
assert!(matches!(
|
||||
f.execute(),
|
||||
Err(ScalableExecutionError::MemoryAuthority {
|
||||
cause: ProcessMemoryError::Memory(MemoryStatus::Domain),
|
||||
pc: GuestAddress(PC),
|
||||
})
|
||||
));
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
assert_eq!(f.domain.generation().unwrap(), generation);
|
||||
// Reuse the same prepared body, source witness, controls and state. Dropping
|
||||
// a read-only loan changes neither mapping generation nor source authority.
|
||||
drop(observation);
|
||||
let mut expected = before;
|
||||
expected.x[3] = 7;
|
||||
let mut expected_scalable = f.scalable.clone();
|
||||
let mut output = [0; VL];
|
||||
output[..2].copy_from_slice(&ram[..2]);
|
||||
expected_scalable
|
||||
.write_z(&mut expected, 1, &output)
|
||||
.unwrap();
|
||||
assert_eq!(f.execute().unwrap(), ScalableLeafExit::Returned);
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(
|
||||
banks(&f.registers, &f.scalable),
|
||||
banks(&expected, &expected_scalable)
|
||||
);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
assert_eq!(f.domain.generation().unwrap(), generation);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn distinct_snapshot_and_wrong_domain_decline_before_prefix() {
|
||||
let mut f = Fixture::new(
|
||||
LD1B_Z1_P0_X5,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
None,
|
||||
);
|
||||
let before = f.registers.clone();
|
||||
let state = banks(&f.registers, &f.scalable);
|
||||
let ram = f.storage.bytes();
|
||||
f.ids = snapshot(true, 1);
|
||||
assert!(matches!(
|
||||
f.execute(),
|
||||
Err(ScalableExecutionError::WrongIdentificationSnapshot {
|
||||
pc: GuestAddress(PC)
|
||||
})
|
||||
));
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
// Restore a single shared identification allocation, then use an empty
|
||||
// different domain solely for the negative identity control; no native
|
||||
// body is allowed to enter that owner.
|
||||
f.ids = snapshot(true, 1);
|
||||
f.controls = fixed(Arc::clone(&f.ids), &f.domain, true).unwrap();
|
||||
let wrong = MemoryDomain::new_for_address_space(
|
||||
7,
|
||||
MemorySystem::new(VL as u64, 4).unwrap(),
|
||||
Vec::new(),
|
||||
TargetCpu::Baseline,
|
||||
)
|
||||
.unwrap();
|
||||
f.memory = wrong.thread(*f.memory.policy_mut());
|
||||
assert!(matches!(
|
||||
f.execute(),
|
||||
Err(ScalableExecutionError::MemoryAuthority {
|
||||
cause: ProcessMemoryError::WrongMemoryDomain,
|
||||
..
|
||||
})
|
||||
));
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn source_sca_and_lse2_requirements_decline_before_prefix() {
|
||||
let mut f = Fixture::new(
|
||||
LD1B_Z1_P0_X5,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
None,
|
||||
);
|
||||
let before = f.registers.clone();
|
||||
let state = banks(&f.registers, &f.scalable);
|
||||
let ram = f.storage.bytes();
|
||||
f.sca16 = false;
|
||||
assert!(matches!(
|
||||
f.execute(),
|
||||
Err(ScalableExecutionError::UnsupportedSourceAtomicity {
|
||||
actual: SourceAtomicity::Unspecified,
|
||||
..
|
||||
})
|
||||
));
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
assert!(matches!(
|
||||
fixed(snapshot(false, 1), &f.domain, true),
|
||||
Err(ProcessMemoryError::UnsupportedFeature {
|
||||
register: "ID_AA64MMFR2_EL1",
|
||||
field: "AT",
|
||||
value: 0
|
||||
})
|
||||
));
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
for word in [LD1D_Z1_P0_X5, ST1Q_ZA_P0_X5] {
|
||||
let mut f = Fixture::new(word, wide_target(), TargetCpu::Baseline, None);
|
||||
let before = f.registers.clone();
|
||||
let state = banks(&f.registers, &f.scalable);
|
||||
let ram = f.storage.bytes();
|
||||
assert_eq!(
|
||||
f.execute().unwrap(),
|
||||
ScalableLeafExit::EntryDeclined(MemoryStatus::Unsupported)
|
||||
);
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn helper_za_sp_and_feature_failures_precede_prefix() {
|
||||
for cpacr in [
|
||||
ALL_ACCESS & !(3 << SMEN_SHIFT),
|
||||
ALL_ACCESS & !(3 << FPEN_SHIFT),
|
||||
] {
|
||||
let mut f = Fixture::new(LD1Q_ZA_P0_X5, wide_target(), wide_target(), None);
|
||||
f.cpacr = cpacr;
|
||||
let before = f.registers.clone();
|
||||
let state = banks(&f.registers, &f.scalable);
|
||||
let ram = f.storage.bytes();
|
||||
assert!(matches!(
|
||||
f.execute(),
|
||||
Err(ScalableExecutionError::Control {
|
||||
cause: scalable_controls::Error::PreflightTrap(_),
|
||||
..
|
||||
})
|
||||
));
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
}
|
||||
let mut f = Fixture::new(LD1Q_ZA_P0_X5, wide_target(), wide_target(), None);
|
||||
f.scalable
|
||||
.apply_mode(&mut f.registers, ScalableMode::new(true, false))
|
||||
.unwrap();
|
||||
let scalable_before = format!("{:?}", f.scalable);
|
||||
let before = f.registers.clone();
|
||||
let ram = f.storage.bytes();
|
||||
assert!(matches!(
|
||||
f.execute(),
|
||||
Err(ScalableExecutionError::Control {
|
||||
cause: scalable_controls::Error::PreflightTrap(_),
|
||||
..
|
||||
})
|
||||
));
|
||||
assert_eq!(f.registers, before);
|
||||
assert_eq!(format!("{:?}", f.scalable), scalable_before);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
let mut f = Fixture::new(
|
||||
LD1B_Z1_P0_SP,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
None,
|
||||
);
|
||||
f.controls = fixed(Arc::clone(&f.ids), &f.domain, false).unwrap();
|
||||
let before = f.registers.clone();
|
||||
let state = banks(&f.registers, &f.scalable);
|
||||
let ram = f.storage.bytes();
|
||||
assert_eq!(
|
||||
f.execute().unwrap(),
|
||||
ScalableLeafExit::EntryDeclined(MemoryStatus::Unsupported)
|
||||
);
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
f.system = SystemState::new(
|
||||
PSTATE_EL0T | PSTATE_IL_MASK,
|
||||
0,
|
||||
El1Registers::new(0, 0, 0, 0, 0),
|
||||
)
|
||||
.unwrap();
|
||||
assert!(matches!(
|
||||
f.execute(),
|
||||
Err(ScalableExecutionError::MemoryAuthority {
|
||||
cause: ProcessMemoryError::IllegalExecutionState,
|
||||
..
|
||||
})
|
||||
));
|
||||
unchanged(&f, &before, &state, &ram);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn q16_native_aligned_residue8_and_other_residues() {
|
||||
for word in [LD1Q_ZA_P0_X5, ST1Q_ZA_P0_X5] {
|
||||
for residue in [0, 8, 1, 15] {
|
||||
let mut f = Fixture::new(word, wide_target(), wide_target(), None);
|
||||
f.registers.x[5] += residue as u64;
|
||||
let mut ram = f.storage.bytes();
|
||||
let mut expected = f.registers.clone();
|
||||
expected.x[3] = 7;
|
||||
let mut scalable = f.scalable.clone();
|
||||
if word == LD1Q_ZA_P0_X5 {
|
||||
scalable.write_za(0, &ram[residue..residue + VL]).unwrap();
|
||||
} else {
|
||||
ram[residue..residue + VL].fill(0x6d);
|
||||
}
|
||||
assert_eq!(f.execute().unwrap(), ScalableLeafExit::Returned);
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(
|
||||
banks(&f.registers, &f.scalable),
|
||||
banks(&expected, &scalable)
|
||||
);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn qualified_q16_translation_permission_order_and_prefix() {
|
||||
// SME retains its descriptor and uses byte parts when an unaligned Q
|
||||
// straddles the declared SCA16 granule. Permission and translation controls
|
||||
// independently fault at the first inaccessible reached byte.
|
||||
for word in [LD1Q_ZA_P0_X5, ST1Q_ZA_P0_X5, ST2Q_Z1_P0_X5] {
|
||||
for translation in [false, true] {
|
||||
let mut f = if word == ST2Q_Z1_P0_X5 {
|
||||
Fixture::new_program(
|
||||
&[MOV_X3_SEVEN, word, RET_X30],
|
||||
PC,
|
||||
VL,
|
||||
wide_target(),
|
||||
wide_target(),
|
||||
Some((11, translation)),
|
||||
)
|
||||
} else {
|
||||
Fixture::new(word, wide_target(), wide_target(), Some((11, translation)))
|
||||
};
|
||||
f.registers.x[5] += 8;
|
||||
let mut ram = f.storage.bytes();
|
||||
let mut expected = f.registers.clone();
|
||||
expected.x[3] = 7;
|
||||
let state = banks(&expected, &f.scalable);
|
||||
if word == ST1Q_ZA_P0_X5 {
|
||||
ram[8..11].fill(0x6d);
|
||||
}
|
||||
assert_eq!(
|
||||
f.execute().unwrap(),
|
||||
ScalableLeafExit::MemoryFault(crate::scalable::leaf::MemoryFault {
|
||||
status: if translation {
|
||||
MemoryStatus::Translation
|
||||
} else {
|
||||
MemoryStatus::Permission
|
||||
},
|
||||
address: GuestAddress(RAM + if word == ST2Q_Z1_P0_X5 { 8 } else { 11 }),
|
||||
pc: GuestAddress(PC + 4),
|
||||
completed_bytes: if word == ST2Q_Z1_P0_X5 { 0 } else { 3 },
|
||||
})
|
||||
);
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(banks(&f.registers, &f.scalable), state);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn qualified_callback_and_inactive_sp_faults_reset_next_entry() {
|
||||
for translation in [false, true] {
|
||||
let mut f = Fixture::new(
|
||||
LD1B_Z1_P0_X5,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
Some((1, translation)),
|
||||
);
|
||||
let ram = f.storage.bytes();
|
||||
let mut expected = f.registers.clone();
|
||||
expected.x[3] = 7;
|
||||
let state = banks(&expected, &f.scalable);
|
||||
assert_eq!(
|
||||
f.execute().unwrap(),
|
||||
ScalableLeafExit::MemoryFault(crate::scalable::leaf::MemoryFault {
|
||||
status: if translation {
|
||||
MemoryStatus::Translation
|
||||
} else {
|
||||
MemoryStatus::Permission
|
||||
},
|
||||
address: GuestAddress(RAM + 1),
|
||||
pc: GuestAddress(PC + 4),
|
||||
completed_bytes: 1,
|
||||
})
|
||||
);
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(banks(&f.registers, &f.scalable), state);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
}
|
||||
let mut f = Fixture::new(
|
||||
LD1B_Z1_P0_SP,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
None,
|
||||
);
|
||||
f.scalable.write_predicate(0, &[0; VL / 8]).unwrap();
|
||||
f.registers.sp = RAM + 1;
|
||||
let ram = f.storage.bytes();
|
||||
let mut expected = f.registers.clone();
|
||||
expected.x[3] = 7;
|
||||
let mut scalable = f.scalable.clone();
|
||||
assert_eq!(
|
||||
f.execute().unwrap(),
|
||||
ScalableLeafExit::MemoryFault(crate::scalable::leaf::MemoryFault {
|
||||
status: MemoryStatus::StackAlignment,
|
||||
address: GuestAddress(RAM + 1),
|
||||
pc: GuestAddress(PC + 4),
|
||||
completed_bytes: 0,
|
||||
})
|
||||
);
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(
|
||||
banks(&f.registers, &f.scalable),
|
||||
banks(&expected, &scalable)
|
||||
);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
f.registers.sp = RAM;
|
||||
expected.sp = RAM;
|
||||
scalable.write_z(&mut expected, 1, &[0; VL]).unwrap();
|
||||
assert_eq!(f.execute().unwrap(), ScalableLeafExit::Returned);
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(
|
||||
banks(&f.registers, &f.scalable),
|
||||
banks(&expected, &scalable)
|
||||
);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn qualified_finalization_failure_preserves_effects_and_blocks_reentry() {
|
||||
for fault in [false, true] {
|
||||
let mut f = Fixture::new(
|
||||
LD1B_Z1_P0_X5,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
if fault { Some((1, false)) } else { None },
|
||||
);
|
||||
let ram = f.storage.bytes();
|
||||
let mut expected = f.registers.clone();
|
||||
expected.x[3] = 7;
|
||||
let mut scalable = f.scalable.clone();
|
||||
if !fault {
|
||||
let mut z = [0; VL];
|
||||
z[..2].copy_from_slice(&ram[..2]);
|
||||
scalable.write_z(&mut expected, 1, &z).unwrap();
|
||||
}
|
||||
let original_fault = fault.then_some(crate::scalable::leaf::MemoryFault {
|
||||
status: MemoryStatus::Permission,
|
||||
address: GuestAddress(RAM + 1),
|
||||
pc: GuestAddress(PC + 4),
|
||||
completed_bytes: 1,
|
||||
});
|
||||
f.memory.inject_post_body_failure_once_for_test();
|
||||
assert_eq!(
|
||||
f.execute().unwrap(),
|
||||
ScalableLeafExit::FinalizationFailed {
|
||||
status: MemoryStatus::Domain,
|
||||
native_executed: true,
|
||||
completed_bytes: if fault { 1 } else { 2 },
|
||||
original_fault,
|
||||
}
|
||||
);
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(
|
||||
banks(&f.registers, &f.scalable),
|
||||
banks(&expected, &scalable)
|
||||
);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
f.registers.x[3] = 0x5432;
|
||||
expected.x[3] = 0x5432;
|
||||
assert!(matches!(
|
||||
f.execute(),
|
||||
Err(ScalableExecutionError::MemoryAuthority {
|
||||
pc: GuestAddress(PC),
|
||||
cause: ProcessMemoryError::Memory(MemoryStatus::Domain),
|
||||
})
|
||||
));
|
||||
assert_eq!(f.registers, expected);
|
||||
assert_eq!(
|
||||
banks(&f.registers, &f.scalable),
|
||||
banks(&expected, &scalable)
|
||||
);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,511 @@
|
||||
//! Real prepared native entry for a declared fresh CPU and one retained domain.
|
||||
//! These are software-owner acceptance tests, not captured ARM observations.
|
||||
use super::super::super::{SCTLR_NATIVE_NORMAL_WB, SCTLR_SP_ALIGNMENT_EL0, SourceNormalWbDomain};
|
||||
use super::super::*;
|
||||
use crate::{
|
||||
memory::{
|
||||
backing::{AccessPermissions, MemoryBacking, MemoryView},
|
||||
domain::{MappingAttributes, MemoryDomain, MemorySystem},
|
||||
policy::{LowerAddressProfile, TagCheckFaultMode},
|
||||
},
|
||||
system::{
|
||||
identification::Register,
|
||||
identification_snapshot::Snapshot,
|
||||
scalable_controls::{Implementation, Readbacks},
|
||||
state::{El1Registers, PSTATE_EL0T},
|
||||
},
|
||||
};
|
||||
use std::{
|
||||
alloc::{Layout, alloc_zeroed, dealloc},
|
||||
ptr::NonNull,
|
||||
sync::Arc,
|
||||
};
|
||||
use stela_compiler::{
|
||||
TargetCpu,
|
||||
aarch64::scalable::{
|
||||
LOOKUP_TABLE_BYTES, PREDICATE_REGISTER_COUNT, ScalableMode, VECTOR_CHUNK_BYTES,
|
||||
VECTOR_REGISTER_COUNT, VectorLength,
|
||||
features::{ScalableFeature, ScalableFeatures},
|
||||
profile::ScalableControls,
|
||||
},
|
||||
context::{ScalableStateView, memory::MemoryImplementationProfile},
|
||||
extended::ScalableProfile,
|
||||
};
|
||||
|
||||
pub(super) const PC: u64 = 0x1000;
|
||||
pub(super) const RAM: u64 = 0x1400_74000;
|
||||
pub(super) const VL: usize = VECTOR_CHUNK_BYTES;
|
||||
pub(super) const DATA_BYTES: usize = 8192;
|
||||
pub(super) const CODE_PAGE_BYTES: usize = 4096;
|
||||
pub(super) const ST2Q_Z1_P0_X5: u32 = 0xe440_00a1;
|
||||
pub(super) const LDR_ZA_W12_X5: u32 = 0xe100_00a0;
|
||||
pub(super) const STR_ZA_W12_X5: u32 = 0xe120_00a0;
|
||||
pub(super) const LDR_ZT0_X5: u32 = 0xe11f_80a0;
|
||||
pub(super) const STR_ZT0_X5: u32 = 0xe13f_80a0;
|
||||
pub(super) const STORAGE_BYTES: usize = DATA_BYTES + CODE_PAGE_BYTES;
|
||||
pub(super) const LOWER_BITS: u8 = 44;
|
||||
pub(super) const RET_X30: u32 = 0xd65f_03c0;
|
||||
pub(super) const MOV_X3_SEVEN: u32 = 0xd280_00e3;
|
||||
pub(super) const LD1B_Z1_P0_X5: u32 = 0xa400_a0a1;
|
||||
pub(super) const LD1B_Z1_P0_SP: u32 = 0xa400_a3e1;
|
||||
pub(super) const LD1D_Z1_P0_X5: u32 = 0xa5e0_a0a1;
|
||||
pub(super) const LD1Q_ZA_P0_X5: u32 = 0xe1c0_00a0;
|
||||
pub(super) const ST1Q_ZA_P0_X5: u32 = 0xe1e0_00a0;
|
||||
pub(super) const FPEN_SHIFT: u32 = 20;
|
||||
pub(super) const ZEN_SHIFT: u32 = 16;
|
||||
pub(super) const SMEN_SHIFT: u32 = 24;
|
||||
pub(super) const ALL_ACCESS: u64 = (3 << FPEN_SHIFT) | (3 << ZEN_SHIFT) | (3 << SMEN_SHIFT);
|
||||
pub(super) const EZT0: u64 = 1 << 30;
|
||||
pub(super) const DATA_RIGHTS: AccessPermissions = AccessPermissions {
|
||||
readable: true,
|
||||
writable: true,
|
||||
executable: false,
|
||||
};
|
||||
|
||||
// Same pinned raw-storage ownership as scalable::leaf::tests. Bytes are read
|
||||
// only between synchronous entries and every native write uses this one domain.
|
||||
pub(super) struct Storage {
|
||||
pointer: NonNull<u8>,
|
||||
layout: Layout,
|
||||
}
|
||||
// SAFETY: no byte references escape; Arc retains the allocation through entry.
|
||||
unsafe impl Send for Storage {}
|
||||
// SAFETY: tests serialize native entry and all observations of the raw bytes.
|
||||
unsafe impl Sync for Storage {}
|
||||
impl Storage {
|
||||
fn new(source: &[u8]) -> Arc<Self> {
|
||||
assert!(source.len() <= CODE_PAGE_BYTES);
|
||||
let layout = Layout::from_size_align(STORAGE_BYTES, VL).unwrap();
|
||||
// SAFETY: valid allocation and matching deallocation in Drop.
|
||||
let pointer = NonNull::new(unsafe { alloc_zeroed(layout) }).unwrap();
|
||||
for offset in 0..DATA_BYTES {
|
||||
// SAFETY: exclusive allocation before publication into any domain.
|
||||
unsafe { pointer.as_ptr().add(offset).write((offset & 255) as u8) };
|
||||
}
|
||||
// SAFETY: source fits the separate code page, before publication.
|
||||
unsafe {
|
||||
std::ptr::copy_nonoverlapping(
|
||||
source.as_ptr(),
|
||||
pointer.as_ptr().add(DATA_BYTES),
|
||||
source.len(),
|
||||
)
|
||||
};
|
||||
Arc::new(Self { pointer, layout })
|
||||
}
|
||||
pub(super) fn bytes(&self) -> Vec<u8> {
|
||||
// SAFETY: callers observe only between synchronous invocations.
|
||||
unsafe { std::slice::from_raw_parts(self.pointer.as_ptr(), DATA_BYTES).to_vec() }
|
||||
}
|
||||
/// Initialize retained fixture bytes before the first domain operation.
|
||||
/// Caller must exclude all live reservations, readers and competing writers.
|
||||
pub(super) unsafe fn write_bytes(&self, bytes: &[u8]) {
|
||||
assert!(bytes.len() <= DATA_BYTES);
|
||||
// SAFETY: caller excludes native invocation and every competing reader.
|
||||
unsafe {
|
||||
std::ptr::copy_nonoverlapping(bytes.as_ptr(), self.pointer.as_ptr(), bytes.len())
|
||||
};
|
||||
}
|
||||
}
|
||||
impl Drop for Storage {
|
||||
fn drop(&mut self) {
|
||||
// SAFETY: final Arc releases the exact allocation and original layout.
|
||||
unsafe { dealloc(self.pointer.as_ptr(), self.layout) };
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn snapshot(lse2: bool, sme_version: u64) -> Arc<Snapshot> {
|
||||
Arc::new(
|
||||
Snapshot::declared(
|
||||
"qualified-scalable-native-software-owner",
|
||||
&[
|
||||
(Register::IdAa64Pfr0El1, 0x11),
|
||||
(Register::IdAa64Pfr1El1, 2 << 24),
|
||||
(Register::IdAa64Smfr0El1, sme_version << 56),
|
||||
(Register::IdAa64Zfr0El1, 0),
|
||||
(Register::IdAa64Isar1El1, 0),
|
||||
(Register::IdAa64Isar3El1, 0),
|
||||
(Register::IdAa64Dfr0El1, 0),
|
||||
(Register::IdAa64Mmfr0El1, 0),
|
||||
(Register::IdAa64Mmfr2El1, u64::from(lse2) << 32),
|
||||
(Register::IdAa64Mmfr3El1, 0),
|
||||
(Register::IdAa64Mmfr4El1, 0),
|
||||
],
|
||||
)
|
||||
.unwrap(),
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn fixed(
|
||||
ids: Arc<Snapshot>,
|
||||
domain: &Arc<MemoryDomain>,
|
||||
sa0: bool,
|
||||
) -> Result<FixedProcessMemoryControls, ProcessMemoryError> {
|
||||
// SAFETY: this fixture explicitly declares the actual data and code views
|
||||
// Normal-WB with matching source/native rights. No second memory domain or
|
||||
// external raw writer participates in native invocation.
|
||||
let source = unsafe { SourceNormalWbDomain::from_source_resolved(Arc::clone(domain)) }
|
||||
.map_err(ProcessMemoryError::Memory)?;
|
||||
FixedProcessMemoryControls::new_with_identification(
|
||||
ids,
|
||||
SCTLR_NATIVE_NORMAL_WB | if sa0 { SCTLR_SP_ALIGNMENT_EL0 } else { 0 },
|
||||
64 - u64::from(LOWER_BITS),
|
||||
LOWER_BITS,
|
||||
source,
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn access(
|
||||
ids: &Snapshot,
|
||||
sca16: bool,
|
||||
cpacr: u64,
|
||||
bytes: usize,
|
||||
) -> ScalableControlOwner<'_> {
|
||||
let lengths = [VectorLength::from_bytes(bytes).unwrap()];
|
||||
let implementation = if sca16 {
|
||||
Implementation::declared_sca16(&lengths, MemoryImplementationProfile::ScalableTagChecks)
|
||||
} else {
|
||||
Implementation::declared(&lengths, MemoryImplementationProfile::ScalableTagChecks)
|
||||
}
|
||||
.unwrap();
|
||||
ScalableControlOwner::new_declared_el10(
|
||||
ids,
|
||||
Readbacks {
|
||||
cpacr_el1: cpacr,
|
||||
smcr_el1: EZT0,
|
||||
},
|
||||
implementation,
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
fn profile(bytes: usize, sme_version: u64, mode: ScalableMode) -> ScalableProfile {
|
||||
let length = VectorLength::from_bytes(bytes).unwrap();
|
||||
let features = ScalableFeatures::of(ScalableFeature::Sme).with(ScalableFeature::Sme2);
|
||||
let features = if sme_version >= 2 {
|
||||
features.with(ScalableFeature::Sme2p1)
|
||||
} else {
|
||||
features
|
||||
};
|
||||
ScalableProfile::new_with_features(length, mode, features, ScalableControls::new(length, true))
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub(super) struct Banks {
|
||||
z: Vec<Vec<u8>>,
|
||||
p: Vec<Vec<u8>>,
|
||||
ffr: Vec<u8>,
|
||||
za: Vec<u8>,
|
||||
zt0: Vec<u8>,
|
||||
tpidr2: u64,
|
||||
fpmr: u64,
|
||||
mode: ScalableMode,
|
||||
}
|
||||
pub(super) fn banks(registers: &GuestState, scalable: &ScalableState) -> Banks {
|
||||
let bytes = scalable.vector_length().bytes();
|
||||
let z = (0..VECTOR_REGISTER_COUNT)
|
||||
.map(|i| {
|
||||
let mut b = vec![0; bytes];
|
||||
scalable.read_z(registers, i, &mut b).unwrap();
|
||||
b
|
||||
})
|
||||
.collect();
|
||||
let p = (0..PREDICATE_REGISTER_COUNT)
|
||||
.map(|i| {
|
||||
let mut b = vec![0; bytes / 8];
|
||||
scalable.read_predicate(i, &mut b).unwrap();
|
||||
b
|
||||
})
|
||||
.collect();
|
||||
let mut ffr = vec![0; bytes / 8];
|
||||
scalable.read_ffr(&mut ffr).unwrap();
|
||||
let mut za = vec![0; bytes * bytes];
|
||||
scalable.read_za(0, &mut za).unwrap();
|
||||
let mut zt0 = vec![0; LOOKUP_TABLE_BYTES];
|
||||
scalable.read_zt0(0, &mut zt0).unwrap();
|
||||
Banks {
|
||||
z,
|
||||
p,
|
||||
ffr,
|
||||
za,
|
||||
zt0,
|
||||
tpidr2: scalable.tpidr2_el0(),
|
||||
fpmr: scalable.fpmr(),
|
||||
mode: scalable.mode(),
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) struct Fixture {
|
||||
pub(super) storage: Arc<Storage>,
|
||||
pub(super) domain: Arc<MemoryDomain>,
|
||||
pub(super) ids: Arc<Snapshot>,
|
||||
pub(super) controls: FixedProcessMemoryControls,
|
||||
pub(super) prepared: PreparedScalableLeaf,
|
||||
pub(super) memory: MemoryThread<MemoryControls>,
|
||||
pub(super) system: SystemState,
|
||||
pub(super) registers: GuestState,
|
||||
pub(super) scalable: ScalableState,
|
||||
pub(super) context: ExecutionContext,
|
||||
pub(super) sca16: bool,
|
||||
pub(super) cpacr: u64,
|
||||
pub(super) svl_bytes: usize,
|
||||
}
|
||||
impl Fixture {
|
||||
pub(super) fn new(
|
||||
word: u32,
|
||||
compiler_target: TargetCpu,
|
||||
domain_target: TargetCpu,
|
||||
split: Option<(usize, bool)>,
|
||||
) -> Self {
|
||||
Self::new_program_at(
|
||||
&[MOV_X3_SEVEN, word, RET_X30],
|
||||
PC,
|
||||
RAM,
|
||||
VL,
|
||||
compiler_target,
|
||||
domain_target,
|
||||
split,
|
||||
1,
|
||||
ScalableMode::new(true, true),
|
||||
)
|
||||
}
|
||||
pub(super) fn new_program(
|
||||
words: &[u32],
|
||||
guest_base: u64,
|
||||
svl_bytes: usize,
|
||||
compiler_target: TargetCpu,
|
||||
domain_target: TargetCpu,
|
||||
split: Option<(usize, bool)>,
|
||||
) -> Self {
|
||||
Self::new_program_at(
|
||||
words,
|
||||
guest_base,
|
||||
RAM,
|
||||
svl_bytes,
|
||||
compiler_target,
|
||||
domain_target,
|
||||
split,
|
||||
2,
|
||||
ScalableMode::new(true, true),
|
||||
)
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) fn new_program_at(
|
||||
words: &[u32],
|
||||
guest_base: u64,
|
||||
ram_base: u64,
|
||||
svl_bytes: usize,
|
||||
compiler_target: TargetCpu,
|
||||
domain_target: TargetCpu,
|
||||
split: Option<(usize, bool)>,
|
||||
sme_version: u64,
|
||||
mode: ScalableMode,
|
||||
) -> Self {
|
||||
assert!(
|
||||
compiler_target.supported(),
|
||||
"actual host lacks required native test recipe"
|
||||
);
|
||||
let source: Vec<u8> = words.iter().flat_map(|word| word.to_le_bytes()).collect();
|
||||
let storage = Storage::new(&source);
|
||||
// SAFETY: raw storage is pinned, owned, disjoint and never accessed
|
||||
// concurrently with the single domain's synchronous native invocation.
|
||||
let backing = unsafe {
|
||||
MemoryBacking::new(
|
||||
storage.pointer,
|
||||
STORAGE_BYTES,
|
||||
AccessPermissions {
|
||||
executable: true,
|
||||
..DATA_RIGHTS
|
||||
},
|
||||
Arc::clone(&storage),
|
||||
)
|
||||
}
|
||||
.unwrap();
|
||||
let mut views = Vec::new();
|
||||
if let Some((boundary, translation)) = split {
|
||||
assert!((1..DATA_BYTES).contains(&boundary));
|
||||
views.push(
|
||||
MemoryView::new(Arc::clone(&backing), ram_base, 0, boundary, DATA_RIGHTS).unwrap(),
|
||||
);
|
||||
if !translation {
|
||||
views.push(
|
||||
MemoryView::new(
|
||||
Arc::clone(&backing),
|
||||
ram_base + boundary as u64,
|
||||
boundary,
|
||||
DATA_BYTES - boundary,
|
||||
AccessPermissions {
|
||||
readable: false,
|
||||
writable: false,
|
||||
executable: false,
|
||||
},
|
||||
)
|
||||
.unwrap(),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
views.push(
|
||||
MemoryView::new(Arc::clone(&backing), ram_base, 0, DATA_BYTES, DATA_RIGHTS)
|
||||
.unwrap(),
|
||||
);
|
||||
}
|
||||
views.push(
|
||||
MemoryView::new(
|
||||
backing,
|
||||
guest_base,
|
||||
DATA_BYTES,
|
||||
CODE_PAGE_BYTES,
|
||||
AccessPermissions {
|
||||
readable: true,
|
||||
writable: false,
|
||||
executable: true,
|
||||
},
|
||||
)
|
||||
.unwrap(),
|
||||
);
|
||||
let domain = MemoryDomain::new_for_address_space(
|
||||
7,
|
||||
MemorySystem::new(VL as u64, 4).unwrap(),
|
||||
views
|
||||
.into_iter()
|
||||
.map(|view| {
|
||||
(
|
||||
view,
|
||||
MappingAttributes {
|
||||
tagged: false,
|
||||
shareable: true,
|
||||
},
|
||||
)
|
||||
})
|
||||
.collect(),
|
||||
domain_target,
|
||||
)
|
||||
.unwrap();
|
||||
let ids = snapshot(true, sme_version);
|
||||
let controls = fixed(Arc::clone(&ids), &domain, true).unwrap();
|
||||
let memory = domain.thread(MemoryControls::new(
|
||||
LowerAddressProfile::new(LOWER_BITS, false).unwrap(),
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
TagCheckFaultMode::Ignore,
|
||||
false,
|
||||
));
|
||||
let prepared = PreparedScalableLeaf::prepare(
|
||||
&source,
|
||||
GuestAddress(guest_base),
|
||||
profile(svl_bytes, sme_version, mode),
|
||||
compiler_target,
|
||||
)
|
||||
.unwrap();
|
||||
let mut registers = GuestState::default();
|
||||
registers.x[3] = 0x5432;
|
||||
registers.x[5] = ram_base;
|
||||
registers.sp = ram_base;
|
||||
registers.nzcv = 0xa000_0000;
|
||||
registers.fpcr = 0x07c0_0000;
|
||||
registers.fpsr = 0x8800_009f;
|
||||
let mut scalable =
|
||||
ScalableState::new(profile(svl_bytes, sme_version, mode).vector_length(), true);
|
||||
scalable
|
||||
.apply_mode(&mut registers, ScalableMode::new(true, true))
|
||||
.unwrap();
|
||||
for i in 0..VECTOR_REGISTER_COUNT {
|
||||
scalable
|
||||
.write_z(&mut registers, i, &vec![i + 1; svl_bytes])
|
||||
.unwrap();
|
||||
}
|
||||
for i in 0..PREDICATE_REGISTER_COUNT {
|
||||
scalable
|
||||
.write_predicate(i, &vec![i.wrapping_mul(17); svl_bytes / 8])
|
||||
.unwrap();
|
||||
}
|
||||
let mut predicate = vec![0; svl_bytes / 8];
|
||||
predicate[0] = 3;
|
||||
scalable.write_predicate(0, &predicate).unwrap();
|
||||
scalable.write_ffr(&vec![0xa5; svl_bytes / 8]).unwrap();
|
||||
scalable
|
||||
.write_za(0, &vec![0x6d; svl_bytes * svl_bytes])
|
||||
.unwrap();
|
||||
scalable.write_zt0(0, &[0x35; LOOKUP_TABLE_BYTES]).unwrap();
|
||||
scalable.set_tpidr2_el0(0x1234_5678_9abc_def0);
|
||||
scalable.set_fpmr(0x2468_ace0);
|
||||
scalable.apply_mode(&mut registers, mode).unwrap();
|
||||
let system = SystemState::new(PSTATE_EL0T, 0, El1Registers::new(0, 0, 0, 0, 0)).unwrap();
|
||||
let context = ExecutionContext {
|
||||
memory: std::ptr::dangling_mut::<u8>().cast(),
|
||||
scalable: std::ptr::dangling_mut::<ScalableStateView>(),
|
||||
system: std::ptr::dangling_mut::<u8>().cast(),
|
||||
..ExecutionContext::default()
|
||||
};
|
||||
Self {
|
||||
storage,
|
||||
domain,
|
||||
ids,
|
||||
controls,
|
||||
prepared,
|
||||
memory,
|
||||
system,
|
||||
registers,
|
||||
scalable,
|
||||
context,
|
||||
sca16: true,
|
||||
cpacr: ALL_ACCESS,
|
||||
svl_bytes,
|
||||
}
|
||||
}
|
||||
pub(super) fn execute(&mut self) -> Result<ScalableLeafExit, ScalableExecutionError> {
|
||||
let access = access(&self.ids, self.sca16, self.cpacr, self.svl_bytes);
|
||||
let policy = *self.memory.policy_mut();
|
||||
let pointers = (
|
||||
self.context.memory,
|
||||
self.context.scalable,
|
||||
self.context.system,
|
||||
);
|
||||
let system = self.system.clone();
|
||||
let host_mxcsr = mxcsr();
|
||||
// SAFETY: fixed finite source, retained same Snapshot/domain authority,
|
||||
// actual controls and disjoint pinned native backing established above.
|
||||
let result = unsafe {
|
||||
self.controls.execute_scalable_leaf(
|
||||
&access,
|
||||
&self.prepared,
|
||||
&mut self.system,
|
||||
&mut self.registers,
|
||||
&mut self.scalable,
|
||||
&mut self.memory,
|
||||
&mut self.context,
|
||||
)
|
||||
};
|
||||
assert_eq!(*self.memory.policy_mut(), policy);
|
||||
assert_eq!(
|
||||
(
|
||||
self.context.memory,
|
||||
self.context.scalable,
|
||||
self.context.system
|
||||
),
|
||||
pointers
|
||||
);
|
||||
assert_eq!(self.system, system);
|
||||
assert_eq!(mxcsr(), host_mxcsr);
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
fn mxcsr() -> u32 {
|
||||
let mut value = 0_u32;
|
||||
// SAFETY: STMXCSR writes exactly this live u32 and changes no host control.
|
||||
unsafe {
|
||||
std::arch::asm!("stmxcsr [{pointer}]", pointer=in(reg) &mut value, options(nostack,preserves_flags))
|
||||
};
|
||||
value
|
||||
}
|
||||
|
||||
pub(super) fn wide_target() -> TargetCpu {
|
||||
TargetCpu::AtomicLoad16.with_cx16()
|
||||
}
|
||||
pub(super) fn unchanged(f: &Fixture, registers: &GuestState, before: &Banks, ram: &[u8]) {
|
||||
assert_eq!(&f.registers, registers);
|
||||
assert_eq!(&banks(&f.registers, &f.scalable), before);
|
||||
assert_eq!(f.storage.bytes(), ram);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
//! Scoped test entry retaining the actual CPU owner across repeated calls.
|
||||
//! Snapshot and fixed owners remain borrowed; state/control checks run per call.
|
||||
use super::fixture::{Fixture, access};
|
||||
use crate::{
|
||||
memory::{domain::MemoryThread, policy::MemoryControls},
|
||||
scalable::{
|
||||
ScalableState,
|
||||
leaf::{PreparedScalableLeaf, ScalableLeafExit},
|
||||
},
|
||||
system::{
|
||||
process_memory::{FixedProcessMemoryControls, ScalableExecutionError},
|
||||
scalable_controls::ScalableControlOwner,
|
||||
state::SystemState,
|
||||
},
|
||||
};
|
||||
use stela_compiler::{GuestState, context::ExecutionContext};
|
||||
|
||||
pub(super) struct RetainedEntry<'a> {
|
||||
access: ScalableControlOwner<'a>,
|
||||
controls: &'a FixedProcessMemoryControls,
|
||||
prepared: &'a PreparedScalableLeaf,
|
||||
system: &'a mut SystemState,
|
||||
registers: &'a mut GuestState,
|
||||
scalable: &'a mut ScalableState,
|
||||
memory: &'a mut MemoryThread<MemoryControls>,
|
||||
context: &'a mut ExecutionContext,
|
||||
}
|
||||
impl<'a> RetainedEntry<'a> {
|
||||
pub(super) fn new(fixture: &'a mut Fixture) -> Self {
|
||||
Self {
|
||||
access: access(
|
||||
&fixture.ids,
|
||||
fixture.sca16,
|
||||
fixture.cpacr,
|
||||
fixture.svl_bytes,
|
||||
),
|
||||
controls: &fixture.controls,
|
||||
prepared: &fixture.prepared,
|
||||
system: &mut fixture.system,
|
||||
registers: &mut fixture.registers,
|
||||
scalable: &mut fixture.scalable,
|
||||
memory: &mut fixture.memory,
|
||||
context: &mut fixture.context,
|
||||
}
|
||||
}
|
||||
pub(super) fn execute(&mut self) -> Result<ScalableLeafExit, ScalableExecutionError> {
|
||||
// SAFETY: exclusive Fixture borrow retains its pinned disjoint backing,
|
||||
// actual Snapshot, same domain and fixed finite prepared source. Native
|
||||
// entry is synchronous; no external raw writer or state alias exists.
|
||||
unsafe {
|
||||
self.controls.execute_scalable_leaf(
|
||||
&self.access,
|
||||
self.prepared,
|
||||
self.system,
|
||||
self.registers,
|
||||
self.scalable,
|
||||
self.memory,
|
||||
self.context,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn retained_owner_rechecks_actual_state_before_each_native_call() {
|
||||
use super::fixture::{LD1B_Z1_P0_X5, VL, banks};
|
||||
use crate::system::{process_memory::ProcessMemoryError, state::PSTATE_IL_MASK};
|
||||
use stela_compiler::TargetCpu;
|
||||
let mut fixture = Fixture::new(
|
||||
LD1B_Z1_P0_X5,
|
||||
TargetCpu::Baseline,
|
||||
TargetCpu::Baseline,
|
||||
None,
|
||||
);
|
||||
{
|
||||
let mut entry = RetainedEntry::new(&mut fixture);
|
||||
assert_eq!(entry.execute().unwrap(), ScalableLeafExit::Returned);
|
||||
let registers = entry.registers.clone();
|
||||
let before = banks(entry.registers, entry.scalable);
|
||||
let pstate = entry.system.pstate(entry.registers) | PSTATE_IL_MASK;
|
||||
entry
|
||||
.system
|
||||
.transition_pstate(entry.registers, pstate)
|
||||
.unwrap();
|
||||
assert!(matches!(
|
||||
entry.execute(),
|
||||
Err(ScalableExecutionError::MemoryAuthority {
|
||||
cause: ProcessMemoryError::IllegalExecutionState,
|
||||
..
|
||||
})
|
||||
));
|
||||
assert_eq!(*entry.registers, registers);
|
||||
assert_eq!(banks(entry.registers, entry.scalable), before);
|
||||
assert_eq!(entry.scalable.vector_length().bytes(), VL);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,552 @@
|
||||
//! One CPACR_EL1/SMCR_EL1 authority for a declared NS A64 EL0/EL1 machine.
|
||||
//!
|
||||
//! IDs remain in the same immutable Snapshot; ScalableState alone owns SVCR,
|
||||
//! length and register contents. Every checked native entry re-evaluates source
|
||||
//! requirements while borrowing this owner through the synchronous callback.
|
||||
//! This module neither delivers exceptions nor certifies native memory safety.
|
||||
mod features;
|
||||
|
||||
use super::{
|
||||
access::{Encoding, ExceptionLevel},
|
||||
identification::Register as IdRegister,
|
||||
identification_snapshot::{self, Origin, Snapshot},
|
||||
pstate::DIT_MASK,
|
||||
state::{PSTATE_IL_MASK, PSTATE_SS_MASK, SystemState},
|
||||
};
|
||||
use crate::scalable::ScalableState;
|
||||
use stela_compiler::{
|
||||
GuestAddress, GuestState,
|
||||
aarch64::scalable::{
|
||||
ScalableMode, VectorLength,
|
||||
execution::{
|
||||
ScalableAccessCheck as Check, ScalableAccessRequirements, ScalableExecutionRequirements,
|
||||
},
|
||||
features::{ScalableFeature, ScalableFeatures},
|
||||
},
|
||||
context::memory::MemoryImplementationProfile,
|
||||
extended::ScalableProfile,
|
||||
};
|
||||
|
||||
const ZEN_SHIFT: u32 = 16;
|
||||
const FPEN_SHIFT: u32 = 20;
|
||||
const SMEN_SHIFT: u32 = 24;
|
||||
const ENABLE_MASK: u64 = 3;
|
||||
const SMCR_LEN_MASK: u64 = 0xf;
|
||||
const SMCR_RAZ_WI_MASK: u64 = 0x1f0;
|
||||
const SMCR_EZT0_MASK: u64 = 1 << 30;
|
||||
const SMCR_FA64_MASK: u64 = 1 << 31;
|
||||
const VECTOR_GRANULE_BYTES: usize = 16;
|
||||
const FP_EC: u8 = 0x07;
|
||||
const SVE_EC: u8 = 0x19;
|
||||
const SME_EC: u8 = 0x1d;
|
||||
const A64_FP_ISS: u32 = 0x1e << 20;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Register {
|
||||
CpacrEl1,
|
||||
SmcrEl1,
|
||||
}
|
||||
impl Register {
|
||||
pub const fn encoding(self) -> Encoding {
|
||||
match self {
|
||||
Self::CpacrEl1 => Encoding::new(3, 0, 1, 0, 2),
|
||||
Self::SmcrEl1 => Encoding::new(3, 0, 1, 2, 6),
|
||||
}
|
||||
}
|
||||
pub fn decode(encoding: Encoding) -> Option<Self> {
|
||||
[Self::CpacrEl1, Self::SmcrEl1]
|
||||
.into_iter()
|
||||
.find(|r| r.encoding() == encoding)
|
||||
}
|
||||
}
|
||||
|
||||
/// Actual initial readbacks, never reset guesses. LEN is programmed, not SVL.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct Readbacks {
|
||||
pub cpacr_el1: u64,
|
||||
pub smcr_el1: u64,
|
||||
}
|
||||
|
||||
/// Explicit implementation facts for a fresh software CPU. This does not
|
||||
/// reconstruct hardware support from a sampled RDSVL or current state length.
|
||||
#[derive(Debug)]
|
||||
pub struct Implementation {
|
||||
source_atomicity: SourceAtomicity,
|
||||
lengths: Box<[VectorLength]>,
|
||||
memory: MemoryImplementationProfile,
|
||||
}
|
||||
impl Implementation {
|
||||
pub fn declared(
|
||||
lengths: &[VectorLength],
|
||||
memory: MemoryImplementationProfile,
|
||||
) -> Result<Self, Error> {
|
||||
if lengths.is_empty() || lengths.windows(2).any(|pair| pair[0] >= pair[1]) {
|
||||
return Err(Error::InvalidSupportedLengths);
|
||||
}
|
||||
if memory != MemoryImplementationProfile::ScalableTagChecks {
|
||||
return Err(Error::UnsupportedImplementationProfile);
|
||||
}
|
||||
Ok(Self {
|
||||
source_atomicity: SourceAtomicity::Unspecified,
|
||||
lengths: lengths.into(),
|
||||
memory,
|
||||
})
|
||||
}
|
||||
/// Declare the source CPU's ImpDefInt atomic granule as exactly 16 bytes.
|
||||
/// Host NATIVE_ACCESS capability does not establish this architectural fact.
|
||||
pub fn declared_sca16(
|
||||
lengths: &[VectorLength],
|
||||
memory: MemoryImplementationProfile,
|
||||
) -> Result<Self, Error> {
|
||||
let mut implementation = Self::declared(lengths, memory)?;
|
||||
implementation.source_atomicity = SourceAtomicity::FixedSca16;
|
||||
Ok(implementation)
|
||||
}
|
||||
|
||||
fn maximum(&self) -> VectorLength {
|
||||
*self.lengths.last().expect("nonempty checked support")
|
||||
}
|
||||
fn select(&self, smcr: u64) -> VectorLength {
|
||||
let requested = ((smcr & SMCR_LEN_MASK) as usize + 1) * VECTOR_GRANULE_BYTES;
|
||||
self.lengths
|
||||
.iter()
|
||||
.rev()
|
||||
.copied()
|
||||
.find(|length| length.bytes() <= requested)
|
||||
.unwrap_or(self.lengths[0])
|
||||
}
|
||||
}
|
||||
|
||||
/// Source architectural atomicity, independently declared from host envelopes.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum SourceAtomicity {
|
||||
Unspecified,
|
||||
FixedSca16,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct AccessTrap {
|
||||
pub pc: GuestAddress,
|
||||
pub target: ExceptionLevel,
|
||||
pub exception_class: u8,
|
||||
pub iss: u32,
|
||||
}
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Error {
|
||||
Identification(identification_snapshot::Unsupported),
|
||||
IdField {
|
||||
register: IdRegister,
|
||||
name: &'static str,
|
||||
value: u8,
|
||||
},
|
||||
IncoherentIdentification(&'static str),
|
||||
UnsupportedControlConsumer(&'static str),
|
||||
InvalidSupportedLengths,
|
||||
UnsupportedImplementationProfile,
|
||||
CapturedImplementationUnavailable,
|
||||
IllegalExecutionState,
|
||||
SingleStepUnavailable,
|
||||
Undefined,
|
||||
MissingSme,
|
||||
MissingNonStreamingLengthControl,
|
||||
UnsupportedStreamingSpecialization {
|
||||
pc: GuestAddress,
|
||||
},
|
||||
UnqualifiedSource {
|
||||
pc: GuestAddress,
|
||||
},
|
||||
MissingInstructionFeature {
|
||||
pc: GuestAddress,
|
||||
},
|
||||
Trap(AccessTrap),
|
||||
/// Admission decline only. A later source instruction has not executed its
|
||||
/// prefix; the caller must not deliver this as an already reached fault.
|
||||
PreflightTrap(AccessTrap),
|
||||
SpecializationMismatch,
|
||||
StateLengthMismatch,
|
||||
StateFeatureMismatch,
|
||||
InitialRazReadback,
|
||||
LengthChangeUnavailable,
|
||||
GenerationExhausted,
|
||||
}
|
||||
|
||||
/// Descriptive facts valid inside with_checked_execution's retained loan.
|
||||
/// Holding a copy after the callback does not grant future native entry.
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct EffectiveContext {
|
||||
source_atomicity: SourceAtomicity,
|
||||
length: VectorLength,
|
||||
mode: ScalableMode,
|
||||
features: ScalableFeatures,
|
||||
zt0_enabled: bool,
|
||||
implementation: MemoryImplementationProfile,
|
||||
}
|
||||
impl EffectiveContext {
|
||||
pub const fn source_atomicity(self) -> SourceAtomicity {
|
||||
self.source_atomicity
|
||||
}
|
||||
pub const fn vector_length(self) -> VectorLength {
|
||||
self.length
|
||||
}
|
||||
pub const fn mode(self) -> ScalableMode {
|
||||
self.mode
|
||||
}
|
||||
pub const fn features(self) -> ScalableFeatures {
|
||||
self.features
|
||||
}
|
||||
pub const fn zt0_enabled(self) -> bool {
|
||||
self.zt0_enabled
|
||||
}
|
||||
pub const fn implementation_profile(self) -> MemoryImplementationProfile {
|
||||
self.implementation
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ScalableControlOwner<'id> {
|
||||
ids: &'id Snapshot,
|
||||
readbacks: Readbacks,
|
||||
implementation: Implementation,
|
||||
generation: u64,
|
||||
}
|
||||
impl<'id> ScalableControlOwner<'id> {
|
||||
pub fn new_declared_el10(
|
||||
ids: &'id Snapshot,
|
||||
readbacks: Readbacks,
|
||||
implementation: Implementation,
|
||||
) -> Result<Self, Error> {
|
||||
if ids.provenance().origin() != Origin::DeclaredGuest {
|
||||
return Err(Error::CapturedImplementationUnavailable);
|
||||
}
|
||||
features::check_control_subset(ids)?;
|
||||
if features::sme(ids)? == 0 {
|
||||
return Err(Error::MissingSme);
|
||||
}
|
||||
let _ = features::derive(ids)?;
|
||||
if readbacks.smcr_el1 & SMCR_RAZ_WI_MASK != 0 {
|
||||
return Err(Error::InitialRazReadback);
|
||||
}
|
||||
Ok(Self {
|
||||
ids,
|
||||
readbacks,
|
||||
implementation,
|
||||
generation: 0,
|
||||
})
|
||||
}
|
||||
pub const fn identification_snapshot(&self) -> &Snapshot {
|
||||
self.ids
|
||||
}
|
||||
pub const fn generation(&self) -> u64 {
|
||||
self.generation
|
||||
}
|
||||
pub const fn readbacks(&self) -> Readbacks {
|
||||
self.readbacks
|
||||
}
|
||||
pub fn current_svl(&self) -> VectorLength {
|
||||
self.implementation.select(self.readbacks.smcr_el1)
|
||||
}
|
||||
|
||||
pub fn read(
|
||||
&self,
|
||||
register: Register,
|
||||
state: &SystemState,
|
||||
pc: GuestAddress,
|
||||
) -> Result<u64, Error> {
|
||||
self.register_access(register, state, pc)?;
|
||||
Ok(match register {
|
||||
Register::CpacrEl1 => self.readbacks.cpacr_el1,
|
||||
Register::SmcrEl1 => self.readbacks.smcr_el1,
|
||||
})
|
||||
}
|
||||
|
||||
/// No cached permission survives a write: callers must re-enter the checked
|
||||
/// loan for the next body. A live loan immutably borrows this entire bank.
|
||||
/// Reserved fields use an explicit writable/readback-preserving software
|
||||
/// implementation; only SMCR[8:4] is source-specified RAZ/WI.
|
||||
pub fn prepare_write<'a>(
|
||||
&'a mut self,
|
||||
register: Register,
|
||||
value: u64,
|
||||
state: &'a SystemState,
|
||||
scalable: &'a ScalableState,
|
||||
pc: GuestAddress,
|
||||
) -> Result<PreparedWrite<'a, 'id>, Error> {
|
||||
self.register_access(register, state, pc)?;
|
||||
let value = match register {
|
||||
Register::CpacrEl1 => value,
|
||||
Register::SmcrEl1 => value & !SMCR_RAZ_WI_MASK,
|
||||
};
|
||||
if self.current_svl() != scalable.vector_length() {
|
||||
return Err(Error::StateLengthMismatch);
|
||||
}
|
||||
if register == Register::SmcrEl1 && self.implementation.select(value) != self.current_svl()
|
||||
{
|
||||
return Err(Error::LengthChangeUnavailable);
|
||||
}
|
||||
let next = self
|
||||
.generation
|
||||
.checked_add(1)
|
||||
.ok_or(Error::GenerationExhausted)?;
|
||||
Ok(PreparedWrite {
|
||||
owner: self,
|
||||
register,
|
||||
value,
|
||||
next,
|
||||
_state: state,
|
||||
_scalable: scalable,
|
||||
})
|
||||
}
|
||||
|
||||
fn register_access(
|
||||
&self,
|
||||
register: Register,
|
||||
state: &SystemState,
|
||||
pc: GuestAddress,
|
||||
) -> Result<(), Error> {
|
||||
check_state(state)?;
|
||||
if state.current_el() != ExceptionLevel::El1 {
|
||||
return Err(Error::Undefined);
|
||||
}
|
||||
if register == Register::SmcrEl1
|
||||
&& disabled(self.readbacks.cpacr_el1, SMEN_SHIFT, state.current_el())
|
||||
{
|
||||
return Err(trap(pc, SME_EC, 0));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn with_checked_execution<R>(
|
||||
&self,
|
||||
requirements: &ScalableExecutionRequirements,
|
||||
specialization: ScalableProfile,
|
||||
state: &SystemState,
|
||||
registers: &mut GuestState,
|
||||
scalable: &mut ScalableState,
|
||||
operation: impl FnOnce(EffectiveContext, &mut GuestState, &mut ScalableState) -> R,
|
||||
) -> Result<R, Error> {
|
||||
let effective =
|
||||
self.check_execution(requirements, specialization, state, registers, scalable)?;
|
||||
Ok(operation(effective, registers, scalable))
|
||||
}
|
||||
|
||||
fn check_execution(
|
||||
&self,
|
||||
requirements: &ScalableExecutionRequirements,
|
||||
specialization: ScalableProfile,
|
||||
state: &SystemState,
|
||||
registers: &GuestState,
|
||||
scalable: &ScalableState,
|
||||
) -> Result<EffectiveContext, Error> {
|
||||
check_state(state)?;
|
||||
if state.pstate_misc() & PSTATE_SS_MASK != 0 {
|
||||
return Err(Error::SingleStepUnavailable);
|
||||
}
|
||||
let available = features::derive(self.ids)?;
|
||||
// Source-specialization prerequisites are admission conditions, not an
|
||||
// architectural CheckStreamingSVEEnabled trap on an unproven branch.
|
||||
// Check every prerequisite before evaluating any helper sequence.
|
||||
for instruction in requirements.instructions() {
|
||||
if matches!(
|
||||
instruction.access(),
|
||||
ScalableAccessRequirements::StreamingSmeSpecialization(_)
|
||||
) && !(available.contains(ScalableFeature::Sme) && scalable.mode().streaming())
|
||||
{
|
||||
return Err(Error::UnsupportedStreamingSpecialization {
|
||||
pc: instruction.pc(),
|
||||
});
|
||||
}
|
||||
}
|
||||
for instruction in requirements.instructions() {
|
||||
if !instruction
|
||||
.feature_clauses()
|
||||
.iter()
|
||||
.all(|clause| clause.is_satisfied_by(available))
|
||||
{
|
||||
return Err(Error::MissingInstructionFeature {
|
||||
pc: instruction.pc(),
|
||||
});
|
||||
}
|
||||
let checks = match instruction.access() {
|
||||
ScalableAccessRequirements::Known(checks)
|
||||
| ScalableAccessRequirements::StreamingSmeSpecialization(checks) => checks,
|
||||
ScalableAccessRequirements::Unqualified => {
|
||||
return Err(Error::UnqualifiedSource {
|
||||
pc: instruction.pc(),
|
||||
});
|
||||
}
|
||||
};
|
||||
for &check in checks {
|
||||
self.check_helper(check, state, scalable.mode(), instruction.pc())
|
||||
.map_err(|error| match error {
|
||||
Error::Trap(trap) => Error::PreflightTrap(trap),
|
||||
other => other,
|
||||
})?;
|
||||
}
|
||||
}
|
||||
let length = self.current_svl();
|
||||
if scalable.vector_length() != length {
|
||||
return Err(Error::StateLengthMismatch);
|
||||
}
|
||||
let zt0 = features::sme(self.ids)? == 2 && self.readbacks.smcr_el1 & SMCR_EZT0_MASK != 0;
|
||||
// CPU availability and EZT0 do not prove this actual state has storage.
|
||||
if zt0 && scalable.mode().za_enabled() && !scalable.has_zt0_storage() {
|
||||
return Err(Error::StateFeatureMismatch);
|
||||
}
|
||||
if specialization.vector_length() != length
|
||||
|| specialization.mode() != scalable.mode()
|
||||
|| specialization.features() != available
|
||||
|| specialization.controls().max_vector_length() != self.implementation.maximum()
|
||||
|| specialization.controls().zt0_enabled() != zt0
|
||||
|| specialization
|
||||
.required_dit()
|
||||
.is_some_and(|dit| dit != (state.pstate(registers) & DIT_MASK != 0))
|
||||
{
|
||||
return Err(Error::SpecializationMismatch);
|
||||
}
|
||||
Ok(EffectiveContext {
|
||||
source_atomicity: self.implementation.source_atomicity,
|
||||
length,
|
||||
mode: scalable.mode(),
|
||||
features: available,
|
||||
zt0_enabled: zt0,
|
||||
implementation: self.implementation.memory,
|
||||
})
|
||||
}
|
||||
|
||||
fn check_helper(
|
||||
&self,
|
||||
check: Check,
|
||||
state: &SystemState,
|
||||
mode: ScalableMode,
|
||||
pc: GuestAddress,
|
||||
) -> Result<(), Error> {
|
||||
let el = state.current_el();
|
||||
match check {
|
||||
Check::SmeEnabled => self.check_sme(el, pc),
|
||||
Check::StreamingSveEnabled => {
|
||||
self.check_sme(el, pc)?;
|
||||
if !mode.streaming() {
|
||||
return Err(trap(pc, SME_EC, 2));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Check::SmeAndZaEnabled => {
|
||||
self.check_sme(el, pc)?;
|
||||
if !mode.za_enabled() {
|
||||
return Err(trap(pc, SME_EC, 3));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Check::StreamingSveAndZaEnabled => {
|
||||
self.check_helper(Check::StreamingSveEnabled, state, mode, pc)?;
|
||||
if !mode.za_enabled() {
|
||||
return Err(trap(pc, SME_EC, 3));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Check::SmeZt0Enabled => {
|
||||
if !mode.za_enabled() {
|
||||
return Err(trap(pc, SME_EC, 3));
|
||||
}
|
||||
if features::sme(self.ids)? != 2 {
|
||||
return Err(Error::StateFeatureMismatch);
|
||||
}
|
||||
if self.readbacks.smcr_el1 & SMCR_EZT0_MASK == 0 {
|
||||
return Err(trap(pc, SME_EC, 4));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Check::SveEnabled => {
|
||||
if mode.streaming() {
|
||||
return self.check_sme(el, pc);
|
||||
}
|
||||
if !features::sve(self.ids)? {
|
||||
return self.check_helper(Check::StreamingSveEnabled, state, mode, pc);
|
||||
}
|
||||
if disabled(self.readbacks.cpacr_el1, ZEN_SHIFT, el) {
|
||||
return Err(trap(pc, SVE_EC, 0));
|
||||
}
|
||||
self.check_fp(el, pc)?;
|
||||
Err(Error::MissingNonStreamingLengthControl)
|
||||
}
|
||||
Check::NonStreamingSveEnabled => {
|
||||
self.check_helper(Check::SveEnabled, state, mode, pc)?;
|
||||
if mode.streaming()
|
||||
&& !(features::derive(self.ids)?.contains(ScalableFeature::SmeFa64)
|
||||
&& self.readbacks.smcr_el1 & SMCR_FA64_MASK != 0)
|
||||
{
|
||||
return Err(trap(pc, SME_EC, 1));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
fn check_sme(&self, el: ExceptionLevel, pc: GuestAddress) -> Result<(), Error> {
|
||||
if disabled(self.readbacks.cpacr_el1, SMEN_SHIFT, el) {
|
||||
return Err(trap(pc, SME_EC, 0));
|
||||
}
|
||||
self.check_fp(el, pc)
|
||||
}
|
||||
fn check_fp(&self, el: ExceptionLevel, pc: GuestAddress) -> Result<(), Error> {
|
||||
if disabled(self.readbacks.cpacr_el1, FPEN_SHIFT, el) {
|
||||
return Err(trap(pc, FP_EC, A64_FP_ISS));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PreparedWrite<'a, 'id> {
|
||||
owner: &'a mut ScalableControlOwner<'id>,
|
||||
register: Register,
|
||||
value: u64,
|
||||
next: u64,
|
||||
_state: &'a SystemState,
|
||||
_scalable: &'a ScalableState,
|
||||
}
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct RequalificationRequired {
|
||||
pub generation: u64,
|
||||
}
|
||||
impl PreparedWrite<'_, '_> {
|
||||
pub fn commit(self) -> RequalificationRequired {
|
||||
match self.register {
|
||||
Register::CpacrEl1 => self.owner.readbacks.cpacr_el1 = self.value,
|
||||
Register::SmcrEl1 => self.owner.readbacks.smcr_el1 = self.value,
|
||||
}
|
||||
self.owner.generation = self.next;
|
||||
RequalificationRequired {
|
||||
generation: self.next,
|
||||
}
|
||||
}
|
||||
}
|
||||
fn check_state(state: &SystemState) -> Result<(), Error> {
|
||||
if state.pstate_misc() & PSTATE_IL_MASK != 0 {
|
||||
return Err(Error::IllegalExecutionState);
|
||||
}
|
||||
if !matches!(
|
||||
state.current_el(),
|
||||
ExceptionLevel::El0 | ExceptionLevel::El1
|
||||
) {
|
||||
return Err(Error::Undefined);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
fn disabled(cpacr: u64, shift: u32, el: ExceptionLevel) -> bool {
|
||||
match (cpacr >> shift) & ENABLE_MASK {
|
||||
0 | 2 => true,
|
||||
1 => el == ExceptionLevel::El0,
|
||||
3 => false,
|
||||
_ => unreachable!("two-bit field"),
|
||||
}
|
||||
}
|
||||
fn trap(pc: GuestAddress, exception_class: u8, iss: u32) -> Error {
|
||||
Error::Trap(AccessTrap {
|
||||
pc,
|
||||
target: ExceptionLevel::El1,
|
||||
exception_class,
|
||||
iss,
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "scalable_controls/tests.rs"]
|
||||
mod tests;
|
||||
@@ -0,0 +1,127 @@
|
||||
//! Exact June ID-field interpretation. Values remain in the borrowed Snapshot.
|
||||
use super::{Error, Snapshot};
|
||||
use crate::system::identification::Register;
|
||||
use stela_compiler::aarch64::scalable::features::{ScalableFeature as F, ScalableFeatures};
|
||||
|
||||
const FIELD_MASK: u64 = 0xf;
|
||||
|
||||
pub(super) fn field(ids: &Snapshot, register: Register, shift: u32) -> Result<u8, Error> {
|
||||
Ok(((ids.read(register).map_err(Error::Identification)? >> shift) & FIELD_MASK) as u8)
|
||||
}
|
||||
|
||||
fn level(
|
||||
ids: &Snapshot,
|
||||
register: Register,
|
||||
name: &'static str,
|
||||
shift: u32,
|
||||
valid: &[u8],
|
||||
) -> Result<u8, Error> {
|
||||
let value = field(ids, register, shift)?;
|
||||
if valid.contains(&value) {
|
||||
Ok(value)
|
||||
} else {
|
||||
Err(Error::IdField {
|
||||
register,
|
||||
name,
|
||||
value,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn sme(ids: &Snapshot) -> Result<u8, Error> {
|
||||
level(ids, Register::IdAa64Pfr1El1, "SME", 24, &[0, 1, 2])
|
||||
}
|
||||
pub(super) fn sve(ids: &Snapshot) -> Result<bool, Error> {
|
||||
Ok(level(ids, Register::IdAa64Pfr0El1, "SVE", 32, &[0, 1])? == 1)
|
||||
}
|
||||
|
||||
/// This subset excludes optional CPACR consumers without an actual owner.
|
||||
/// Their RES0 storage choice is explicit and does not infer write-ignore.
|
||||
pub(super) fn check_control_subset(ids: &Snapshot) -> Result<(), Error> {
|
||||
ids.check_el10_regime().map_err(Error::Identification)?;
|
||||
let fp = level(ids, Register::IdAa64Pfr0El1, "FP", 16, &[0, 1, 15])?;
|
||||
let simd = level(ids, Register::IdAa64Pfr0El1, "AdvSIMD", 20, &[0, 1, 15])?;
|
||||
if fp != simd {
|
||||
return Err(Error::IncoherentIdentification("FP/AdvSIMD"));
|
||||
}
|
||||
if fp == 15 {
|
||||
return Err(Error::UnsupportedControlConsumer("absent FP/AdvSIMD"));
|
||||
}
|
||||
for (register, name, shift, valid) in [
|
||||
(Register::IdAa64Dfr0El1, "TraceVer", 4, &[0, 1][..]),
|
||||
(Register::IdAa64Mmfr3El1, "S1POE", 16, &[0, 1][..]),
|
||||
(Register::IdAa64Mmfr4El1, "SRMASK", 44, &[0, 1, 2][..]),
|
||||
] {
|
||||
if level(ids, register, name, shift, valid)? != 0 {
|
||||
return Err(Error::UnsupportedControlConsumer(name));
|
||||
}
|
||||
}
|
||||
let nv = level(ids, Register::IdAa64Mmfr4El1, "NV_frac", 20, &[0, 1, 2, 3])?;
|
||||
if nv >= 2 {
|
||||
return Err(Error::UnsupportedControlConsumer("NV2p1"));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) fn derive(ids: &Snapshot) -> Result<ScalableFeatures, Error> {
|
||||
let mut result = ScalableFeatures::empty();
|
||||
let sme = sme(ids)? != 0;
|
||||
let sve = sve(ids)?;
|
||||
if sme {
|
||||
result = result.with(F::Sme);
|
||||
let smfr = ids
|
||||
.read(Register::IdAa64Smfr0El1)
|
||||
.map_err(Error::Identification)?;
|
||||
let version = level(
|
||||
ids,
|
||||
Register::IdAa64Smfr0El1,
|
||||
"SMEver",
|
||||
56,
|
||||
&[0, 1, 2, 3, 4],
|
||||
)?;
|
||||
if version >= 1 {
|
||||
result = result.with(F::Sme2);
|
||||
}
|
||||
if version >= 2 {
|
||||
result = result.with(F::Sme2p1);
|
||||
}
|
||||
for (bit, feature) in [
|
||||
(63, F::SmeFa64),
|
||||
(48, F::SmeF64F64),
|
||||
(43, F::SmeB16B16),
|
||||
(42, F::SmeF16F16),
|
||||
(41, F::SmeF8F16),
|
||||
] {
|
||||
if smfr & (1u64 << bit) != 0 {
|
||||
result = result.with(feature);
|
||||
}
|
||||
}
|
||||
if level(ids, Register::IdAa64Smfr0El1, "I16I64", 52, &[0, 15])? == 15 {
|
||||
result = result.with(F::SmeI16I64);
|
||||
}
|
||||
}
|
||||
if sme || sve {
|
||||
if level(ids, Register::IdAa64Zfr0El1, "B16B16", 24, &[0, 1, 2, 3])? != 0 {
|
||||
result = result.with(F::SveB16B16);
|
||||
}
|
||||
let bf = level(ids, Register::IdAa64Zfr0El1, "BF16", 20, &[0, 1, 2])?;
|
||||
if bf != level(ids, Register::IdAa64Isar1El1, "BF16", 44, &[0, 1, 2])? {
|
||||
return Err(Error::IncoherentIdentification("BF16"));
|
||||
}
|
||||
if bf != 0 {
|
||||
result = result.with(F::Bf16);
|
||||
}
|
||||
let i8 = level(ids, Register::IdAa64Zfr0El1, "I8MM", 44, &[0, 1])?;
|
||||
let simd = level(ids, Register::IdAa64Pfr0El1, "AdvSIMD", 20, &[0, 1, 15])? != 15;
|
||||
if sve && simd && i8 != level(ids, Register::IdAa64Isar1El1, "I8MM", 52, &[0, 1])? {
|
||||
return Err(Error::IncoherentIdentification("I8MM"));
|
||||
}
|
||||
if i8 != 0 {
|
||||
result = result.with(F::I8mm);
|
||||
}
|
||||
}
|
||||
if level(ids, Register::IdAa64Isar3El1, "FAMINMAX", 4, &[0, 1])? == 1 {
|
||||
result = result.with(F::FaMinMax);
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
@@ -0,0 +1,402 @@
|
||||
use super::*;
|
||||
use crate::system::state::{El1Registers, PSTATE_EL0T, PSTATE_EL1H};
|
||||
use stela_compiler::{TargetCpu, aarch64::scalable::profile::ScalableControls};
|
||||
|
||||
const PC: GuestAddress = GuestAddress(0x1000);
|
||||
const FP_ENABLED: u64 = 3 << FPEN_SHIFT;
|
||||
const SME_ENABLED: u64 = 3 << SMEN_SHIFT;
|
||||
const SVE_ENABLED: u64 = 3 << ZEN_SHIFT;
|
||||
const NOP: u32 = 0xd503_201f;
|
||||
const RET: u32 = 0xd65f_03c0;
|
||||
|
||||
fn length(bytes: usize) -> VectorLength {
|
||||
VectorLength::from_bytes(bytes).unwrap()
|
||||
}
|
||||
fn ids(sve: bool) -> Snapshot {
|
||||
Snapshot::declared(
|
||||
"scalable-owner-pure-tests",
|
||||
&[
|
||||
(IdRegister::IdAa64Pfr0El1, 0x11 | (u64::from(sve) << 32)),
|
||||
(IdRegister::IdAa64Pfr1El1, 2 << 24),
|
||||
(IdRegister::IdAa64Smfr0El1, 1 << 56),
|
||||
(IdRegister::IdAa64Zfr0El1, 0),
|
||||
(IdRegister::IdAa64Isar1El1, 0),
|
||||
(IdRegister::IdAa64Isar3El1, 0),
|
||||
(IdRegister::IdAa64Dfr0El1, 0),
|
||||
(IdRegister::IdAa64Mmfr3El1, 0),
|
||||
(IdRegister::IdAa64Mmfr4El1, 0),
|
||||
],
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
fn state(el0: bool, extra: u64) -> SystemState {
|
||||
SystemState::new(
|
||||
if el0 { PSTATE_EL0T } else { PSTATE_EL1H } | extra,
|
||||
0,
|
||||
El1Registers::new(0, 0, 0, 0, 0),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
fn make_owner(ids: &Snapshot, cpacr: u64, smcr: u64) -> ScalableControlOwner<'_> {
|
||||
ScalableControlOwner::new_declared_el10(
|
||||
ids,
|
||||
Readbacks {
|
||||
cpacr_el1: cpacr,
|
||||
smcr_el1: smcr,
|
||||
},
|
||||
Implementation::declared(
|
||||
&[length(16), length(32), length(128)],
|
||||
MemoryImplementationProfile::ScalableTagChecks,
|
||||
)
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
fn profile(owner: &ScalableControlOwner<'_>, mode: ScalableMode) -> ScalableProfile {
|
||||
ScalableProfile::new_with_features(
|
||||
owner.current_svl(),
|
||||
mode,
|
||||
features::derive(owner.ids).unwrap(),
|
||||
ScalableControls::new(
|
||||
owner.implementation.maximum(),
|
||||
owner.readbacks.smcr_el1 & SMCR_EZT0_MASK != 0,
|
||||
),
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sparse_supported_lengths_select_down_then_up_without_rewriting_len() {
|
||||
let support = Implementation::declared(
|
||||
&[length(32), length(128)],
|
||||
MemoryImplementationProfile::ScalableTagChecks,
|
||||
)
|
||||
.unwrap();
|
||||
for (len, bytes) in [(0, 32), (1, 32), (2, 32), (6, 32), (7, 128), (15, 128)] {
|
||||
assert_eq!(support.select(len).bytes(), bytes);
|
||||
}
|
||||
assert!(matches!(
|
||||
Implementation::declared(
|
||||
&[length(32), length(16)],
|
||||
MemoryImplementationProfile::ScalableTagChecks
|
||||
),
|
||||
Err(Error::InvalidSupportedLengths)
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cpacr_all_enable_values_have_source_el_dependent_behavior() {
|
||||
for field in 0_u64..4 {
|
||||
for el0 in [false, true] {
|
||||
let ids = ids(false);
|
||||
let owner = make_owner(&ids, (field << SMEN_SHIFT) | FP_ENABLED, 0);
|
||||
let result = owner.check_helper(
|
||||
Check::SmeEnabled,
|
||||
&state(el0, 0),
|
||||
ScalableMode::new(false, false),
|
||||
PC,
|
||||
);
|
||||
assert_eq!(result.is_ok(), field == 3 || (field == 1 && !el0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn source_orders_smen_before_fp_and_zen_before_fp() {
|
||||
let ids = ids(true);
|
||||
let owner = make_owner(&ids, 0, 0);
|
||||
assert_eq!(
|
||||
owner.check_helper(
|
||||
Check::SmeEnabled,
|
||||
&state(false, 0),
|
||||
ScalableMode::new(false, false),
|
||||
PC
|
||||
),
|
||||
Err(trap(PC, SME_EC, 0))
|
||||
);
|
||||
assert_eq!(
|
||||
owner.check_helper(
|
||||
Check::SveEnabled,
|
||||
&state(false, 0),
|
||||
ScalableMode::new(false, false),
|
||||
PC
|
||||
),
|
||||
Err(trap(PC, SVE_EC, 0))
|
||||
);
|
||||
let owner = make_owner(&ids, SME_ENABLED | SVE_ENABLED, 0);
|
||||
assert_eq!(
|
||||
owner.check_helper(
|
||||
Check::SmeEnabled,
|
||||
&state(false, 0),
|
||||
ScalableMode::new(false, false),
|
||||
PC
|
||||
),
|
||||
Err(trap(PC, FP_EC, A64_FP_ISS))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sme_only_sve_branch_uses_actual_streaming_and_za_is_helper_specific() {
|
||||
let ids = ids(false);
|
||||
let owner = make_owner(&ids, FP_ENABLED | SME_ENABLED, 0);
|
||||
let state = state(false, 0);
|
||||
assert_eq!(
|
||||
owner.check_helper(
|
||||
Check::SveEnabled,
|
||||
&state,
|
||||
ScalableMode::new(false, false),
|
||||
PC
|
||||
),
|
||||
Err(trap(PC, SME_EC, 2))
|
||||
);
|
||||
assert!(
|
||||
owner
|
||||
.check_helper(
|
||||
Check::SveEnabled,
|
||||
&state,
|
||||
ScalableMode::new(true, false),
|
||||
PC
|
||||
)
|
||||
.is_ok()
|
||||
);
|
||||
assert!(
|
||||
owner
|
||||
.check_helper(
|
||||
Check::SmeAndZaEnabled,
|
||||
&state,
|
||||
ScalableMode::new(false, true),
|
||||
PC
|
||||
)
|
||||
.is_ok()
|
||||
);
|
||||
assert_eq!(
|
||||
owner.check_helper(
|
||||
Check::StreamingSveAndZaEnabled,
|
||||
&state,
|
||||
ScalableMode::new(false, true),
|
||||
PC
|
||||
),
|
||||
Err(trap(PC, SME_EC, 2))
|
||||
);
|
||||
assert_eq!(
|
||||
owner.check_helper(
|
||||
Check::SmeZt0Enabled,
|
||||
&state,
|
||||
ScalableMode::new(false, false),
|
||||
PC
|
||||
),
|
||||
Err(trap(PC, SME_EC, 3))
|
||||
);
|
||||
assert_eq!(
|
||||
owner.check_helper(
|
||||
Check::SmeZt0Enabled,
|
||||
&state,
|
||||
ScalableMode::new(false, true),
|
||||
PC
|
||||
),
|
||||
Err(trap(PC, SME_EC, 4))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn register_access_is_not_general_sme_instruction_access() {
|
||||
let ids = ids(false);
|
||||
let owner = make_owner(&ids, SME_ENABLED, 0);
|
||||
assert_eq!(owner.read(Register::SmcrEl1, &state(false, 0), PC), Ok(0));
|
||||
assert_eq!(
|
||||
owner.check_helper(
|
||||
Check::SmeEnabled,
|
||||
&state(false, 0),
|
||||
ScalableMode::new(false, false),
|
||||
PC
|
||||
),
|
||||
Err(trap(PC, FP_EC, A64_FP_ISS))
|
||||
);
|
||||
assert_eq!(
|
||||
owner.read(Register::CpacrEl1, &state(true, 0), PC),
|
||||
Err(Error::Undefined)
|
||||
);
|
||||
let owner = make_owner(&ids, 0, 0);
|
||||
assert_eq!(owner.read(Register::CpacrEl1, &state(false, 0), PC), Ok(0));
|
||||
assert_eq!(
|
||||
owner.read(Register::SmcrEl1, &state(false, 0), PC),
|
||||
Err(trap(PC, SME_EC, 0))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn smcr_writes_ignore_only_raz_fields_and_decline_actual_length_changes() {
|
||||
let ids = ids(false);
|
||||
let mut owner = make_owner(&ids, FP_ENABLED | SME_ENABLED, 0);
|
||||
let state = state(false, 0);
|
||||
let scalable = ScalableState::new(length(16), true);
|
||||
let value = (1u64 << 63) | SMCR_RAZ_WI_MASK | SMCR_EZT0_MASK;
|
||||
owner
|
||||
.prepare_write(Register::SmcrEl1, value, &state, &scalable, PC)
|
||||
.unwrap()
|
||||
.commit();
|
||||
assert_eq!(owner.readbacks().smcr_el1, value & !SMCR_RAZ_WI_MASK);
|
||||
let before = owner.readbacks();
|
||||
assert!(matches!(
|
||||
owner.prepare_write(Register::SmcrEl1, 1, &state, &scalable, PC),
|
||||
Err(Error::LengthChangeUnavailable)
|
||||
));
|
||||
assert_eq!(owner.readbacks(), before);
|
||||
assert_eq!(owner.generation(), 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn actual_il_declines_register_effects_and_checked_callback() {
|
||||
let ids = ids(false);
|
||||
let mut owner = make_owner(&ids, FP_ENABLED | SME_ENABLED, 0);
|
||||
let state = state(false, PSTATE_IL_MASK);
|
||||
let mut scalable = ScalableState::new(length(16), true);
|
||||
let mut registers = GuestState::default();
|
||||
let profile = profile(&owner, scalable.mode());
|
||||
let source: Vec<u8> = [NOP, RET].into_iter().flat_map(u32::to_le_bytes).collect();
|
||||
let prepared =
|
||||
stela_compiler::extended::prepare_leaf(&source, PC, profile, TargetCpu::Baseline).unwrap();
|
||||
let mut called = false;
|
||||
let result = owner.with_checked_execution(
|
||||
&prepared.execution_requirements,
|
||||
profile,
|
||||
&state,
|
||||
&mut registers,
|
||||
&mut scalable,
|
||||
|_, _, _| called = true,
|
||||
);
|
||||
assert_eq!(result, Err(Error::IllegalExecutionState));
|
||||
assert!(!called);
|
||||
assert_eq!(
|
||||
owner.read(Register::CpacrEl1, &state, PC),
|
||||
Err(Error::IllegalExecutionState)
|
||||
);
|
||||
assert!(matches!(
|
||||
owner.prepare_write(Register::CpacrEl1, 0, &state, &scalable, PC),
|
||||
Err(Error::IllegalExecutionState)
|
||||
));
|
||||
assert_eq!(owner.generation(), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn checked_callback_uses_same_actual_state_and_named_implementation() {
|
||||
let ids = ids(false);
|
||||
let owner = make_owner(&ids, FP_ENABLED | SME_ENABLED, 0);
|
||||
let state = state(false, 0);
|
||||
let mut scalable = ScalableState::new(length(16), true);
|
||||
let mut registers = GuestState::default();
|
||||
scalable
|
||||
.apply_mode(&mut registers, ScalableMode::new(true, false))
|
||||
.unwrap();
|
||||
let profile = profile(&owner, scalable.mode());
|
||||
let source: Vec<u8> = [NOP, RET].into_iter().flat_map(u32::to_le_bytes).collect();
|
||||
let prepared =
|
||||
stela_compiler::extended::prepare_leaf(&source, PC, profile, TargetCpu::Baseline).unwrap();
|
||||
owner
|
||||
.with_checked_execution(
|
||||
&prepared.execution_requirements,
|
||||
profile,
|
||||
&state,
|
||||
&mut registers,
|
||||
&mut scalable,
|
||||
|effective, registers, scalable| {
|
||||
assert_eq!(
|
||||
effective.implementation_profile(),
|
||||
MemoryImplementationProfile::ScalableTagChecks
|
||||
);
|
||||
assert_eq!(effective.mode(), scalable.mode());
|
||||
assert_eq!(effective.vector_length(), scalable.vector_length());
|
||||
registers.x[3] = 0x1234;
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(registers.x[3], 0x1234);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn cpu_zt0_presence_does_not_prove_supplied_state_storage() {
|
||||
let ids = ids(false);
|
||||
let owner = make_owner(&ids, FP_ENABLED | SME_ENABLED, SMCR_EZT0_MASK);
|
||||
let state = state(false, 0);
|
||||
let mut scalable = ScalableState::new(length(16), false);
|
||||
let mut registers = GuestState::default();
|
||||
scalable
|
||||
.apply_mode(&mut registers, ScalableMode::new(true, true))
|
||||
.unwrap();
|
||||
let profile = profile(&owner, scalable.mode());
|
||||
let source: Vec<u8> = [NOP, RET].into_iter().flat_map(u32::to_le_bytes).collect();
|
||||
let prepared =
|
||||
stela_compiler::extended::prepare_leaf(&source, PC, profile, TargetCpu::Baseline).unwrap();
|
||||
let mut called = false;
|
||||
assert_eq!(
|
||||
owner.with_checked_execution(
|
||||
&prepared.execution_requirements,
|
||||
profile,
|
||||
&state,
|
||||
&mut registers,
|
||||
&mut scalable,
|
||||
|_, _, _| called = true
|
||||
),
|
||||
Err(Error::StateFeatureMismatch)
|
||||
);
|
||||
assert!(!called);
|
||||
let mut supported = ScalableState::new(length(16), true);
|
||||
supported
|
||||
.apply_mode(&mut registers, ScalableMode::new(true, true))
|
||||
.unwrap();
|
||||
owner
|
||||
.with_checked_execution(
|
||||
&prepared.execution_requirements,
|
||||
profile,
|
||||
&state,
|
||||
&mut registers,
|
||||
&mut supported,
|
||||
|_, _, _| called = true,
|
||||
)
|
||||
.unwrap();
|
||||
assert!(called);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn source_atomicity_requires_its_explicit_cpu_declaration() {
|
||||
let unspecified = Implementation::declared(
|
||||
&[length(16)],
|
||||
MemoryImplementationProfile::ScalableTagChecks,
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(unspecified.source_atomicity, SourceAtomicity::Unspecified);
|
||||
let explicit = Implementation::declared_sca16(
|
||||
&[length(16)],
|
||||
MemoryImplementationProfile::ScalableTagChecks,
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(explicit.source_atomicity, SourceAtomicity::FixedSca16);
|
||||
let ids = ids(false);
|
||||
let owner = ScalableControlOwner::new_declared_el10(
|
||||
&ids,
|
||||
Readbacks {
|
||||
cpacr_el1: FP_ENABLED | SME_ENABLED,
|
||||
smcr_el1: 0,
|
||||
},
|
||||
explicit,
|
||||
)
|
||||
.unwrap();
|
||||
let state = state(false, 0);
|
||||
let mut registers = GuestState::default();
|
||||
let mut scalable = ScalableState::new(length(16), true);
|
||||
let profile = profile(&owner, scalable.mode());
|
||||
let source: Vec<u8> = [NOP, RET].into_iter().flat_map(u32::to_le_bytes).collect();
|
||||
let prepared =
|
||||
stela_compiler::extended::prepare_leaf(&source, PC, profile, TargetCpu::Baseline).unwrap();
|
||||
assert_eq!(
|
||||
owner.with_checked_execution(
|
||||
&prepared.execution_requirements,
|
||||
profile,
|
||||
&state,
|
||||
&mut registers,
|
||||
&mut scalable,
|
||||
|effective, _, _| effective.source_atomicity()
|
||||
),
|
||||
Ok(SourceAtomicity::FixedSca16)
|
||||
);
|
||||
}
|
||||
@@ -191,6 +191,12 @@ impl SystemState {
|
||||
})
|
||||
}
|
||||
|
||||
/// PSTATE bits owned here; NZCV remains authoritative in GuestState.
|
||||
/// Use `pstate` when the complete composed value is required.
|
||||
pub const fn pstate_misc(&self) -> u64 {
|
||||
self.pstate_misc
|
||||
}
|
||||
|
||||
pub fn pstate(&self, registers: &GuestState) -> u64 {
|
||||
self.pstate_misc | (u64::from(registers.nzcv) & NZCV_MASK)
|
||||
}
|
||||
|
||||
+31
@@ -2375,6 +2375,16 @@ fn run() -> Result<()> {
|
||||
zt0_enabled,
|
||||
)?;
|
||||
let source = std::fs::read(&input)?;
|
||||
let memory_requirements = profile
|
||||
.map(|profile| {
|
||||
stela_compiler::extended::memory_requirements(
|
||||
&source,
|
||||
stela_compiler::GuestAddress(guest_base),
|
||||
profile,
|
||||
cpu_target,
|
||||
)
|
||||
})
|
||||
.transpose()?;
|
||||
let block = if let Some(profile) = profile {
|
||||
stela_compiler::extended::compile_for_profile(
|
||||
&source,
|
||||
@@ -2418,6 +2428,27 @@ fn run() -> Result<()> {
|
||||
manifest["execution_profile"] = scalable_execution_manifest(profile)?;
|
||||
manifest["entry_prefix_bytes"] =
|
||||
serde_json::json!(stela_compiler::extended::CONTEXT_WRAPPER_BYTES);
|
||||
let requirements = memory_requirements
|
||||
.context("context leaf requires compiler-derived memory metadata")?;
|
||||
use stela_compiler::context::memory::SpAlignmentRequirement;
|
||||
let sp_alignment = match requirements.required_sp_alignment {
|
||||
SpAlignmentRequirement::Any => "any",
|
||||
SpAlignmentRequirement::Enabled => "enabled",
|
||||
SpAlignmentRequirement::Disabled => "disabled",
|
||||
};
|
||||
manifest["memory_requirements"] = serde_json::json!({
|
||||
"required_flags": requirements.required_flags,
|
||||
"required_host_caps": requirements.required_host_caps,
|
||||
"required_profile": requirements.required_profile,
|
||||
"required_sp_alignment": sp_alignment,
|
||||
});
|
||||
use stela_compiler::context::memory::{
|
||||
MEMORY_IMPLEMENTATION_PROFILE_ID, profile_requirements,
|
||||
};
|
||||
manifest["memory_implementation_profile"] = serde_json::json!(
|
||||
(requirements.required_profile & profile_requirements::NATIVE_ACCESS != 0)
|
||||
.then_some(MEMORY_IMPLEMENTATION_PROFILE_ID)
|
||||
);
|
||||
}
|
||||
write_json(&output_dir.join("manifest.json"), &manifest)?;
|
||||
println!("{}", serde_json::to_string_pretty(&manifest)?);
|
||||
|
||||
@@ -2138,11 +2138,11 @@
|
||||
},
|
||||
"facts_sha256": "fff5ee6ca3eb54bc4c9d52f749373725a0261175d843ab23cebfaa5dd87d0db3",
|
||||
"assessment": {
|
||||
"implemented": 2769,
|
||||
"implemented": 2913,
|
||||
"partial": 5,
|
||||
"unsupported": 1558,
|
||||
"unsupported": 1414,
|
||||
"total": 4332,
|
||||
"implementation_percentage": 63.9196675900277,
|
||||
"implementation_percentage": 67.24376731301939,
|
||||
"categories": {
|
||||
"base_integer_system": {
|
||||
"implemented": 557,
|
||||
@@ -2154,16 +2154,16 @@
|
||||
"unsupported": 235
|
||||
},
|
||||
"sme": {
|
||||
"implemented": 475,
|
||||
"unsupported": 302
|
||||
"implemented": 553,
|
||||
"unsupported": 224
|
||||
},
|
||||
"sve": {
|
||||
"implemented": 760,
|
||||
"unsupported": 629
|
||||
"implemented": 826,
|
||||
"unsupported": 563
|
||||
}
|
||||
}
|
||||
},
|
||||
"compiler_source_sha256": "a04b58128fdfdbfc9b0674ef792a22405e46670f5b46083c94c8ec1756872831",
|
||||
"compiler_source_sha256": "26977c1cddd2986a9e49f43a74b2d81b5b776af91774a6c45dea0a4c65af259a",
|
||||
"evidence_reports": [],
|
||||
"assessment_basis": "reviewed_implementation_and_emission_smoke",
|
||||
"last_verified_checkpoint": {
|
||||
@@ -5081,75 +5081,75 @@
|
||||
{"id":"ld1b_mz_p_bi_4","instruction_id":"ld1b_mz_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa0408000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_mz_p_br_2","instruction_id":"ld1b_mz_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0000000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_mz_p_br_4","instruction_id":"ld1b_mz_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa0008000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_mzx_p_bi_2x8","instruction_id":"ld1b_mzx_p_bi","mnemonic":"LD1B","category":"sme","source_file":"ld1b_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1400000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_mzx_p_bi_4x4","instruction_id":"ld1b_mzx_p_bi","mnemonic":"LD1B","category":"sme","source_file":"ld1b_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa1408000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_mzx_p_br_2x8","instruction_id":"ld1b_mzx_p_br","mnemonic":"LD1B","category":"sme","source_file":"ld1b_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1000000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_mzx_p_br_4x4","instruction_id":"ld1b_mzx_p_br","mnemonic":"LD1B","category":"sme","source_file":"ld1b_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa1008000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_mzx_p_bi_2x8","instruction_id":"ld1b_mzx_p_bi","mnemonic":"LD1B","category":"sme","source_file":"ld1b_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1400000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_mzx_p_bi_4x4","instruction_id":"ld1b_mzx_p_bi","mnemonic":"LD1B","category":"sme","source_file":"ld1b_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa1408000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_mzx_p_br_2x8","instruction_id":"ld1b_mzx_p_br","mnemonic":"LD1B","category":"sme","source_file":"ld1b_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1000000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_mzx_p_br_4x4","instruction_id":"ld1b_mzx_p_br","mnemonic":"LD1B","category":"sme","source_file":"ld1b_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa1008000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_ai_d","instruction_id":"ld1b_z_p_ai","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc420c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_ai_s","instruction_id":"ld1b_z_p_ai","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0x8420c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_bi_u16","instruction_id":"ld1b_z_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa420a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_bi_u32","instruction_id":"ld1b_z_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa440a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_bi_u64","instruction_id":"ld1b_z_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa460a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_bi_u8","instruction_id":"ld1b_z_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa400a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_br_u16","instruction_id":"ld1b_z_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4204000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_br_u32","instruction_id":"ld1b_z_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4404000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_br_u64","instruction_id":"ld1b_z_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4604000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_br_u8","instruction_id":"ld1b_z_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4004000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_bi_u16","instruction_id":"ld1b_z_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa420a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_bi_u32","instruction_id":"ld1b_z_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa440a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_bi_u64","instruction_id":"ld1b_z_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa460a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_bi_u8","instruction_id":"ld1b_z_p_bi","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa400a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_br_u16","instruction_id":"ld1b_z_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4204000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_br_u32","instruction_id":"ld1b_z_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4404000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_br_u64","instruction_id":"ld1b_z_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4604000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_br_u8","instruction_id":"ld1b_z_p_br","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4004000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1b_z_p_bz_d_64_unscaled","instruction_id":"ld1b_z_p_bz","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc440c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_bz_d_x32_unscaled","instruction_id":"ld1b_z_p_bz","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc4004000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_z_p_bz_s_x32_unscaled","instruction_id":"ld1b_z_p_bz","mnemonic":"LD1B","category":"sve","source_file":"ld1b_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0x84004000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_za_p_rrr_","instruction_id":"ld1b_za_p_rrr","mnemonic":"LD1B","category":"sme","source_file":"ld1b_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0000000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1b_za_p_rrr_","instruction_id":"ld1b_za_p_rrr","mnemonic":"LD1B","category":"sme","source_file":"ld1b_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0000000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1d_mz_p_bi_2","instruction_id":"ld1d_mz_p_bi","mnemonic":"LD1D","category":"sve","source_file":"ld1d_mz_p_bi.xml","encoding_mask":"0xfff0e001","encoding_value":"0xa0406000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_mz_p_bi_4","instruction_id":"ld1d_mz_p_bi","mnemonic":"LD1D","category":"sve","source_file":"ld1d_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa040e000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_mz_p_br_2","instruction_id":"ld1d_mz_p_br","mnemonic":"LD1D","category":"sve","source_file":"ld1d_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0006000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_mz_p_br_4","instruction_id":"ld1d_mz_p_br","mnemonic":"LD1D","category":"sve","source_file":"ld1d_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa000e000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_mzx_p_bi_2x8","instruction_id":"ld1d_mzx_p_bi","mnemonic":"LD1D","category":"sme","source_file":"ld1d_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1406000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_mzx_p_bi_4x4","instruction_id":"ld1d_mzx_p_bi","mnemonic":"LD1D","category":"sme","source_file":"ld1d_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140e000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_mzx_p_br_2x8","instruction_id":"ld1d_mzx_p_br","mnemonic":"LD1D","category":"sme","source_file":"ld1d_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1006000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_mzx_p_br_4x4","instruction_id":"ld1d_mzx_p_br","mnemonic":"LD1D","category":"sme","source_file":"ld1d_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100e000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_mzx_p_bi_2x8","instruction_id":"ld1d_mzx_p_bi","mnemonic":"LD1D","category":"sme","source_file":"ld1d_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1406000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1d_mzx_p_bi_4x4","instruction_id":"ld1d_mzx_p_bi","mnemonic":"LD1D","category":"sme","source_file":"ld1d_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140e000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1d_mzx_p_br_2x8","instruction_id":"ld1d_mzx_p_br","mnemonic":"LD1D","category":"sme","source_file":"ld1d_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1006000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1d_mzx_p_br_4x4","instruction_id":"ld1d_mzx_p_br","mnemonic":"LD1D","category":"sme","source_file":"ld1d_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100e000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1d_z_p_ai_d","instruction_id":"ld1d_z_p_ai","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc5a0c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_z_p_bi_u128","instruction_id":"ld1d_z_p_bi","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5902000","features":[{"feature":"FEAT_SVE2p1","name":"v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_z_p_bi_u64","instruction_id":"ld1d_z_p_bi","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5e0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_z_p_bi_u64","instruction_id":"ld1d_z_p_bi","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5e0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1d_z_p_br_u128","instruction_id":"ld1d_z_p_br","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5808000","features":[{"feature":"FEAT_SVE2p1","name":"v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_z_p_br_u64","instruction_id":"ld1d_z_p_br","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5e04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_z_p_br_u64","instruction_id":"ld1d_z_p_br","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5e04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1d_z_p_bz_d_64_scaled","instruction_id":"ld1d_z_p_bz","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc5e0c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_z_p_bz_d_64_unscaled","instruction_id":"ld1d_z_p_bz","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc5c0c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_z_p_bz_d_x32_scaled","instruction_id":"ld1d_z_p_bz","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc5a04000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_z_p_bz_d_x32_unscaled","instruction_id":"ld1d_z_p_bz","mnemonic":"LD1D","category":"sve","source_file":"ld1d_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc5804000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_za_p_rrr_","instruction_id":"ld1d_za_p_rrr","mnemonic":"LD1D","category":"sme","source_file":"ld1d_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0c00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1d_za_p_rrr_","instruction_id":"ld1d_za_p_rrr","mnemonic":"LD1D","category":"sme","source_file":"ld1d_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0c00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_mz_p_bi_2","instruction_id":"ld1h_mz_p_bi","mnemonic":"LD1H","category":"sve","source_file":"ld1h_mz_p_bi.xml","encoding_mask":"0xfff0e001","encoding_value":"0xa0402000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_mz_p_bi_4","instruction_id":"ld1h_mz_p_bi","mnemonic":"LD1H","category":"sve","source_file":"ld1h_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa040a000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_mz_p_br_2","instruction_id":"ld1h_mz_p_br","mnemonic":"LD1H","category":"sve","source_file":"ld1h_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0002000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_mz_p_br_4","instruction_id":"ld1h_mz_p_br","mnemonic":"LD1H","category":"sve","source_file":"ld1h_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa000a000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_mzx_p_bi_2x8","instruction_id":"ld1h_mzx_p_bi","mnemonic":"LD1H","category":"sme","source_file":"ld1h_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1402000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_mzx_p_bi_4x4","instruction_id":"ld1h_mzx_p_bi","mnemonic":"LD1H","category":"sme","source_file":"ld1h_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140a000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_mzx_p_br_2x8","instruction_id":"ld1h_mzx_p_br","mnemonic":"LD1H","category":"sme","source_file":"ld1h_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1002000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_mzx_p_br_4x4","instruction_id":"ld1h_mzx_p_br","mnemonic":"LD1H","category":"sme","source_file":"ld1h_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100a000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_mzx_p_bi_2x8","instruction_id":"ld1h_mzx_p_bi","mnemonic":"LD1H","category":"sme","source_file":"ld1h_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1402000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_mzx_p_bi_4x4","instruction_id":"ld1h_mzx_p_bi","mnemonic":"LD1H","category":"sme","source_file":"ld1h_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140a000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_mzx_p_br_2x8","instruction_id":"ld1h_mzx_p_br","mnemonic":"LD1H","category":"sme","source_file":"ld1h_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1002000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_mzx_p_br_4x4","instruction_id":"ld1h_mzx_p_br","mnemonic":"LD1H","category":"sme","source_file":"ld1h_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100a000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_z_p_ai_d","instruction_id":"ld1h_z_p_ai","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4a0c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_ai_s","instruction_id":"ld1h_z_p_ai","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0x84a0c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bi_u16","instruction_id":"ld1h_z_p_bi","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4a0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bi_u32","instruction_id":"ld1h_z_p_bi","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4c0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bi_u64","instruction_id":"ld1h_z_p_bi","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4e0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_br_u16","instruction_id":"ld1h_z_p_br","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4a04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_br_u32","instruction_id":"ld1h_z_p_br","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4c04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_br_u64","instruction_id":"ld1h_z_p_br","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4e04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bi_u16","instruction_id":"ld1h_z_p_bi","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4a0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_z_p_bi_u32","instruction_id":"ld1h_z_p_bi","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4c0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_z_p_bi_u64","instruction_id":"ld1h_z_p_bi","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4e0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_z_p_br_u16","instruction_id":"ld1h_z_p_br","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4a04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_z_p_br_u32","instruction_id":"ld1h_z_p_br","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4c04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_z_p_br_u64","instruction_id":"ld1h_z_p_br","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4e04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1h_z_p_bz_d_64_scaled","instruction_id":"ld1h_z_p_bz","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4e0c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bz_d_64_unscaled","instruction_id":"ld1h_z_p_bz","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4c0c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bz_d_x32_scaled","instruction_id":"ld1h_z_p_bz","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc4a04000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bz_d_x32_unscaled","instruction_id":"ld1h_z_p_bz","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc4804000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bz_s_x32_scaled","instruction_id":"ld1h_z_p_bz","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0x84a04000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_z_p_bz_s_x32_unscaled","instruction_id":"ld1h_z_p_bz","mnemonic":"LD1H","category":"sve","source_file":"ld1h_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0x84804000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_za_p_rrr_","instruction_id":"ld1h_za_p_rrr","mnemonic":"LD1H","category":"sme","source_file":"ld1h_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0400000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1h_za_p_rrr_","instruction_id":"ld1h_za_p_rrr","mnemonic":"LD1H","category":"sme","source_file":"ld1h_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0400000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1q_z_p_ar_d_64_unscaled","instruction_id":"ld1q_z_p_ar","mnemonic":"LD1Q","category":"sve","source_file":"ld1q_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc400a000","features":[{"feature":"FEAT_SVE2p1","name":"v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1q_za_p_rrr_","instruction_id":"ld1q_za_p_rrr","mnemonic":"LD1Q","category":"sme","source_file":"ld1q_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe1c00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rb_z_p_bi_u16","instruction_id":"ld1rb_z_p_bi","mnemonic":"LD1RB","category":"sve","source_file":"ld1rb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8440a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rb_z_p_bi_u32","instruction_id":"ld1rb_z_p_bi","mnemonic":"LD1RB","category":"sve","source_file":"ld1rb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8440c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rb_z_p_bi_u64","instruction_id":"ld1rb_z_p_bi","mnemonic":"LD1RB","category":"sve","source_file":"ld1rb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8440e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rb_z_p_bi_u8","instruction_id":"ld1rb_z_p_bi","mnemonic":"LD1RB","category":"sve","source_file":"ld1rb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84408000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rd_z_p_bi_u64","instruction_id":"ld1rd_z_p_bi","mnemonic":"LD1RD","category":"sve","source_file":"ld1rd_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85c0e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rh_z_p_bi_u16","instruction_id":"ld1rh_z_p_bi","mnemonic":"LD1RH","category":"sve","source_file":"ld1rh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84c0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rh_z_p_bi_u32","instruction_id":"ld1rh_z_p_bi","mnemonic":"LD1RH","category":"sve","source_file":"ld1rh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84c0c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rh_z_p_bi_u64","instruction_id":"ld1rh_z_p_bi","mnemonic":"LD1RH","category":"sve","source_file":"ld1rh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84c0e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1q_za_p_rrr_","instruction_id":"ld1q_za_p_rrr","mnemonic":"LD1Q","category":"sme","source_file":"ld1q_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe1c00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rb_z_p_bi_u16","instruction_id":"ld1rb_z_p_bi","mnemonic":"LD1RB","category":"sve","source_file":"ld1rb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8440a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rb_z_p_bi_u32","instruction_id":"ld1rb_z_p_bi","mnemonic":"LD1RB","category":"sve","source_file":"ld1rb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8440c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rb_z_p_bi_u64","instruction_id":"ld1rb_z_p_bi","mnemonic":"LD1RB","category":"sve","source_file":"ld1rb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8440e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rb_z_p_bi_u8","instruction_id":"ld1rb_z_p_bi","mnemonic":"LD1RB","category":"sve","source_file":"ld1rb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84408000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rd_z_p_bi_u64","instruction_id":"ld1rd_z_p_bi","mnemonic":"LD1RD","category":"sve","source_file":"ld1rd_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85c0e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rh_z_p_bi_u16","instruction_id":"ld1rh_z_p_bi","mnemonic":"LD1RH","category":"sve","source_file":"ld1rh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84c0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rh_z_p_bi_u32","instruction_id":"ld1rh_z_p_bi","mnemonic":"LD1RH","category":"sve","source_file":"ld1rh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84c0c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rh_z_p_bi_u64","instruction_id":"ld1rh_z_p_bi","mnemonic":"LD1RH","category":"sve","source_file":"ld1rh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84c0e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rob_z_p_bi_u8","instruction_id":"ld1rob_z_p_bi","mnemonic":"LD1ROB","category":"sve","source_file":"ld1rob_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4202000","features":[{"feature":"FEAT_F64MM","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rob_z_p_br_contiguous","instruction_id":"ld1rob_z_p_br","mnemonic":"LD1ROB","category":"sve","source_file":"ld1rob_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4200000","features":[{"feature":"FEAT_F64MM","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rod_z_p_bi_u64","instruction_id":"ld1rod_z_p_bi","mnemonic":"LD1ROD","category":"sve","source_file":"ld1rod_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5a02000","features":[{"feature":"FEAT_F64MM","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5158,39 +5158,39 @@
|
||||
{"id":"ld1roh_z_p_br_contiguous","instruction_id":"ld1roh_z_p_br","mnemonic":"LD1ROH","category":"sve","source_file":"ld1roh_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4a00000","features":[{"feature":"FEAT_F64MM","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1row_z_p_bi_u32","instruction_id":"ld1row_z_p_bi","mnemonic":"LD1ROW","category":"sve","source_file":"ld1row_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5202000","features":[{"feature":"FEAT_F64MM","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1row_z_p_br_contiguous","instruction_id":"ld1row_z_p_br","mnemonic":"LD1ROW","category":"sve","source_file":"ld1row_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5200000","features":[{"feature":"FEAT_F64MM","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqb_z_p_bi_u8","instruction_id":"ld1rqb_z_p_bi","mnemonic":"LD1RQB","category":"sve","source_file":"ld1rqb_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4002000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqb_z_p_br_contiguous","instruction_id":"ld1rqb_z_p_br","mnemonic":"LD1RQB","category":"sve","source_file":"ld1rqb_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4000000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqd_z_p_bi_u64","instruction_id":"ld1rqd_z_p_bi","mnemonic":"LD1RQD","category":"sve","source_file":"ld1rqd_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5802000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqd_z_p_br_contiguous","instruction_id":"ld1rqd_z_p_br","mnemonic":"LD1RQD","category":"sve","source_file":"ld1rqd_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5800000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqh_z_p_bi_u16","instruction_id":"ld1rqh_z_p_bi","mnemonic":"LD1RQH","category":"sve","source_file":"ld1rqh_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4802000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqh_z_p_br_contiguous","instruction_id":"ld1rqh_z_p_br","mnemonic":"LD1RQH","category":"sve","source_file":"ld1rqh_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4800000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqw_z_p_bi_u32","instruction_id":"ld1rqw_z_p_bi","mnemonic":"LD1RQW","category":"sve","source_file":"ld1rqw_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5002000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqw_z_p_br_contiguous","instruction_id":"ld1rqw_z_p_br","mnemonic":"LD1RQW","category":"sve","source_file":"ld1rqw_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5000000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rsb_z_p_bi_s16","instruction_id":"ld1rsb_z_p_bi","mnemonic":"LD1RSB","category":"sve","source_file":"ld1rsb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85c0c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rsb_z_p_bi_s32","instruction_id":"ld1rsb_z_p_bi","mnemonic":"LD1RSB","category":"sve","source_file":"ld1rsb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85c0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rsb_z_p_bi_s64","instruction_id":"ld1rsb_z_p_bi","mnemonic":"LD1RSB","category":"sve","source_file":"ld1rsb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85c08000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rsh_z_p_bi_s32","instruction_id":"ld1rsh_z_p_bi","mnemonic":"LD1RSH","category":"sve","source_file":"ld1rsh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8540a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rsh_z_p_bi_s64","instruction_id":"ld1rsh_z_p_bi","mnemonic":"LD1RSH","category":"sve","source_file":"ld1rsh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85408000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rsw_z_p_bi_s64","instruction_id":"ld1rsw_z_p_bi","mnemonic":"LD1RSW","category":"sve","source_file":"ld1rsw_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84c08000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rw_z_p_bi_u32","instruction_id":"ld1rw_z_p_bi","mnemonic":"LD1RW","category":"sve","source_file":"ld1rw_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8540c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rw_z_p_bi_u64","instruction_id":"ld1rw_z_p_bi","mnemonic":"LD1RW","category":"sve","source_file":"ld1rw_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8540e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1rqb_z_p_bi_u8","instruction_id":"ld1rqb_z_p_bi","mnemonic":"LD1RQB","category":"sve","source_file":"ld1rqb_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4002000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rqb_z_p_br_contiguous","instruction_id":"ld1rqb_z_p_br","mnemonic":"LD1RQB","category":"sve","source_file":"ld1rqb_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4000000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rqd_z_p_bi_u64","instruction_id":"ld1rqd_z_p_bi","mnemonic":"LD1RQD","category":"sve","source_file":"ld1rqd_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5802000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rqd_z_p_br_contiguous","instruction_id":"ld1rqd_z_p_br","mnemonic":"LD1RQD","category":"sve","source_file":"ld1rqd_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5800000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rqh_z_p_bi_u16","instruction_id":"ld1rqh_z_p_bi","mnemonic":"LD1RQH","category":"sve","source_file":"ld1rqh_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa4802000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rqh_z_p_br_contiguous","instruction_id":"ld1rqh_z_p_br","mnemonic":"LD1RQH","category":"sve","source_file":"ld1rqh_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4800000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rqw_z_p_bi_u32","instruction_id":"ld1rqw_z_p_bi","mnemonic":"LD1RQW","category":"sve","source_file":"ld1rqw_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5002000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rqw_z_p_br_contiguous","instruction_id":"ld1rqw_z_p_br","mnemonic":"LD1RQW","category":"sve","source_file":"ld1rqw_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5000000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rsb_z_p_bi_s16","instruction_id":"ld1rsb_z_p_bi","mnemonic":"LD1RSB","category":"sve","source_file":"ld1rsb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85c0c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rsb_z_p_bi_s32","instruction_id":"ld1rsb_z_p_bi","mnemonic":"LD1RSB","category":"sve","source_file":"ld1rsb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85c0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rsb_z_p_bi_s64","instruction_id":"ld1rsb_z_p_bi","mnemonic":"LD1RSB","category":"sve","source_file":"ld1rsb_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85c08000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rsh_z_p_bi_s32","instruction_id":"ld1rsh_z_p_bi","mnemonic":"LD1RSH","category":"sve","source_file":"ld1rsh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8540a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rsh_z_p_bi_s64","instruction_id":"ld1rsh_z_p_bi","mnemonic":"LD1RSH","category":"sve","source_file":"ld1rsh_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85408000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rsw_z_p_bi_s64","instruction_id":"ld1rsw_z_p_bi","mnemonic":"LD1RSW","category":"sve","source_file":"ld1rsw_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x84c08000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rw_z_p_bi_u32","instruction_id":"ld1rw_z_p_bi","mnemonic":"LD1RW","category":"sve","source_file":"ld1rw_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8540c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1rw_z_p_bi_u64","instruction_id":"ld1rw_z_p_bi","mnemonic":"LD1RW","category":"sve","source_file":"ld1rw_z_p_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x8540e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sb_z_p_ai_d","instruction_id":"ld1sb_z_p_ai","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4208000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_ai_s","instruction_id":"ld1sb_z_p_ai","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0x84208000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_bi_s16","instruction_id":"ld1sb_z_p_bi","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5c0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_bi_s32","instruction_id":"ld1sb_z_p_bi","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5a0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_bi_s64","instruction_id":"ld1sb_z_p_bi","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa580a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_br_s16","instruction_id":"ld1sb_z_p_br","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5c04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_br_s32","instruction_id":"ld1sb_z_p_br","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5a04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_br_s64","instruction_id":"ld1sb_z_p_br","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5804000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_bi_s16","instruction_id":"ld1sb_z_p_bi","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5c0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sb_z_p_bi_s32","instruction_id":"ld1sb_z_p_bi","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5a0a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sb_z_p_bi_s64","instruction_id":"ld1sb_z_p_bi","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa580a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sb_z_p_br_s16","instruction_id":"ld1sb_z_p_br","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5c04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sb_z_p_br_s32","instruction_id":"ld1sb_z_p_br","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5a04000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sb_z_p_br_s64","instruction_id":"ld1sb_z_p_br","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5804000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sb_z_p_bz_d_64_unscaled","instruction_id":"ld1sb_z_p_bz","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4408000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_bz_d_x32_unscaled","instruction_id":"ld1sb_z_p_bz","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc4000000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sb_z_p_bz_s_x32_unscaled","instruction_id":"ld1sb_z_p_bz","mnemonic":"LD1SB","category":"sve","source_file":"ld1sb_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0x84000000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_ai_d","instruction_id":"ld1sh_z_p_ai","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4a08000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_ai_s","instruction_id":"ld1sh_z_p_ai","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0x84a08000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_bi_s32","instruction_id":"ld1sh_z_p_bi","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa520a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_bi_s64","instruction_id":"ld1sh_z_p_bi","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa500a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_br_s32","instruction_id":"ld1sh_z_p_br","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5204000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_br_s64","instruction_id":"ld1sh_z_p_br","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5004000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_bi_s32","instruction_id":"ld1sh_z_p_bi","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa520a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sh_z_p_bi_s64","instruction_id":"ld1sh_z_p_bi","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa500a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sh_z_p_br_s32","instruction_id":"ld1sh_z_p_br","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5204000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sh_z_p_br_s64","instruction_id":"ld1sh_z_p_br","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5004000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sh_z_p_bz_d_64_scaled","instruction_id":"ld1sh_z_p_bz","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4e08000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_bz_d_64_unscaled","instruction_id":"ld1sh_z_p_bz","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4c08000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_bz_d_x32_scaled","instruction_id":"ld1sh_z_p_bz","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc4a00000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5198,8 +5198,8 @@
|
||||
{"id":"ld1sh_z_p_bz_s_x32_scaled","instruction_id":"ld1sh_z_p_bz","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0x84a00000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sh_z_p_bz_s_x32_unscaled","instruction_id":"ld1sh_z_p_bz","mnemonic":"LD1SH","category":"sve","source_file":"ld1sh_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0x84800000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sw_z_p_ai_d","instruction_id":"ld1sw_z_p_ai","mnemonic":"LD1SW","category":"sve","source_file":"ld1sw_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc5208000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sw_z_p_bi_s64","instruction_id":"ld1sw_z_p_bi","mnemonic":"LD1SW","category":"sve","source_file":"ld1sw_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa480a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sw_z_p_br_s64","instruction_id":"ld1sw_z_p_br","mnemonic":"LD1SW","category":"sve","source_file":"ld1sw_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4804000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sw_z_p_bi_s64","instruction_id":"ld1sw_z_p_bi","mnemonic":"LD1SW","category":"sve","source_file":"ld1sw_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa480a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sw_z_p_br_s64","instruction_id":"ld1sw_z_p_br","mnemonic":"LD1SW","category":"sve","source_file":"ld1sw_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa4804000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1sw_z_p_bz_d_64_scaled","instruction_id":"ld1sw_z_p_bz","mnemonic":"LD1SW","category":"sve","source_file":"ld1sw_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc5608000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sw_z_p_bz_d_64_unscaled","instruction_id":"ld1sw_z_p_bz","mnemonic":"LD1SW","category":"sve","source_file":"ld1sw_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc5408000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1sw_z_p_bz_d_x32_scaled","instruction_id":"ld1sw_z_p_bz","mnemonic":"LD1SW","category":"sve","source_file":"ld1sw_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc5200000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5208,25 +5208,25 @@
|
||||
{"id":"ld1w_mz_p_bi_4","instruction_id":"ld1w_mz_p_bi","mnemonic":"LD1W","category":"sve","source_file":"ld1w_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa040c000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_mz_p_br_2","instruction_id":"ld1w_mz_p_br","mnemonic":"LD1W","category":"sve","source_file":"ld1w_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0004000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_mz_p_br_4","instruction_id":"ld1w_mz_p_br","mnemonic":"LD1W","category":"sve","source_file":"ld1w_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa000c000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_mzx_p_bi_2x8","instruction_id":"ld1w_mzx_p_bi","mnemonic":"LD1W","category":"sme","source_file":"ld1w_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1404000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_mzx_p_bi_4x4","instruction_id":"ld1w_mzx_p_bi","mnemonic":"LD1W","category":"sme","source_file":"ld1w_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140c000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_mzx_p_br_2x8","instruction_id":"ld1w_mzx_p_br","mnemonic":"LD1W","category":"sme","source_file":"ld1w_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1004000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_mzx_p_br_4x4","instruction_id":"ld1w_mzx_p_br","mnemonic":"LD1W","category":"sme","source_file":"ld1w_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100c000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_mzx_p_bi_2x8","instruction_id":"ld1w_mzx_p_bi","mnemonic":"LD1W","category":"sme","source_file":"ld1w_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1404000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1w_mzx_p_bi_4x4","instruction_id":"ld1w_mzx_p_bi","mnemonic":"LD1W","category":"sme","source_file":"ld1w_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140c000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1w_mzx_p_br_2x8","instruction_id":"ld1w_mzx_p_br","mnemonic":"LD1W","category":"sme","source_file":"ld1w_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1004000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1w_mzx_p_br_4x4","instruction_id":"ld1w_mzx_p_br","mnemonic":"LD1W","category":"sme","source_file":"ld1w_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100c000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1w_z_p_ai_d","instruction_id":"ld1w_z_p_ai","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc520c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_ai_s","instruction_id":"ld1w_z_p_ai","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0x8520c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bi_u128","instruction_id":"ld1w_z_p_bi","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5102000","features":[{"feature":"FEAT_SVE2p1","name":"v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bi_u32","instruction_id":"ld1w_z_p_bi","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa540a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bi_u64","instruction_id":"ld1w_z_p_bi","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa560a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bi_u32","instruction_id":"ld1w_z_p_bi","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa540a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1w_z_p_bi_u64","instruction_id":"ld1w_z_p_bi","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa560a000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1w_z_p_br_u128","instruction_id":"ld1w_z_p_br","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5008000","features":[{"feature":"FEAT_SVE2p1","name":"v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_br_u32","instruction_id":"ld1w_z_p_br","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5404000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_br_u64","instruction_id":"ld1w_z_p_br","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5604000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_br_u32","instruction_id":"ld1w_z_p_br","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5404000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1w_z_p_br_u64","instruction_id":"ld1w_z_p_br","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa5604000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld1w_z_p_bz_d_64_scaled","instruction_id":"ld1w_z_p_bz","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc560c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bz_d_64_unscaled","instruction_id":"ld1w_z_p_bz","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc540c000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bz_d_x32_scaled","instruction_id":"ld1w_z_p_bz","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc5204000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bz_d_x32_unscaled","instruction_id":"ld1w_z_p_bz","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0xc5004000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bz_s_x32_scaled","instruction_id":"ld1w_z_p_bz","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0x85204000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_z_p_bz_s_x32_unscaled","instruction_id":"ld1w_z_p_bz","mnemonic":"LD1W","category":"sve","source_file":"ld1w_z_p_bz.xml","encoding_mask":"0xffa0e000","encoding_value":"0x85004000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_za_p_rrr_","instruction_id":"ld1w_za_p_rrr","mnemonic":"LD1W","category":"sme","source_file":"ld1w_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0800000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld1w_za_p_rrr_","instruction_id":"ld1w_za_p_rrr","mnemonic":"LD1W","category":"sme","source_file":"ld1w_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0800000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ld2b_z_p_bi_contiguous","instruction_id":"ld2b_z_p_bi","mnemonic":"LD2B","category":"sve","source_file":"ld2b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa420e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld2b_z_p_br_contiguous","instruction_id":"ld2b_z_p_br","mnemonic":"LD2B","category":"sve","source_file":"ld2b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa420c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ld2d_z_p_bi_contiguous","instruction_id":"ld2d_z_p_bi","mnemonic":"LD2D","category":"sve","source_file":"ld2d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa5a0e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5337,37 +5337,37 @@
|
||||
{"id":"ldnt1b_mz_p_bi_4","instruction_id":"ldnt1b_mz_p_bi","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa0408001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_mz_p_br_2","instruction_id":"ldnt1b_mz_p_br","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0000001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_mz_p_br_4","instruction_id":"ldnt1b_mz_p_br","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa0008001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_mzx_p_bi_2x8","instruction_id":"ldnt1b_mzx_p_bi","mnemonic":"LDNT1B","category":"sme","source_file":"ldnt1b_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1400008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_mzx_p_bi_4x4","instruction_id":"ldnt1b_mzx_p_bi","mnemonic":"LDNT1B","category":"sme","source_file":"ldnt1b_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa1408008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_mzx_p_br_2x8","instruction_id":"ldnt1b_mzx_p_br","mnemonic":"LDNT1B","category":"sme","source_file":"ldnt1b_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1000008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_mzx_p_br_4x4","instruction_id":"ldnt1b_mzx_p_br","mnemonic":"LDNT1B","category":"sme","source_file":"ldnt1b_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa1008008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_mzx_p_bi_2x8","instruction_id":"ldnt1b_mzx_p_bi","mnemonic":"LDNT1B","category":"sme","source_file":"ldnt1b_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1400008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1b_mzx_p_bi_4x4","instruction_id":"ldnt1b_mzx_p_bi","mnemonic":"LDNT1B","category":"sme","source_file":"ldnt1b_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa1408008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1b_mzx_p_br_2x8","instruction_id":"ldnt1b_mzx_p_br","mnemonic":"LDNT1B","category":"sme","source_file":"ldnt1b_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1000008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1b_mzx_p_br_4x4","instruction_id":"ldnt1b_mzx_p_br","mnemonic":"LDNT1B","category":"sme","source_file":"ldnt1b_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa1008008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1b_z_p_ar_d_64_unscaled","instruction_id":"ldnt1b_z_p_ar","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc400c000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_z_p_ar_s_x32_unscaled","instruction_id":"ldnt1b_z_p_ar","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0x8400a000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_z_p_bi_contiguous","instruction_id":"ldnt1b_z_p_bi","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa400e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_z_p_br_contiguous","instruction_id":"ldnt1b_z_p_br","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa400c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1b_z_p_bi_contiguous","instruction_id":"ldnt1b_z_p_bi","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa400e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1b_z_p_br_contiguous","instruction_id":"ldnt1b_z_p_br","mnemonic":"LDNT1B","category":"sve","source_file":"ldnt1b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa400c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1d_mz_p_bi_2","instruction_id":"ldnt1d_mz_p_bi","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_mz_p_bi.xml","encoding_mask":"0xfff0e001","encoding_value":"0xa0406001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_mz_p_bi_4","instruction_id":"ldnt1d_mz_p_bi","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa040e001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_mz_p_br_2","instruction_id":"ldnt1d_mz_p_br","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0006001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_mz_p_br_4","instruction_id":"ldnt1d_mz_p_br","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa000e001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_mzx_p_bi_2x8","instruction_id":"ldnt1d_mzx_p_bi","mnemonic":"LDNT1D","category":"sme","source_file":"ldnt1d_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1406008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_mzx_p_bi_4x4","instruction_id":"ldnt1d_mzx_p_bi","mnemonic":"LDNT1D","category":"sme","source_file":"ldnt1d_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140e008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_mzx_p_br_2x8","instruction_id":"ldnt1d_mzx_p_br","mnemonic":"LDNT1D","category":"sme","source_file":"ldnt1d_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1006008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_mzx_p_br_4x4","instruction_id":"ldnt1d_mzx_p_br","mnemonic":"LDNT1D","category":"sme","source_file":"ldnt1d_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100e008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_mzx_p_bi_2x8","instruction_id":"ldnt1d_mzx_p_bi","mnemonic":"LDNT1D","category":"sme","source_file":"ldnt1d_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1406008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1d_mzx_p_bi_4x4","instruction_id":"ldnt1d_mzx_p_bi","mnemonic":"LDNT1D","category":"sme","source_file":"ldnt1d_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140e008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1d_mzx_p_br_2x8","instruction_id":"ldnt1d_mzx_p_br","mnemonic":"LDNT1D","category":"sme","source_file":"ldnt1d_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1006008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1d_mzx_p_br_4x4","instruction_id":"ldnt1d_mzx_p_br","mnemonic":"LDNT1D","category":"sme","source_file":"ldnt1d_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100e008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1d_z_p_ar_d_64_unscaled","instruction_id":"ldnt1d_z_p_ar","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc580c000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_z_p_bi_contiguous","instruction_id":"ldnt1d_z_p_bi","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa580e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_z_p_br_contiguous","instruction_id":"ldnt1d_z_p_br","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa580c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1d_z_p_bi_contiguous","instruction_id":"ldnt1d_z_p_bi","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa580e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1d_z_p_br_contiguous","instruction_id":"ldnt1d_z_p_br","mnemonic":"LDNT1D","category":"sve","source_file":"ldnt1d_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa580c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1h_mz_p_bi_2","instruction_id":"ldnt1h_mz_p_bi","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_mz_p_bi.xml","encoding_mask":"0xfff0e001","encoding_value":"0xa0402001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_mz_p_bi_4","instruction_id":"ldnt1h_mz_p_bi","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa040a001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_mz_p_br_2","instruction_id":"ldnt1h_mz_p_br","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0002001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_mz_p_br_4","instruction_id":"ldnt1h_mz_p_br","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa000a001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_mzx_p_bi_2x8","instruction_id":"ldnt1h_mzx_p_bi","mnemonic":"LDNT1H","category":"sme","source_file":"ldnt1h_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1402008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_mzx_p_bi_4x4","instruction_id":"ldnt1h_mzx_p_bi","mnemonic":"LDNT1H","category":"sme","source_file":"ldnt1h_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140a008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_mzx_p_br_2x8","instruction_id":"ldnt1h_mzx_p_br","mnemonic":"LDNT1H","category":"sme","source_file":"ldnt1h_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1002008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_mzx_p_br_4x4","instruction_id":"ldnt1h_mzx_p_br","mnemonic":"LDNT1H","category":"sme","source_file":"ldnt1h_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100a008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_mzx_p_bi_2x8","instruction_id":"ldnt1h_mzx_p_bi","mnemonic":"LDNT1H","category":"sme","source_file":"ldnt1h_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1402008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1h_mzx_p_bi_4x4","instruction_id":"ldnt1h_mzx_p_bi","mnemonic":"LDNT1H","category":"sme","source_file":"ldnt1h_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140a008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1h_mzx_p_br_2x8","instruction_id":"ldnt1h_mzx_p_br","mnemonic":"LDNT1H","category":"sme","source_file":"ldnt1h_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1002008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1h_mzx_p_br_4x4","instruction_id":"ldnt1h_mzx_p_br","mnemonic":"LDNT1H","category":"sme","source_file":"ldnt1h_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100a008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1h_z_p_ar_d_64_unscaled","instruction_id":"ldnt1h_z_p_ar","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc480c000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_z_p_ar_s_x32_unscaled","instruction_id":"ldnt1h_z_p_ar","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0x8480a000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_z_p_bi_contiguous","instruction_id":"ldnt1h_z_p_bi","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa480e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_z_p_br_contiguous","instruction_id":"ldnt1h_z_p_br","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa480c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1h_z_p_bi_contiguous","instruction_id":"ldnt1h_z_p_bi","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa480e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1h_z_p_br_contiguous","instruction_id":"ldnt1h_z_p_br","mnemonic":"LDNT1H","category":"sve","source_file":"ldnt1h_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa480c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1sb_z_p_ar_d_64_unscaled","instruction_id":"ldnt1sb_z_p_ar","mnemonic":"LDNT1SB","category":"sve","source_file":"ldnt1sb_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4008000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1sb_z_p_ar_s_x32_unscaled","instruction_id":"ldnt1sb_z_p_ar","mnemonic":"LDNT1SB","category":"sve","source_file":"ldnt1sb_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0x84008000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1sh_z_p_ar_d_64_unscaled","instruction_id":"ldnt1sh_z_p_ar","mnemonic":"LDNT1SH","category":"sve","source_file":"ldnt1sh_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc4808000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5377,18 +5377,18 @@
|
||||
{"id":"ldnt1w_mz_p_bi_4","instruction_id":"ldnt1w_mz_p_bi","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa040c001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_mz_p_br_2","instruction_id":"ldnt1w_mz_p_br","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0004001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_mz_p_br_4","instruction_id":"ldnt1w_mz_p_br","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa000c001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_mzx_p_bi_2x8","instruction_id":"ldnt1w_mzx_p_bi","mnemonic":"LDNT1W","category":"sme","source_file":"ldnt1w_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1404008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_mzx_p_bi_4x4","instruction_id":"ldnt1w_mzx_p_bi","mnemonic":"LDNT1W","category":"sme","source_file":"ldnt1w_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140c008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_mzx_p_br_2x8","instruction_id":"ldnt1w_mzx_p_br","mnemonic":"LDNT1W","category":"sme","source_file":"ldnt1w_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1004008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_mzx_p_br_4x4","instruction_id":"ldnt1w_mzx_p_br","mnemonic":"LDNT1W","category":"sme","source_file":"ldnt1w_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100c008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_mzx_p_bi_2x8","instruction_id":"ldnt1w_mzx_p_bi","mnemonic":"LDNT1W","category":"sme","source_file":"ldnt1w_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1404008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1w_mzx_p_bi_4x4","instruction_id":"ldnt1w_mzx_p_bi","mnemonic":"LDNT1W","category":"sme","source_file":"ldnt1w_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa140c008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1w_mzx_p_br_2x8","instruction_id":"ldnt1w_mzx_p_br","mnemonic":"LDNT1W","category":"sme","source_file":"ldnt1w_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1004008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1w_mzx_p_br_4x4","instruction_id":"ldnt1w_mzx_p_br","mnemonic":"LDNT1W","category":"sme","source_file":"ldnt1w_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa100c008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1w_z_p_ar_d_64_unscaled","instruction_id":"ldnt1w_z_p_ar","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xc500c000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_z_p_ar_s_x32_unscaled","instruction_id":"ldnt1w_z_p_ar","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0x8500a000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_z_p_bi_contiguous","instruction_id":"ldnt1w_z_p_bi","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa500e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_z_p_br_contiguous","instruction_id":"ldnt1w_z_p_br","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa500c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldr_p_bi_","instruction_id":"ldr_p_bi","mnemonic":"LDR","category":"sve","source_file":"ldr_p_bi.xml","encoding_mask":"0xffc0e010","encoding_value":"0x85800000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldr_z_bi_","instruction_id":"ldr_z_bi","mnemonic":"LDR","category":"sve","source_file":"ldr_z_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85804000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldr_za_ri_","instruction_id":"ldr_za_ri","mnemonic":"LDR","category":"sme","source_file":"ldr_za_ri.xml","encoding_mask":"0xffff9c10","encoding_value":"0xe1000000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldr_zt_br_","instruction_id":"ldr_zt_br","mnemonic":"LDR","category":"sme","source_file":"ldr_zt_br.xml","encoding_mask":"0xfffffc1f","encoding_value":"0xe11f8000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"ldnt1w_z_p_bi_contiguous","instruction_id":"ldnt1w_z_p_bi","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xa500e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldnt1w_z_p_br_contiguous","instruction_id":"ldnt1w_z_p_br","mnemonic":"LDNT1W","category":"sve","source_file":"ldnt1w_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xa500c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldr_p_bi_","instruction_id":"ldr_p_bi","mnemonic":"LDR","category":"sve","source_file":"ldr_p_bi.xml","encoding_mask":"0xffc0e010","encoding_value":"0x85800000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldr_z_bi_","instruction_id":"ldr_z_bi","mnemonic":"LDR","category":"sve","source_file":"ldr_z_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0x85804000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated standalone streaming load form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile and SM=1. Predicates/aliases/offsets and staged destination commit preserve full declared state and ordered memory/fault effects. Selected packed SSE2 recipe retains80 archived-original comparisons; both-variant160 and historical1960 original/model/native cases remain distinct evidence. Original mask199 and C0/NC/OSH controls do not infer current memory authority. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldr_za_ri_","instruction_id":"ldr_za_ri","mnemonic":"LDR","category":"sme","source_file":"ldr_za_ri.xml","encoding_mask":"0xffff9c10","encoding_value":"0xe1000000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"ldr_zt_br_","instruction_id":"ldr_zt_br","mnemonic":"LDR","category":"sme","source_file":"ldr_zt_br.xml","encoding_mask":"0xfffffc1f","encoding_value":"0xe11f8000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"lsl_z_p_zi_","instruction_id":"lsl_z_p_zi","mnemonic":"LSL","category":"sve","source_file":"lsl_z_p_zi.xml","encoding_mask":"0xff3fe000","encoding_value":"0x04038000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"apple-sme2-streaming-v1","status":"implemented","scope":"Enabled streaming SME integer shifts, accumulates, inserts and XOR rotates at SVL16/32/64/128/256. Basic variable counts use the full unsigned lane or full enclosing 64-bit count; bidirectional counts use full signed lanes with architectural saturation bounds. Predicate merging uses each element first bit. Original source/count/destination aliases, reverse forms and QC/NZCV/FPCR preservation are modeled. Requires FEAT_SME and SM=1, independent of ZA; no extra SME2 requirement. General nonstreaming SVE, disabled-feature traps, MOVPRFX pairs and full exception delivery remain outside this profile."}]},
|
||||
{"id":"lsl_z_p_zw_","instruction_id":"lsl_z_p_zw","mnemonic":"LSL","category":"sve","source_file":"lsl_z_p_zw.xml","encoding_mask":"0xff3fe000","encoding_value":"0x041b8000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme-svl16","status":"implemented","scope":"Enabled streaming SME integer shifts, accumulates, inserts and XOR rotates at SVL16/32/64/128/256. Basic variable counts use the full unsigned lane or full enclosing 64-bit count; bidirectional counts use full signed lanes with architectural saturation bounds. Predicate merging uses each element first bit. Original source/count/destination aliases, reverse forms and QC/NZCV/FPCR preservation are modeled. Requires FEAT_SME and SM=1, independent of ZA; no extra SME2 requirement. General nonstreaming SVE, disabled-feature traps, MOVPRFX pairs and full exception delivery remain outside this profile. This registry row uses declared V2 DIT=0 because selected scalar variable routes have count-dependent control flow. Packed Byte same-width LSL/LSR (including reverse forms) remains available under V1; source-bound policy evidence records that boundary."}]},
|
||||
{"id":"lsl_z_p_zz_","instruction_id":"lsl_z_p_zz","mnemonic":"LSL","category":"sve","source_file":"lsl_z_p_zz.xml","encoding_mask":"0xff3fe000","encoding_value":"0x04138000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme-svl16","status":"implemented","scope":"Enabled streaming SME integer shifts, accumulates, inserts and XOR rotates at SVL16/32/64/128/256. Basic variable counts use the full unsigned lane or full enclosing 64-bit count; bidirectional counts use full signed lanes with architectural saturation bounds. Predicate merging uses each element first bit. Original source/count/destination aliases, reverse forms and QC/NZCV/FPCR preservation are modeled. Requires FEAT_SME and SM=1, independent of ZA; no extra SME2 requirement. General nonstreaming SVE, disabled-feature traps, MOVPRFX pairs and full exception delivery remain outside this profile. This registry row uses declared V2 DIT=0 because selected scalar variable routes have count-dependent control flow. Packed Byte same-width LSL/LSR (including reverse forms) remains available under V1; source-bound policy evidence records that boundary."}]},
|
||||
@@ -5918,10 +5918,10 @@
|
||||
{"id":"st1b_mz_p_bi_4","instruction_id":"st1b_mz_p_bi","mnemonic":"ST1B","category":"sve","source_file":"st1b_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa0608000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_mz_p_br_2","instruction_id":"st1b_mz_p_br","mnemonic":"ST1B","category":"sve","source_file":"st1b_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0200000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_mz_p_br_4","instruction_id":"st1b_mz_p_br","mnemonic":"ST1B","category":"sve","source_file":"st1b_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa0208000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_mzx_p_bi_2x8","instruction_id":"st1b_mzx_p_bi","mnemonic":"ST1B","category":"sme","source_file":"st1b_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1600000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_mzx_p_bi_4x4","instruction_id":"st1b_mzx_p_bi","mnemonic":"ST1B","category":"sme","source_file":"st1b_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa1608000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_mzx_p_br_2x8","instruction_id":"st1b_mzx_p_br","mnemonic":"ST1B","category":"sme","source_file":"st1b_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1200000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_mzx_p_br_4x4","instruction_id":"st1b_mzx_p_br","mnemonic":"ST1B","category":"sme","source_file":"st1b_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa1208000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_mzx_p_bi_2x8","instruction_id":"st1b_mzx_p_bi","mnemonic":"ST1B","category":"sme","source_file":"st1b_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1600000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1b_mzx_p_bi_4x4","instruction_id":"st1b_mzx_p_bi","mnemonic":"ST1B","category":"sme","source_file":"st1b_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa1608000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1b_mzx_p_br_2x8","instruction_id":"st1b_mzx_p_br","mnemonic":"ST1B","category":"sme","source_file":"st1b_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1200000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1b_mzx_p_br_4x4","instruction_id":"st1b_mzx_p_br","mnemonic":"ST1B","category":"sme","source_file":"st1b_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa1208000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1b_z_p_ai_d","instruction_id":"st1b_z_p_ai","mnemonic":"ST1B","category":"sve","source_file":"st1b_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe440a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_z_p_ai_s","instruction_id":"st1b_z_p_ai","mnemonic":"ST1B","category":"sve","source_file":"st1b_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe460a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_z_p_bi_","instruction_id":"st1b_z_p_bi","mnemonic":"ST1B","category":"sve","source_file":"st1b_z_p_bi.xml","encoding_mask":"0xff90e000","encoding_value":"0xe400e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5929,15 +5929,15 @@
|
||||
{"id":"st1b_z_p_bz_d_64_unscaled","instruction_id":"st1b_z_p_bz","mnemonic":"ST1B","category":"sve","source_file":"st1b_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe400a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_z_p_bz_d_x32_unscaled","instruction_id":"st1b_z_p_bz","mnemonic":"ST1B","category":"sve","source_file":"st1b_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe4008000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_z_p_bz_s_x32_unscaled","instruction_id":"st1b_z_p_bz","mnemonic":"ST1B","category":"sve","source_file":"st1b_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe4408000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_za_p_rrr_","instruction_id":"st1b_za_p_rrr","mnemonic":"ST1B","category":"sme","source_file":"st1b_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0200000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1b_za_p_rrr_","instruction_id":"st1b_za_p_rrr","mnemonic":"ST1B","category":"sme","source_file":"st1b_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0200000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1d_mz_p_bi_2","instruction_id":"st1d_mz_p_bi","mnemonic":"ST1D","category":"sve","source_file":"st1d_mz_p_bi.xml","encoding_mask":"0xfff0e001","encoding_value":"0xa0606000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_mz_p_bi_4","instruction_id":"st1d_mz_p_bi","mnemonic":"ST1D","category":"sve","source_file":"st1d_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa060e000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_mz_p_br_2","instruction_id":"st1d_mz_p_br","mnemonic":"ST1D","category":"sve","source_file":"st1d_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0206000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_mz_p_br_4","instruction_id":"st1d_mz_p_br","mnemonic":"ST1D","category":"sve","source_file":"st1d_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa020e000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_mzx_p_bi_2x8","instruction_id":"st1d_mzx_p_bi","mnemonic":"ST1D","category":"sme","source_file":"st1d_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1606000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_mzx_p_bi_4x4","instruction_id":"st1d_mzx_p_bi","mnemonic":"ST1D","category":"sme","source_file":"st1d_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160e000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_mzx_p_br_2x8","instruction_id":"st1d_mzx_p_br","mnemonic":"ST1D","category":"sme","source_file":"st1d_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1206000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_mzx_p_br_4x4","instruction_id":"st1d_mzx_p_br","mnemonic":"ST1D","category":"sme","source_file":"st1d_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120e000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_mzx_p_bi_2x8","instruction_id":"st1d_mzx_p_bi","mnemonic":"ST1D","category":"sme","source_file":"st1d_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1606000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1d_mzx_p_bi_4x4","instruction_id":"st1d_mzx_p_bi","mnemonic":"ST1D","category":"sme","source_file":"st1d_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160e000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1d_mzx_p_br_2x8","instruction_id":"st1d_mzx_p_br","mnemonic":"ST1D","category":"sme","source_file":"st1d_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1206000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1d_mzx_p_br_4x4","instruction_id":"st1d_mzx_p_br","mnemonic":"ST1D","category":"sme","source_file":"st1d_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120e000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1d_z_p_ai_d","instruction_id":"st1d_z_p_ai","mnemonic":"ST1D","category":"sve","source_file":"st1d_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe5c0a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_z_p_bi_","instruction_id":"st1d_z_p_bi","mnemonic":"ST1D","category":"sve","source_file":"st1d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xe5e0e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_z_p_bi_u128","instruction_id":"st1d_z_p_bi","mnemonic":"ST1D","category":"sve","source_file":"st1d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xe5c0e000","features":[{"feature":"FEAT_SVE2p1","name":"v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5947,15 +5947,15 @@
|
||||
{"id":"st1d_z_p_bz_d_64_unscaled","instruction_id":"st1d_z_p_bz","mnemonic":"ST1D","category":"sve","source_file":"st1d_z_p_bz.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe580a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_z_p_bz_d_x32_scaled","instruction_id":"st1d_z_p_bz","mnemonic":"ST1D","category":"sve","source_file":"st1d_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe5a08000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_z_p_bz_d_x32_unscaled","instruction_id":"st1d_z_p_bz","mnemonic":"ST1D","category":"sve","source_file":"st1d_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe5808000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_za_p_rrr_","instruction_id":"st1d_za_p_rrr","mnemonic":"ST1D","category":"sme","source_file":"st1d_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0e00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1d_za_p_rrr_","instruction_id":"st1d_za_p_rrr","mnemonic":"ST1D","category":"sme","source_file":"st1d_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0e00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1h_mz_p_bi_2","instruction_id":"st1h_mz_p_bi","mnemonic":"ST1H","category":"sve","source_file":"st1h_mz_p_bi.xml","encoding_mask":"0xfff0e001","encoding_value":"0xa0602000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_mz_p_bi_4","instruction_id":"st1h_mz_p_bi","mnemonic":"ST1H","category":"sve","source_file":"st1h_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa060a000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_mz_p_br_2","instruction_id":"st1h_mz_p_br","mnemonic":"ST1H","category":"sve","source_file":"st1h_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0202000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_mz_p_br_4","instruction_id":"st1h_mz_p_br","mnemonic":"ST1H","category":"sve","source_file":"st1h_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa020a000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_mzx_p_bi_2x8","instruction_id":"st1h_mzx_p_bi","mnemonic":"ST1H","category":"sme","source_file":"st1h_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1602000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_mzx_p_bi_4x4","instruction_id":"st1h_mzx_p_bi","mnemonic":"ST1H","category":"sme","source_file":"st1h_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160a000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_mzx_p_br_2x8","instruction_id":"st1h_mzx_p_br","mnemonic":"ST1H","category":"sme","source_file":"st1h_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1202000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_mzx_p_br_4x4","instruction_id":"st1h_mzx_p_br","mnemonic":"ST1H","category":"sme","source_file":"st1h_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120a000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_mzx_p_bi_2x8","instruction_id":"st1h_mzx_p_bi","mnemonic":"ST1H","category":"sme","source_file":"st1h_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1602000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1h_mzx_p_bi_4x4","instruction_id":"st1h_mzx_p_bi","mnemonic":"ST1H","category":"sme","source_file":"st1h_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160a000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1h_mzx_p_br_2x8","instruction_id":"st1h_mzx_p_br","mnemonic":"ST1H","category":"sme","source_file":"st1h_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1202000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1h_mzx_p_br_4x4","instruction_id":"st1h_mzx_p_br","mnemonic":"ST1H","category":"sme","source_file":"st1h_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120a000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1h_z_p_ai_d","instruction_id":"st1h_z_p_ai","mnemonic":"ST1H","category":"sve","source_file":"st1h_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe4c0a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_z_p_ai_s","instruction_id":"st1h_z_p_ai","mnemonic":"ST1H","category":"sve","source_file":"st1h_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe4e0a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_z_p_bi_","instruction_id":"st1h_z_p_bi","mnemonic":"ST1H","category":"sve","source_file":"st1h_z_p_bi.xml","encoding_mask":"0xff90e000","encoding_value":"0xe480e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5966,17 +5966,17 @@
|
||||
{"id":"st1h_z_p_bz_d_x32_unscaled","instruction_id":"st1h_z_p_bz","mnemonic":"ST1H","category":"sve","source_file":"st1h_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe4808000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_z_p_bz_s_x32_scaled","instruction_id":"st1h_z_p_bz","mnemonic":"ST1H","category":"sve","source_file":"st1h_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe4e08000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_z_p_bz_s_x32_unscaled","instruction_id":"st1h_z_p_bz","mnemonic":"ST1H","category":"sve","source_file":"st1h_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe4c08000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_za_p_rrr_","instruction_id":"st1h_za_p_rrr","mnemonic":"ST1H","category":"sme","source_file":"st1h_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0600000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1h_za_p_rrr_","instruction_id":"st1h_za_p_rrr","mnemonic":"ST1H","category":"sme","source_file":"st1h_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0600000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1q_z_p_ar_d_64_unscaled","instruction_id":"st1q_z_p_ar","mnemonic":"ST1Q","category":"sve","source_file":"st1q_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe4202000","features":[{"feature":"FEAT_SVE2p1","name":"v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1q_za_p_rrr_","instruction_id":"st1q_za_p_rrr","mnemonic":"ST1Q","category":"sme","source_file":"st1q_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe1e00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1q_za_p_rrr_","instruction_id":"st1q_za_p_rrr","mnemonic":"ST1Q","category":"sme","source_file":"st1q_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe1e00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1w_mz_p_bi_2","instruction_id":"st1w_mz_p_bi","mnemonic":"ST1W","category":"sve","source_file":"st1w_mz_p_bi.xml","encoding_mask":"0xfff0e001","encoding_value":"0xa0604000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_mz_p_bi_4","instruction_id":"st1w_mz_p_bi","mnemonic":"ST1W","category":"sve","source_file":"st1w_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa060c000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_mz_p_br_2","instruction_id":"st1w_mz_p_br","mnemonic":"ST1W","category":"sve","source_file":"st1w_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0204000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_mz_p_br_4","instruction_id":"st1w_mz_p_br","mnemonic":"ST1W","category":"sve","source_file":"st1w_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa020c000","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_mzx_p_bi_2x8","instruction_id":"st1w_mzx_p_bi","mnemonic":"ST1W","category":"sme","source_file":"st1w_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1604000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_mzx_p_bi_4x4","instruction_id":"st1w_mzx_p_bi","mnemonic":"ST1W","category":"sme","source_file":"st1w_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160c000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_mzx_p_br_2x8","instruction_id":"st1w_mzx_p_br","mnemonic":"ST1W","category":"sme","source_file":"st1w_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1204000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_mzx_p_br_4x4","instruction_id":"st1w_mzx_p_br","mnemonic":"ST1W","category":"sme","source_file":"st1w_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120c000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_mzx_p_bi_2x8","instruction_id":"st1w_mzx_p_bi","mnemonic":"ST1W","category":"sme","source_file":"st1w_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1604000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1w_mzx_p_bi_4x4","instruction_id":"st1w_mzx_p_bi","mnemonic":"ST1W","category":"sme","source_file":"st1w_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160c000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1w_mzx_p_br_2x8","instruction_id":"st1w_mzx_p_br","mnemonic":"ST1W","category":"sme","source_file":"st1w_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1204000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1w_mzx_p_br_4x4","instruction_id":"st1w_mzx_p_br","mnemonic":"ST1W","category":"sme","source_file":"st1w_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120c000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st1w_z_p_ai_d","instruction_id":"st1w_z_p_ai","mnemonic":"ST1W","category":"sve","source_file":"st1w_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe540a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_z_p_ai_s","instruction_id":"st1w_z_p_ai","mnemonic":"ST1W","category":"sve","source_file":"st1w_z_p_ai.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe560a000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_z_p_bi_","instruction_id":"st1w_z_p_bi","mnemonic":"ST1W","category":"sve","source_file":"st1w_z_p_bi.xml","encoding_mask":"0xffd0e000","encoding_value":"0xe540e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
@@ -5989,7 +5989,7 @@
|
||||
{"id":"st1w_z_p_bz_d_x32_unscaled","instruction_id":"st1w_z_p_bz","mnemonic":"ST1W","category":"sve","source_file":"st1w_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe5008000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_z_p_bz_s_x32_scaled","instruction_id":"st1w_z_p_bz","mnemonic":"ST1W","category":"sve","source_file":"st1w_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe5608000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_z_p_bz_s_x32_unscaled","instruction_id":"st1w_z_p_bz","mnemonic":"ST1W","category":"sve","source_file":"st1w_z_p_bz.xml","encoding_mask":"0xffe0a000","encoding_value":"0xe5408000","features":[{"feature":"FEAT_SVE","name":"v8Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_za_p_rrr_","instruction_id":"st1w_za_p_rrr","mnemonic":"ST1W","category":"sme","source_file":"st1w_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0a00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st1w_za_p_rrr_","instruction_id":"st1w_za_p_rrr","mnemonic":"ST1W","category":"sme","source_file":"st1w_za_p_rrr.xml","encoding_mask":"0xffe00010","encoding_value":"0xe0a00000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"st2b_z_p_bi_contiguous","instruction_id":"st2b_z_p_bi","mnemonic":"ST2B","category":"sve","source_file":"st2b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xe430e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st2b_z_p_br_contiguous","instruction_id":"st2b_z_p_br","mnemonic":"ST2B","category":"sve","source_file":"st2b_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe4206000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"st2d_z_p_bi_contiguous","instruction_id":"st2d_z_p_bi","mnemonic":"ST2D","category":"sve","source_file":"st2d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xe5b0e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
@@ -6026,10 +6026,10 @@
|
||||
{"id":"stnt1b_mz_p_bi_4","instruction_id":"stnt1b_mz_p_bi","mnemonic":"STNT1B","category":"sve","source_file":"stnt1b_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa0608001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_mz_p_br_2","instruction_id":"stnt1b_mz_p_br","mnemonic":"STNT1B","category":"sve","source_file":"stnt1b_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0200001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_mz_p_br_4","instruction_id":"stnt1b_mz_p_br","mnemonic":"STNT1B","category":"sve","source_file":"stnt1b_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa0208001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_mzx_p_bi_2x8","instruction_id":"stnt1b_mzx_p_bi","mnemonic":"STNT1B","category":"sme","source_file":"stnt1b_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1600008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_mzx_p_bi_4x4","instruction_id":"stnt1b_mzx_p_bi","mnemonic":"STNT1B","category":"sme","source_file":"stnt1b_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa1608008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_mzx_p_br_2x8","instruction_id":"stnt1b_mzx_p_br","mnemonic":"STNT1B","category":"sme","source_file":"stnt1b_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1200008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_mzx_p_br_4x4","instruction_id":"stnt1b_mzx_p_br","mnemonic":"STNT1B","category":"sme","source_file":"stnt1b_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa1208008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_mzx_p_bi_2x8","instruction_id":"stnt1b_mzx_p_bi","mnemonic":"STNT1B","category":"sme","source_file":"stnt1b_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1600008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1b_mzx_p_bi_4x4","instruction_id":"stnt1b_mzx_p_bi","mnemonic":"STNT1B","category":"sme","source_file":"stnt1b_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa1608008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1b_mzx_p_br_2x8","instruction_id":"stnt1b_mzx_p_br","mnemonic":"STNT1B","category":"sme","source_file":"stnt1b_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1200008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1b_mzx_p_br_4x4","instruction_id":"stnt1b_mzx_p_br","mnemonic":"STNT1B","category":"sme","source_file":"stnt1b_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa1208008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1b_z_p_ar_d_64_unscaled","instruction_id":"stnt1b_z_p_ar","mnemonic":"STNT1B","category":"sve","source_file":"stnt1b_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe4002000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_z_p_ar_s_x32_unscaled","instruction_id":"stnt1b_z_p_ar","mnemonic":"STNT1B","category":"sve","source_file":"stnt1b_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe4402000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1b_z_p_bi_contiguous","instruction_id":"stnt1b_z_p_bi","mnemonic":"STNT1B","category":"sve","source_file":"stnt1b_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xe410e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
@@ -6038,10 +6038,10 @@
|
||||
{"id":"stnt1d_mz_p_bi_4","instruction_id":"stnt1d_mz_p_bi","mnemonic":"STNT1D","category":"sve","source_file":"stnt1d_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa060e001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_mz_p_br_2","instruction_id":"stnt1d_mz_p_br","mnemonic":"STNT1D","category":"sve","source_file":"stnt1d_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0206001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_mz_p_br_4","instruction_id":"stnt1d_mz_p_br","mnemonic":"STNT1D","category":"sve","source_file":"stnt1d_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa020e001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_mzx_p_bi_2x8","instruction_id":"stnt1d_mzx_p_bi","mnemonic":"STNT1D","category":"sme","source_file":"stnt1d_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1606008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_mzx_p_bi_4x4","instruction_id":"stnt1d_mzx_p_bi","mnemonic":"STNT1D","category":"sme","source_file":"stnt1d_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160e008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_mzx_p_br_2x8","instruction_id":"stnt1d_mzx_p_br","mnemonic":"STNT1D","category":"sme","source_file":"stnt1d_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1206008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_mzx_p_br_4x4","instruction_id":"stnt1d_mzx_p_br","mnemonic":"STNT1D","category":"sme","source_file":"stnt1d_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120e008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_mzx_p_bi_2x8","instruction_id":"stnt1d_mzx_p_bi","mnemonic":"STNT1D","category":"sme","source_file":"stnt1d_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1606008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1d_mzx_p_bi_4x4","instruction_id":"stnt1d_mzx_p_bi","mnemonic":"STNT1D","category":"sme","source_file":"stnt1d_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160e008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1d_mzx_p_br_2x8","instruction_id":"stnt1d_mzx_p_br","mnemonic":"STNT1D","category":"sme","source_file":"stnt1d_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1206008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1d_mzx_p_br_4x4","instruction_id":"stnt1d_mzx_p_br","mnemonic":"STNT1D","category":"sme","source_file":"stnt1d_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120e008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1d_z_p_ar_d_64_unscaled","instruction_id":"stnt1d_z_p_ar","mnemonic":"STNT1D","category":"sve","source_file":"stnt1d_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe5802000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_z_p_bi_contiguous","instruction_id":"stnt1d_z_p_bi","mnemonic":"STNT1D","category":"sve","source_file":"stnt1d_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xe590e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1d_z_p_br_contiguous","instruction_id":"stnt1d_z_p_br","mnemonic":"STNT1D","category":"sve","source_file":"stnt1d_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe5806000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
@@ -6049,10 +6049,10 @@
|
||||
{"id":"stnt1h_mz_p_bi_4","instruction_id":"stnt1h_mz_p_bi","mnemonic":"STNT1H","category":"sve","source_file":"stnt1h_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa060a001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_mz_p_br_2","instruction_id":"stnt1h_mz_p_br","mnemonic":"STNT1H","category":"sve","source_file":"stnt1h_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0202001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_mz_p_br_4","instruction_id":"stnt1h_mz_p_br","mnemonic":"STNT1H","category":"sve","source_file":"stnt1h_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa020a001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_mzx_p_bi_2x8","instruction_id":"stnt1h_mzx_p_bi","mnemonic":"STNT1H","category":"sme","source_file":"stnt1h_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1602008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_mzx_p_bi_4x4","instruction_id":"stnt1h_mzx_p_bi","mnemonic":"STNT1H","category":"sme","source_file":"stnt1h_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160a008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_mzx_p_br_2x8","instruction_id":"stnt1h_mzx_p_br","mnemonic":"STNT1H","category":"sme","source_file":"stnt1h_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1202008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_mzx_p_br_4x4","instruction_id":"stnt1h_mzx_p_br","mnemonic":"STNT1H","category":"sme","source_file":"stnt1h_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120a008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_mzx_p_bi_2x8","instruction_id":"stnt1h_mzx_p_bi","mnemonic":"STNT1H","category":"sme","source_file":"stnt1h_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1602008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1h_mzx_p_bi_4x4","instruction_id":"stnt1h_mzx_p_bi","mnemonic":"STNT1H","category":"sme","source_file":"stnt1h_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160a008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1h_mzx_p_br_2x8","instruction_id":"stnt1h_mzx_p_br","mnemonic":"STNT1H","category":"sme","source_file":"stnt1h_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1202008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1h_mzx_p_br_4x4","instruction_id":"stnt1h_mzx_p_br","mnemonic":"STNT1H","category":"sme","source_file":"stnt1h_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120a008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1h_z_p_ar_d_64_unscaled","instruction_id":"stnt1h_z_p_ar","mnemonic":"STNT1H","category":"sve","source_file":"stnt1h_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe4802000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_z_p_ar_s_x32_unscaled","instruction_id":"stnt1h_z_p_ar","mnemonic":"STNT1H","category":"sve","source_file":"stnt1h_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe4c02000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1h_z_p_bi_contiguous","instruction_id":"stnt1h_z_p_bi","mnemonic":"STNT1H","category":"sve","source_file":"stnt1h_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xe490e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
@@ -6061,18 +6061,18 @@
|
||||
{"id":"stnt1w_mz_p_bi_4","instruction_id":"stnt1w_mz_p_bi","mnemonic":"STNT1W","category":"sve","source_file":"stnt1w_mz_p_bi.xml","encoding_mask":"0xfff0e003","encoding_value":"0xa060c001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_mz_p_br_2","instruction_id":"stnt1w_mz_p_br","mnemonic":"STNT1W","category":"sve","source_file":"stnt1w_mz_p_br.xml","encoding_mask":"0xffe0e001","encoding_value":"0xa0204001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_mz_p_br_4","instruction_id":"stnt1w_mz_p_br","mnemonic":"STNT1W","category":"sve","source_file":"stnt1w_mz_p_br.xml","encoding_mask":"0xffe0e003","encoding_value":"0xa020c001","features":[{"feature":"FEAT_SME2 || FEAT_SVE2p1","name":"v9Ap3 || v9Ap4"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_mzx_p_bi_2x8","instruction_id":"stnt1w_mzx_p_bi","mnemonic":"STNT1W","category":"sme","source_file":"stnt1w_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1604008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_mzx_p_bi_4x4","instruction_id":"stnt1w_mzx_p_bi","mnemonic":"STNT1W","category":"sme","source_file":"stnt1w_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160c008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_mzx_p_br_2x8","instruction_id":"stnt1w_mzx_p_br","mnemonic":"STNT1W","category":"sme","source_file":"stnt1w_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1204008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_mzx_p_br_4x4","instruction_id":"stnt1w_mzx_p_br","mnemonic":"STNT1W","category":"sme","source_file":"stnt1w_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120c008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_mzx_p_bi_2x8","instruction_id":"stnt1w_mzx_p_bi","mnemonic":"STNT1W","category":"sme","source_file":"stnt1w_mzx_p_bi.xml","encoding_mask":"0xfff0e008","encoding_value":"0xa1604008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1w_mzx_p_bi_4x4","instruction_id":"stnt1w_mzx_p_bi","mnemonic":"STNT1W","category":"sme","source_file":"stnt1w_mzx_p_bi.xml","encoding_mask":"0xfff0e00c","encoding_value":"0xa160c008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1w_mzx_p_br_2x8","instruction_id":"stnt1w_mzx_p_br","mnemonic":"STNT1W","category":"sme","source_file":"stnt1w_mzx_p_br.xml","encoding_mask":"0xffe0e008","encoding_value":"0xa1204008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1w_mzx_p_br_4x4","instruction_id":"stnt1w_mzx_p_br","mnemonic":"STNT1W","category":"sme","source_file":"stnt1w_mzx_p_br.xml","encoding_mask":"0xffe0e00c","encoding_value":"0xa120c008","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"stnt1w_z_p_ar_d_64_unscaled","instruction_id":"stnt1w_z_p_ar","mnemonic":"STNT1W","category":"sve","source_file":"stnt1w_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe5002000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_z_p_ar_s_x32_unscaled","instruction_id":"stnt1w_z_p_ar","mnemonic":"STNT1W","category":"sve","source_file":"stnt1w_z_p_ar.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe5402000","features":[{"feature":"FEAT_SVE2","name":"v9Ap0"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_z_p_bi_contiguous","instruction_id":"stnt1w_z_p_bi","mnemonic":"STNT1W","category":"sve","source_file":"stnt1w_z_p_bi.xml","encoding_mask":"0xfff0e000","encoding_value":"0xe510e000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"stnt1w_z_p_br_contiguous","instruction_id":"stnt1w_z_p_br","mnemonic":"STNT1W","category":"sve","source_file":"stnt1w_z_p_br.xml","encoding_mask":"0xffe0e000","encoding_value":"0xe5006000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"str_p_bi_","instruction_id":"str_p_bi","mnemonic":"STR","category":"sve","source_file":"str_p_bi.xml","encoding_mask":"0xffc0e010","encoding_value":"0xe5800000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"str_z_bi_","instruction_id":"str_z_bi","mnemonic":"STR","category":"sve","source_file":"str_z_bi.xml","encoding_mask":"0xffc0e000","encoding_value":"0xe5804000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"str_za_ri_","instruction_id":"str_za_ri","mnemonic":"STR","category":"sme","source_file":"str_za_ri.xml","encoding_mask":"0xffff9c10","encoding_value":"0xe1200000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"str_zt_br_","instruction_id":"str_zt_br","mnemonic":"STR","category":"sme","source_file":"str_zt_br.xml","encoding_mask":"0xfffffc1f","encoding_value":"0xe13f8000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"unsupported","profiles":[]},
|
||||
{"id":"str_za_ri_","instruction_id":"str_za_ri","mnemonic":"STR","category":"sme","source_file":"str_za_ri.xml","encoding_mask":"0xffff9c10","encoding_value":"0xe1200000","features":[{"feature":"FEAT_SME","name":"v9Ap2 && PROFILE_A"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"str_zt_br_","instruction_id":"str_zt_br","mnemonic":"STR","category":"sme","source_file":"str_zt_br.xml","encoding_mask":"0xfffffc1f","encoding_value":"0xe13f8000","features":[{"feature":"FEAT_SME2","name":"v9Ap3"}],"status":"implemented","profiles":[{"profile":"sme-streaming-v2-sme2","status":"implemented","scope":"Complete allocated SME memory form at fixed SVL16/32/64/128/256 under explicit SME/SME2 profile. Streaming vector/tile access requires SM=1; whole ZA/ZT permits SM=0 with explicit mode and ZA=1. Selected compact/general mapping retains1150 verified-body identities and historical32 owned calls with corrected Q/fault boundaries. Six genuine C1 original controls and QEMU fault/RAM limitations remain bounded, with historical masks preserved. Declared software CPU, same actual identification Snapshot/control owner, domain/System/thread and Prepared execution loan, little-endian Normal-WB mapped RAM, effective MTE disabled and FixedSCA16 source atomicity. Source-dependent SP alignment/tag policy and actual host capability/quantity requirements remain checked. Real PE and once-only source-PC settlement remain outer-owner obligations. Original valid masks/control epochs remain attached; unobserved original FFR/FPMR are not inferred. No general non-streaming SVE, full guest exception delivery, captured Apple hardware/profile, application/process/macOS or application-performance claim."}]},
|
||||
{"id":"sub_z_p_zz_","instruction_id":"sub_z_p_zz","mnemonic":"SUB","category":"sve","source_file":"sub_z_p_zz.xml","encoding_mask":"0xff3fe000","encoding_value":"0x04010000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"apple-sme2-streaming-v1","status":"implemented","scope":"Declared SME2 guest execution profile, SME enabled and SM=1, power-of-two streaming vector length16..256 bytes; M4/M5 candidate membership only. All allocated element widths and register/immediate aliases; merging predicates select each element-leading bit. Updates exactly destination Z, preserving other Z/P, primary GPR/SP/NZCV/FPCR/FPSR, ZA/ZT0, SVCR and TPIDR2. Register-only operation has no guest RAM access. FFR/FPMR have no original observation credit. No general non-streaming SVE, Apple hardware conformance, production block/cache context entry, full guest exception delivery, application or macOS claim."}]},
|
||||
{"id":"sub_z_zi_","instruction_id":"sub_z_zi","mnemonic":"SUB","category":"sve","source_file":"sub_z_zi.xml","encoding_mask":"0xff3fc000","encoding_value":"0x2521c000","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"apple-sme2-streaming-v1","status":"implemented","scope":"Declared SME2 guest execution profile, SME enabled and SM=1, power-of-two streaming vector length16..256 bytes; M4/M5 candidate membership only. All allocated element widths and register/immediate aliases; merging predicates select each element-leading bit. Updates exactly destination Z, preserving other Z/P, primary GPR/SP/NZCV/FPCR/FPSR, ZA/ZT0, SVCR and TPIDR2. Register-only operation has no guest RAM access. FFR/FPMR have no original observation credit. No general non-streaming SVE, Apple hardware conformance, production block/cache context entry, full guest exception delivery, application or macOS claim."}]},
|
||||
{"id":"sub_z_zz_","instruction_id":"sub_z_zz","mnemonic":"SUB","category":"sve","source_file":"sub_z_zz.xml","encoding_mask":"0xff20fc00","encoding_value":"0x04200400","features":[{"feature":"FEAT_SVE || FEAT_SME","name":"(v8Ap2 && PROFILE_A) || (v9Ap2 && PROFILE_A)"}],"status":"implemented","profiles":[{"profile":"apple-sme2-streaming-v1","status":"implemented","scope":"Declared SME2 guest execution profile, SME enabled and SM=1, power-of-two streaming vector length16..256 bytes; M4/M5 candidate membership only. All allocated element widths and register/immediate aliases; merging predicates select each element-leading bit. Updates exactly destination Z, preserving other Z/P, primary GPR/SP/NZCV/FPCR/FPSR, ZA/ZT0, SVCR and TPIDR2. Register-only operation has no guest RAM access. FFR/FPMR have no original observation credit. No general non-streaming SVE, Apple hardware conformance, production block/cache context entry, full guest exception delivery, application or macOS claim."}]},
|
||||
|
||||
@@ -336,7 +336,21 @@
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/half_widening.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/integer.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/unsigned64.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/rounding.rs"
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/rounding.rs",
|
||||
"crates/stela-compiler/src/aarch64/scalable/execution.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_load.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_multi.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_store.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_structure.rs",
|
||||
"crates/stela-compiler/src/aarch64/sme/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_load.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_multi.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_store.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_structure.rs",
|
||||
"crates/stela-compiler/src/x86_64/sme/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sme/memory/za.rs"
|
||||
],
|
||||
"registry_version": "documented-a64-software-services-v1",
|
||||
"profile": {
|
||||
|
||||
@@ -336,7 +336,21 @@
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/half_widening.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/integer.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/unsigned64.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/rounding.rs"
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/rounding.rs",
|
||||
"crates/stela-compiler/src/aarch64/scalable/execution.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_load.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_multi.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_store.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_structure.rs",
|
||||
"crates/stela-compiler/src/aarch64/sme/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_load.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_multi.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_store.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_structure.rs",
|
||||
"crates/stela-compiler/src/x86_64/sme/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sme/memory/za.rs"
|
||||
],
|
||||
"registry_version": "apple-silicon-block-forms-v16",
|
||||
"profile": {
|
||||
|
||||
@@ -48408,6 +48408,20 @@
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/half_widening.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/integer.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/conversion/unsigned64.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/rounding.rs"
|
||||
"crates/stela-compiler/src/x86_64/sve/floating/rounding.rs",
|
||||
"crates/stela-compiler/src/aarch64/scalable/execution.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_load.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_multi.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_store.rs",
|
||||
"crates/stela-compiler/src/aarch64/sve/memory_structure.rs",
|
||||
"crates/stela-compiler/src/aarch64/sme/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_load.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_multi.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_store.rs",
|
||||
"crates/stela-compiler/src/x86_64/sve/memory_structure.rs",
|
||||
"crates/stela-compiler/src/x86_64/sme/memory.rs",
|
||||
"crates/stela-compiler/src/x86_64/sme/memory/za.rs"
|
||||
]
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user