Skip to content

stdx 0.2.0

Latest

Choose a tag to compare

@c4milo c4milo released this 20 Nov 02:35
· 11 commits to main since this release

A MINOR release (decision 65): platform.Cpu gains two fields, and every encoder writes the octets 0.1.2 wrote.

Changes since 0.1.2

MINOR: two new fields of platform.Cpu (352fec3, decision 40)

pub const Midr = struct { implementer: u8, variant: u4, architecture: u4, part: u12, revision: u4 };
pub const Cpu = struct { ..., sha3: Answer, sve2: Answer, ..., vaes: Answer, midr: ?Midr };
  • sve2: whether the CPU has Arm's FEAT_SVE2. On aarch64 Linux it comes from AT_HWCAP2 bit 1 (HWCAP2_SVE2), and on macOS from hw.optional.arm.FEAT_SVE2, which macOS 26 does not define, so a Mac answers not_known. x86-64 answers no.
  • midr: the fields of MIDR_EL1 of the core where the probe ran. A caller tells a core by its implementer and part: Arm's Neoverse N2 is implementer 0x41, part 0xd49. On aarch64 Linux the probe runs mrs where AT_HWCAP has HWCAP_CPUID, and the kernel emulates the read, so the probe opens no file and makes no syscall. It is null on x86-64, on macOS, and on Linux without HWCAP_CPUID.
  • A caller that builds a Cpu literal itself must now name both fields.
  • On the hosted aarch64 runner, the probe and /proc/cpuinfo both read implementer 0x41, part 0xd49 and SVE2 (CI run 44650971945).

PATCH: the DEFLATE decoder

  • The decoder's x86-64 fast path copies three chunks before it branches on a plain match's length (7acc3c8). Design §8 holds its measurements.