linebender / linebender/fearless_simd

Weird x86 feature detection considerations

Open
#157 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
457
Forks
30
Avg merge
1d 10h
Merged PRs (30d)
25

Description

There was some previous discussion about doing feature detection via `cpuid` on x86, even in `no_std` builds. There might be some complications--nothing concrete here, but things I stumbled across and want to note here so I don't forger about them:

- [The CPUID instruction is not always available, and might segfault](https://github.com/rust-lang/rust/issues/60123)
- [Weird stuff relating to AVX2 on `x86_64-unknown-none`](https://github.com/rust-lang/rust/issues/117938)
- [XGETBV, which you're *supposed* to use to detect AVX2, is nondeterministic?](https://google.github.io/security-research/pocs/cpus/xgetbv/)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked Rust issues about CPUID availability and AVX2 on x86_64-unknown-none, then review the linked XGETBV security research. The issue does not name an entry point, test, or concrete acceptance criteria; progress would require defining safe feature-detection behavior for no_std x86 builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.