#[derive(Clone, Hash)]
pub struct Flags {
bytes: [u8; 4],
}
impl Flags {
#[allow(unused_variables)]
pub fn new(shared: &settings::Flags, builder: &Builder) -> Self {
let bvec = builder.state_for("x86");
let mut x86 = Self { bytes: [0; 4] };
debug_assert_eq!(bvec.len(), 2);
x86.bytes[0..2].copy_from_slice(&bvec);
if x86.has_avx() {
x86.bytes[2] |= 1 << 0;
}
if x86.has_avx() && x86.has_avx2() {
x86.bytes[2] |= 1 << 1;
}
if x86.has_avx512bitalg() {
x86.bytes[2] |= 1 << 2;
}
if x86.has_avx512dq() {
x86.bytes[2] |= 1 << 3;
}
if x86.has_avx512f() {
x86.bytes[2] |= 1 << 4;
}
if x86.has_avx512vbmi() {
x86.bytes[2] |= 1 << 5;
}
if x86.has_avx512vl() {
x86.bytes[2] |= 1 << 6;
}
if x86.has_bmi1() {
x86.bytes[2] |= 1 << 7;
}
if x86.has_bmi2() {
x86.bytes[3] |= 1 << 0;
}
if x86.has_avx() && x86.has_fma() {
x86.bytes[3] |= 1 << 1;
}
if x86.has_lzcnt() {
x86.bytes[3] |= 1 << 2;
}
if x86.has_popcnt() && x86.has_sse42() {
x86.bytes[3] |= 1 << 3;
}
if x86.has_sse41() {
x86.bytes[3] |= 1 << 4;
}
if x86.has_sse41() && x86.has_sse42() {
x86.bytes[3] |= 1 << 5;
}
if x86.has_ssse3() {
x86.bytes[3] |= 1 << 6;
}
x86
}
}
impl Flags {
pub fn iter(&self) -> impl Iterator<Item = Value> {
let mut bytes = [0; 2];
bytes.copy_from_slice(&self.bytes[0..2]);
DESCRIPTORS.iter().filter_map(move |d| {
let values = match &d.detail {
detail::Detail::Preset => return None,
detail::Detail::Enum { last, enumerators } => Some(TEMPLATE.enums(*last, *enumerators)),
_ => None
};
Some(Value{ name: d.name, detail: d.detail, values, value: bytes[d.offset as usize] })
})
}
}
#[allow(dead_code)]
impl Flags {
pub fn predicate_view(&self) -> crate::settings::PredicateView {
crate::settings::PredicateView::new(&self.bytes[0..])
}
fn numbered_predicate(&self, p: usize) -> bool {
self.bytes[0 + p / 8] & (1 << (p % 8)) != 0
}
pub fn has_sse3(&self) -> bool {
self.numbered_predicate(0)
}
pub fn has_ssse3(&self) -> bool {
self.numbered_predicate(1)
}
pub fn has_sse41(&self) -> bool {
self.numbered_predicate(2)
}
pub fn has_sse42(&self) -> bool {
self.numbered_predicate(3)
}
pub fn has_avx(&self) -> bool {
self.numbered_predicate(4)
}
pub fn has_avx2(&self) -> bool {
self.numbered_predicate(5)
}
pub fn has_fma(&self) -> bool {
self.numbered_predicate(6)
}
pub fn has_avx512bitalg(&self) -> bool {
self.numbered_predicate(7)
}
pub fn has_avx512dq(&self) -> bool {
self.numbered_predicate(8)
}
pub fn has_avx512vl(&self) -> bool {
self.numbered_predicate(9)
}
pub fn has_avx512vbmi(&self) -> bool {
self.numbered_predicate(10)
}
pub fn has_avx512f(&self) -> bool {
self.numbered_predicate(11)
}
pub fn has_popcnt(&self) -> bool {
self.numbered_predicate(12)
}
pub fn has_bmi1(&self) -> bool {
self.numbered_predicate(13)
}
pub fn has_bmi2(&self) -> bool {
self.numbered_predicate(14)
}
pub fn has_lzcnt(&self) -> bool {
self.numbered_predicate(15)
}
pub fn use_avx(&self) -> bool {
self.numbered_predicate(16)
}
pub fn use_avx2(&self) -> bool {
self.numbered_predicate(17)
}
pub fn use_avx512bitalg(&self) -> bool {
self.numbered_predicate(18)
}
pub fn use_avx512dq(&self) -> bool {
self.numbered_predicate(19)
}
pub fn use_avx512f(&self) -> bool {
self.numbered_predicate(20)
}
pub fn use_avx512vbmi(&self) -> bool {
self.numbered_predicate(21)
}
pub fn use_avx512vl(&self) -> bool {
self.numbered_predicate(22)
}
pub fn use_bmi1(&self) -> bool {
self.numbered_predicate(23)
}
pub fn use_bmi2(&self) -> bool {
self.numbered_predicate(24)
}
pub fn use_fma(&self) -> bool {
self.numbered_predicate(25)
}
pub fn use_lzcnt(&self) -> bool {
self.numbered_predicate(26)
}
pub fn use_popcnt(&self) -> bool {
self.numbered_predicate(27)
}
pub fn use_sse41(&self) -> bool {
self.numbered_predicate(28)
}
pub fn use_sse42(&self) -> bool {
self.numbered_predicate(29)
}
pub fn use_ssse3(&self) -> bool {
self.numbered_predicate(30)
}
}
static DESCRIPTORS: [detail::Descriptor; 83] = [
detail::Descriptor {
name: "has_sse3",
description: "Has support for SSE3.",
offset: 0,
detail: detail::Detail::Bool { bit: 0 },
},
detail::Descriptor {
name: "has_ssse3",
description: "Has support for SSSE3.",
offset: 0,
detail: detail::Detail::Bool { bit: 1 },
},
detail::Descriptor {
name: "has_sse41",
description: "Has support for SSE4.1.",
offset: 0,
detail: detail::Detail::Bool { bit: 2 },
},
detail::Descriptor {
name: "has_sse42",
description: "Has support for SSE4.2.",
offset: 0,
detail: detail::Detail::Bool { bit: 3 },
},
detail::Descriptor {
name: "has_avx",
description: "Has support for AVX.",
offset: 0,
detail: detail::Detail::Bool { bit: 4 },
},
detail::Descriptor {
name: "has_avx2",
description: "Has support for AVX2.",
offset: 0,
detail: detail::Detail::Bool { bit: 5 },
},
detail::Descriptor {
name: "has_fma",
description: "Has support for FMA.",
offset: 0,
detail: detail::Detail::Bool { bit: 6 },
},
detail::Descriptor {
name: "has_avx512bitalg",
description: "Has support for AVX512BITALG.",
offset: 0,
detail: detail::Detail::Bool { bit: 7 },
},
detail::Descriptor {
name: "has_avx512dq",
description: "Has support for AVX512DQ.",
offset: 1,
detail: detail::Detail::Bool { bit: 0 },
},
detail::Descriptor {
name: "has_avx512vl",
description: "Has support for AVX512VL.",
offset: 1,
detail: detail::Detail::Bool { bit: 1 },
},
detail::Descriptor {
name: "has_avx512vbmi",
description: "Has support for AVX512VMBI.",
offset: 1,
detail: detail::Detail::Bool { bit: 2 },
},
detail::Descriptor {
name: "has_avx512f",
description: "Has support for AVX512F.",
offset: 1,
detail: detail::Detail::Bool { bit: 3 },
},
detail::Descriptor {
name: "has_popcnt",
description: "Has support for POPCNT.",
offset: 1,
detail: detail::Detail::Bool { bit: 4 },
},
detail::Descriptor {
name: "has_bmi1",
description: "Has support for BMI1.",
offset: 1,
detail: detail::Detail::Bool { bit: 5 },
},
detail::Descriptor {
name: "has_bmi2",
description: "Has support for BMI2.",
offset: 1,
detail: detail::Detail::Bool { bit: 6 },
},
detail::Descriptor {
name: "has_lzcnt",
description: "Has support for LZCNT.",
offset: 1,
detail: detail::Detail::Bool { bit: 7 },
},
detail::Descriptor {
name: "sse3",
description: "SSE3 and earlier.",
offset: 0,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "ssse3",
description: "SSSE3 and earlier.",
offset: 2,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "sse41",
description: "SSE4.1 and earlier.",
offset: 4,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "sse42",
description: "SSE4.2 and earlier.",
offset: 6,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "baseline",
description: "A baseline preset with no extensions enabled.",
offset: 8,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "nocona",
description: "Nocona microarchitecture.",
offset: 10,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "core2",
description: "Core 2 microarchitecture.",
offset: 12,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "penryn",
description: "Penryn microarchitecture.",
offset: 14,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "atom",
description: "Atom microarchitecture.",
offset: 16,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "bonnell",
description: "Bonnell microarchitecture.",
offset: 18,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "silvermont",
description: "Silvermont microarchitecture.",
offset: 20,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "slm",
description: "Silvermont microarchitecture.",
offset: 22,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "goldmont",
description: "Goldmont microarchitecture.",
offset: 24,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "goldmont-plus",
description: "Goldmont Plus microarchitecture.",
offset: 26,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "tremont",
description: "Tremont microarchitecture.",
offset: 28,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "alderlake",
description: "Alderlake microarchitecture.",
offset: 30,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "sierraforest",
description: "Sierra Forest microarchitecture.",
offset: 32,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "grandridge",
description: "Grandridge microarchitecture.",
offset: 34,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "nehalem",
description: "Nehalem microarchitecture.",
offset: 36,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "corei7",
description: "Core i7 microarchitecture.",
offset: 38,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "westmere",
description: "Westmere microarchitecture.",
offset: 40,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "sandybridge",
description: "Sandy Bridge microarchitecture.",
offset: 42,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "corei7-avx",
description: "Core i7 AVX microarchitecture.",
offset: 44,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "ivybridge",
description: "Ivy Bridge microarchitecture.",
offset: 46,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "core-avx-i",
description: "Intel Core CPU with 64-bit extensions.",
offset: 48,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "haswell",
description: "Haswell microarchitecture.",
offset: 50,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "core-avx2",
description: "Intel Core CPU with AVX2 extensions.",
offset: 52,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "broadwell",
description: "Broadwell microarchitecture.",
offset: 54,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "skylake",
description: "Skylake microarchitecture.",
offset: 56,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "knl",
description: "Knights Landing microarchitecture.",
offset: 58,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "knm",
description: "Knights Mill microarchitecture.",
offset: 60,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "skylake-avx512",
description: "Skylake AVX512 microarchitecture.",
offset: 62,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "skx",
description: "Skylake AVX512 microarchitecture.",
offset: 64,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "cascadelake",
description: "Cascade Lake microarchitecture.",
offset: 66,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "cooperlake",
description: "Cooper Lake microarchitecture.",
offset: 68,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "cannonlake",
description: "Canon Lake microarchitecture.",
offset: 70,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "icelake-client",
description: "Ice Lake microarchitecture.",
offset: 72,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "icelake",
description: "Ice Lake microarchitecture",
offset: 74,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "icelake-server",
description: "Ice Lake (server) microarchitecture.",
offset: 76,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "tigerlake",
description: "Tiger Lake microarchitecture.",
offset: 78,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "sapphirerapids",
description: "Sapphire Rapids microarchitecture.",
offset: 80,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "raptorlake",
description: "Raptor Lake microarchitecture.",
offset: 82,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "meteorlake",
description: "Meteor Lake microarchitecture.",
offset: 84,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "graniterapids",
description: "Granite Rapids microarchitecture.",
offset: 86,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "opteron",
description: "Opteron microarchitecture.",
offset: 88,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "k8",
description: "K8 Hammer microarchitecture.",
offset: 90,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "athlon64",
description: "Athlon64 microarchitecture.",
offset: 92,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "athlon-fx",
description: "Athlon FX microarchitecture.",
offset: 94,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "opteron-sse3",
description: "Opteron microarchitecture with support for SSE3 instructions.",
offset: 96,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "k8-sse3",
description: "K8 Hammer microarchitecture with support for SSE3 instructions.",
offset: 98,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "athlon64-sse3",
description: "Athlon 64 microarchitecture with support for SSE3 instructions.",
offset: 100,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "barcelona",
description: "Barcelona microarchitecture.",
offset: 102,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "amdfam10",
description: "AMD Family 10h microarchitecture",
offset: 104,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "btver1",
description: "Bobcat microarchitecture.",
offset: 106,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "btver2",
description: "Jaguar microarchitecture.",
offset: 108,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "bdver1",
description: "Bulldozer microarchitecture",
offset: 110,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "bdver2",
description: "Piledriver microarchitecture.",
offset: 112,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "bdver3",
description: "Steamroller microarchitecture.",
offset: 114,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "bdver4",
description: "Excavator microarchitecture.",
offset: 116,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "znver1",
description: "Zen (first generation) microarchitecture.",
offset: 118,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "znver2",
description: "Zen (second generation) microarchitecture.",
offset: 120,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "znver3",
description: "Zen (third generation) microarchitecture.",
offset: 122,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "znver4",
description: "Zen (fourth generation) microarchitecture.",
offset: 124,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "x86-64",
description: "Generic x86-64 microarchitecture.",
offset: 126,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "x86-64-v2",
description: "Generic x86-64 (V2) microarchitecture.",
offset: 128,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "x84_64_v3",
description: "Generic x86_64 (V3) microarchitecture.",
offset: 130,
detail: detail::Detail::Preset,
},
detail::Descriptor {
name: "x86_64_v4",
description: "Generic x86_64 (V4) microarchitecture.",
offset: 132,
detail: detail::Detail::Preset,
},
];
static ENUMERATORS: [&str; 0] = [
];
static HASH_TABLE: [u16; 128] = [
0xffff,
0xffff,
77,
76,
75,
0xffff,
0xffff,
0xffff,
23,
78,
66,
80,
22,
50,
59,
14,
13,
29,
1,
41,
70,
67,
4,
35,
0xffff,
65,
5,
44,
21,
64,
15,
6,
47,
49,
24,
62,
0xffff,
11,
43,
38,
52,
0xffff,
0xffff,
69,
0xffff,
3,
31,
0xffff,
2,
0xffff,
0xffff,
58,
0xffff,
0xffff,
10,
12,
0xffff,
0xffff,
0xffff,
0xffff,
0xffff,
0xffff,
0xffff,
0xffff,
30,
79,
73,
0,
39,
28,
46,
45,
8,
54,
71,
9,
74,
72,
0xffff,
0xffff,
0xffff,
61,
81,
33,
7,
0xffff,
18,
19,
48,
16,
53,
60,
0xffff,
0xffff,
20,
0xffff,
63,
68,
56,
0xffff,
0xffff,
82,
0xffff,
26,
27,
0xffff,
34,
0xffff,
0xffff,
36,
0xffff,
0xffff,
40,
42,
0xffff,
32,
0xffff,
0xffff,
0xffff,
57,
51,
0xffff,
0xffff,
17,
55,
0xffff,
25,
37,
];
static PRESETS: [(u8, u8); 134] = [
(0b00000001, 0b00000001),
(0b00000000, 0b00000000),
(0b00000011, 0b00000011),
(0b00000000, 0b00000000),
(0b00000111, 0b00000111),
(0b00000000, 0b00000000),
(0b00001111, 0b00001111),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000001, 0b00000001),
(0b00000000, 0b00000000),
(0b00000001, 0b00000001),
(0b00000000, 0b00000000),
(0b00000111, 0b00000111),
(0b00000000, 0b00000000),
(0b00000011, 0b00000011),
(0b00000000, 0b00000000),
(0b00000011, 0b00000011),
(0b00000000, 0b00000000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b01001111, 0b01001111),
(0b11110000, 0b11110000),
(0b01001111, 0b01001111),
(0b11110000, 0b11110000),
(0b01001111, 0b01001111),
(0b11110000, 0b11110000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b00011111, 0b00011111),
(0b00010000, 0b00010000),
(0b00011111, 0b00011111),
(0b00010000, 0b00010000),
(0b00011111, 0b00011111),
(0b00010000, 0b00010000),
(0b00011111, 0b00011111),
(0b00010000, 0b00010000),
(0b01111111, 0b01111111),
(0b11110000, 0b11110000),
(0b01111111, 0b01111111),
(0b11110000, 0b11110000),
(0b01111111, 0b01111111),
(0b11110000, 0b11110000),
(0b01111111, 0b01111111),
(0b11110000, 0b11110000),
(0b01000000, 0b01000000),
(0b11111000, 0b11111000),
(0b01000000, 0b01000000),
(0b11111000, 0b11111000),
(0b01111111, 0b01111111),
(0b11111011, 0b11111011),
(0b01111111, 0b01111111),
(0b11111011, 0b11111011),
(0b01111111, 0b01111111),
(0b11111011, 0b11111011),
(0b01111111, 0b01111111),
(0b11111011, 0b11111011),
(0b01111111, 0b01111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b01001111, 0b01001111),
(0b11110000, 0b11110000),
(0b01001111, 0b01001111),
(0b11110000, 0b11110000),
(0b11111111, 0b11111111),
(0b11111111, 0b11111111),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00000001, 0b00000001),
(0b00000000, 0b00000000),
(0b00000001, 0b00000001),
(0b00000000, 0b00000000),
(0b00000001, 0b00000001),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b10010000, 0b10010000),
(0b00000000, 0b00000000),
(0b10010000, 0b10010000),
(0b00000011, 0b00000011),
(0b10010000, 0b10010000),
(0b00010011, 0b00010011),
(0b10110000, 0b10110000),
(0b00000011, 0b00000011),
(0b10010000, 0b10010000),
(0b00000011, 0b00000011),
(0b10110000, 0b10110000),
(0b00000011, 0b00000011),
(0b10110000, 0b10110000),
(0b00100011, 0b00100011),
(0b11110000, 0b11110000),
(0b01001111, 0b01001111),
(0b11110000, 0b11110000),
(0b01001111, 0b01001111),
(0b11110000, 0b11110000),
(0b01001111, 0b01001111),
(0b11110000, 0b11110000),
(0b11001111, 0b11001111),
(0b11111111, 0b11111111),
(0b00000000, 0b00000000),
(0b00000000, 0b00000000),
(0b00001111, 0b00001111),
(0b00010000, 0b00010000),
(0b01101111, 0b01101111),
(0b11110000, 0b11110000),
(0b01101111, 0b01101111),
(0b11110011, 0b11110011),
];
static TEMPLATE: detail::Template = detail::Template {
name: "x86",
descriptors: &DESCRIPTORS,
enumerators: &ENUMERATORS,
hash_table: &HASH_TABLE,
defaults: &[0x00, 0x00],
presets: &PRESETS,
};
pub fn builder() -> Builder {
Builder::new(&TEMPLATE)
}
impl fmt::Display for Flags {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
writeln!(f, "[x86]")?;
for d in &DESCRIPTORS {
if !d.detail.is_preset() {
write!(f, "{} = ", d.name)?;
TEMPLATE.format_toml_value(d.detail, self.bytes[d.offset as usize], f)?;
writeln!(f)?;
}
}
Ok(())
}
}