# std: Fix version detection on x86 · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c5885f012a2d8785d505bb3ec03a8dfab99331d2)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c5885f012a2d8785d505bb3ec03a8dfab99331d2

Requested commit: c5885f012a2d8785d505bb3ec03a8dfab99331d2

Commit: c5885f012a2d8785d505bb3ec03a8dfab99331d2

Tree: 03a15a839b837feda0c82216fecc06ff981b2c35

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
std: Fix version detection on x86

Call xgetbv only if X{SAVE,RESTORE} and AVX are detected.

Closes #4670

```

## Parents

- [c25d9417d34fc7745ed50fdfe2984895657254d5](https://git.cafe/gitcafe/zig/commit/c25d9417d34fc7745ed50fdfe2984895657254d5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c5885f012a2d8785d505bb3ec03a8dfab99331d2?format=markdown)
