pub enum SubArch {
None,
ArmV5Te,
ArmV6,
ArmV6M,
ArmV7A,
ArmV7R,
ArmV7M,
ArmV7Em,
ArmV8A,
ArmV8M,
}Expand description
A baseline within an architecture family.
This carries only the baselines that appear in the leading component of a tuple, which in
practice means the ARM ones. spec/cross-compile/03-target-model.md section 3.3 also lists micro
architecture levels such as x86-64-v3 and RISC-V profiles such as rva23u64 as
candidates for this field, and they are not here on purpose.
The reason is the rule that section states two paragraphs later: a thing belongs in the
tuple if it changes how a function is called or how a struct is laid out. Two objects built
for x86-64-v2 and x86-64-v3 link together and call each other correctly, so they are
the same target and a different -march. Two objects built for armv7a and armv6m are
not. Keeping levels out of the tuple is what keeps the tuple’s own invariant true, namely
that equal tuples means interchangeable objects, and that invariant is what lets a tuple be
a cache key. Levels and profiles arrive with the feature set in a later milestone.
Variants§
None
The family’s own baseline, and the only legal value for every family except ARM.
ArmV5Te
ARMv5TE, the floor for the older soft-float Linux ports.
ArmV6
ARMv6.
ArmV6M
ARMv6-M, the Cortex-M0 class. Thumb only.
ArmV7A
ARMv7-A, which is what almost every 32-bit Linux ARM target means.
ArmV7R
ARMv7-R, the real-time profile.
ArmV7M
ARMv7-M, the Cortex-M3 and M4 class. Thumb only.
ArmV7Em
ARMv7E-M.
ArmV8A
ARMv8-A in its 32-bit form.
ArmV8M
ARMv8-M baseline and mainline, folded into one value because the difference is a feature set rather than a different tuple.
Implementations§
Source§impl SubArch
impl SubArch
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The text this baseline contributes to the leading component, or the empty string.
Sourcepub const fn belongs_to(self, arch: Arch) -> bool
pub const fn belongs_to(self, arch: Arch) -> bool
Whether this baseline belongs to the given family.
Sourcepub const fn is_thumb_only(self) -> bool
pub const fn is_thumb_only(self) -> bool
Whether the baseline executes Thumb instructions only, which decides the default instruction set and, on the M profile, rules out the A profile’s float ABIs.