Skip to content

Commit b0f5c7b

Browse files
committed
Add ID_AA64SMFR0_EL1
1 parent 1fc2abd commit b0f5c7b

File tree

2 files changed

+170
-0
lines changed

2 files changed

+170
-0
lines changed

src/registers.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ mod id_aa64mmfr4_el1;
109109
mod id_aa64pfr0_el1;
110110
mod id_aa64pfr1_el1;
111111
mod id_aa64pfr2_el1;
112+
mod id_aa64smfr0_el1;
112113
mod lr;
113114
mod mair_el1;
114115
mod mair_el2;
@@ -261,6 +262,7 @@ pub use id_aa64mmfr4_el1::ID_AA64MMFR4_EL1;
261262
pub use id_aa64pfr0_el1::ID_AA64PFR0_EL1;
262263
pub use id_aa64pfr1_el1::ID_AA64PFR1_EL1;
263264
pub use id_aa64pfr2_el1::ID_AA64PFR2_EL1;
265+
pub use id_aa64smfr0_el1::ID_AA64SMFR0_EL1;
264266
pub use lr::LR;
265267
pub use mair_el1::MAIR_EL1;
266268
pub use mair_el2::MAIR_EL2;

src/registers/id_aa64smfr0_el1.rs

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
// SPDX-License-Identifier: Apache-2.0 OR MIT
2+
//
3+
// Copyright (c) 2018-2026 by the author(s)
4+
//
5+
// Author(s):
6+
// - Callum Thomson <callumthom11@gmail.com>
7+
8+
//! SME Feature ID Register 0 - EL1
9+
10+
use tock_registers::interfaces::Readable;
11+
use tock_registers::register_bitfields;
12+
13+
pub struct Reg;
14+
15+
register_bitfields! {u64,
16+
pub ID_AA64SMFR0_EL1 [
17+
/// Support for Advanced SIMD and SVE instructions in Streaming SVE
18+
FA64 OFFSET(63) NUMBITS(1) [
19+
OnlyDefinedLegal = 0b0,
20+
AllLegal = 0b1,
21+
],
22+
23+
/// Support for additional SME2 lookup table instructions
24+
LUTv2 OFFSET(60) NUMBITS(1) [
25+
NotImplemented = 0b0,
26+
Implemented = 0b1,
27+
],
28+
29+
/// Support for SME instructions
30+
SMEver OFFSET(56) NUMBITS(4) [
31+
MandatorySME = 0b0000,
32+
UpToSME2 = 0b0001,
33+
UpToSME21 = 0b0010,
34+
UpToSME22 = 0b0011,
35+
],
36+
37+
/// Support for SME instructions that accumulate into 64-bit integer elements in the ZA array
38+
I16I64 OFFSET(52) NUMBITS(4) [
39+
NotImplemented = 0b0000,
40+
Implemented = 0b1111,
41+
],
42+
43+
/// Support for SME instructions that accumulate into double-precision floating-point elements in the ZA array
44+
F64F64 OFFSET(48) NUMBITS(1) [
45+
NotImplemented = 0b0,
46+
Implemented = 0b1,
47+
],
48+
49+
/// Support for SME2 `SMOPA`, `SMOPS`, `UMOPA` and `UMOPS`
50+
I16I32 OFFSET(44) NUMBITS(4) [
51+
NotImplemented = 0b0,
52+
Implemented = 0b1,
53+
],
54+
55+
/// Support for SME `BFADD`, `BFMLA`, `BFMLS`, `BFMOPA`, `BFMOPS` and `BFSUB`
56+
B16B16 OFFSET(43) NUMBITS(1) [
57+
NotImplemented = 0b0,
58+
Implemented = 0b1,
59+
],
60+
61+
/// Support for SME2 `FMOPA`, `FMOPS`, `FADD`, `FMLA`, `FMLS`, `FSUB`, `FCVT` and `FCVTL`
62+
F16F16 OFFSET(42) NUMBITS(1) [
63+
NotImplemented = 0b0,
64+
Implemented = 0b1,
65+
],
66+
67+
/// Support for the following SME2 instructions:
68+
/// ZA-targeting FP8 Instructions that accumulate into half-precision floating-point elements
69+
/// ZA-targeting non-widening half-precision `FADD` and `FSUB`
70+
F8F16 OFFSET(41) NUMBITS(1) [
71+
NotImplemented = 0b0,
72+
Implemented = 0b1,
73+
],
74+
75+
/// Support for SME instructions that accumulate into single-precision floating-point elements
76+
F8F32 OFFSET(40) NUMBITS(1) [
77+
NotImplemented = 0b0,
78+
Implemented = 0b1,
79+
],
80+
81+
/// Support for SME instructions that accumulate 8-bit outer products into 32-bit tiles
82+
I8I32 OFFSET(36) NUMBITS(4) [
83+
NotImplemented = 0b0,
84+
Implemented = 0b1,
85+
],
86+
87+
/// Support for SME `FMOPA` and `FMOPS`
88+
F16F32 OFFSET(35) NUMBITS(1) [
89+
NotImplemented = 0b0,
90+
Implemented = 0b1,
91+
],
92+
93+
/// Support for SME `BFMOPA` and `BFMOPS
94+
B16F32 OFFSET(34) NUMBITS(1) [
95+
NotImplemented = 0b0,
96+
Implemented = 0b1,
97+
],
98+
99+
/// Support for SME `BMOPA` and `BMOPS`
100+
BI32I32 OFFSET(33) NUMBITS(1) [
101+
NotImplemented = 0b0,
102+
Implemented = 0b1,
103+
],
104+
105+
/// Support for SME `FMOPA` and `FMOPS`
106+
F32F32 OFFSET(32) NUMBITS(1) [
107+
NotImplemented = 0b0,
108+
Implemented = 0b1,
109+
],
110+
111+
/// Support for the SVE2 FP8 to single-precision and half-precision multiply-accumulate instructions in Streaming SVE mode
112+
SF8FMA OFFSET(30) NUMBITS(1) [
113+
NoEffect = 0b0,
114+
Implemented = 0b1,
115+
],
116+
117+
/// Support for the SVE2 FP8 to single-precision 4-way dot product instruction in Streaming SVE mode
118+
SF8DP4 OFFSET(29) NUMBITS(1) [
119+
NoEffect = 0b0,
120+
Implemented = 0b1,
121+
],
122+
123+
/// Support for the SV2 FP8 to half-precision 2-way dot product instructions in Streaming SVE mode
124+
SF8DP2 OFFSET(28) NUMBITS(1) [
125+
NoEffect = 0b0,
126+
Implemented = 0b1,
127+
],
128+
129+
/// Support for SVE bit permute instructions in Streaming SVE mode
130+
SBitPerm OFFSET(25) NUMBITS(1) [
131+
NoEffect = 0b0,
132+
Implemented = 0b1,
133+
],
134+
135+
/// Support for SVE AES and 128-bit polynomial multiply long instructions in Streaming SVE mode
136+
AES OFFSET(24) NUMBITS(1) [
137+
NoEffect = 0b0,
138+
Supported = 0b1,
139+
],
140+
141+
/// Support for FEXPA in Streaming SVE mode
142+
SFEXPA OFFSET(23) NUMBITS(1) [
143+
NoEffect = 0b0,
144+
Supported = 0b1,
145+
],
146+
147+
/// Support for some SME Structured sparsity outer product instructions
148+
STMOP OFFSET(16) NUMBITS(1) [
149+
NotImplemented = 0b0,
150+
Implemented = 0b1,
151+
],
152+
153+
/// Support for some SME Quarter-time outer product instructions
154+
SMOP4 OFFSET(0) NUMBITS(1) [
155+
NotImplmented = 0b0,
156+
Implemented = 0b1,
157+
],
158+
]
159+
}
160+
161+
impl Readable for Reg {
162+
type T = u64;
163+
type R = ();
164+
165+
sys_coproc_read_raw!(u64, "ID_AA64SMFR0_EL1", "x");
166+
}
167+
168+
pub const ID_AA64SMFR0_EL1: Reg = Reg;

0 commit comments

Comments
 (0)