# x64: merge general purpose with simd register into one bitset · gitcafe/zig

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

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

Visibility: public

Requested revision: 9e5c8cb008f75c2e570a0e48d5d014e936c103ca

Requested commit: 9e5c8cb008f75c2e570a0e48d5d014e936c103ca

Commit: 9e5c8cb008f75c2e570a0e48d5d014e936c103ca

Tree: af9bf9c8457a4137b1fc534e7eac8a0a4400b8ec

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
x64: merge general purpose with simd register into one bitset

This way, we do not have to tweak the `RegisterManager` to handle
multiple register types - we have one linear space instead. Additionally
we can use the bitset itself to separate the registers into overlapping
(the ones that are aliases of differing bitwidths) and nonoverlapping
classes (for example, AVX registers do not overlap general purpose
registers, thus they can be allocated simultaneously).

Another huge benefit of this simple approach is the fact that we can
still refer to *all* registers regardless of their class via enum
literals which makes the code so much more readable.

Finally, `RegisterLock` is universal across different register classes.

```

## Parents

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

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