# riscv: add \`allocReg\` helper, and clean up some comparing logic · gitcafe/zig

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

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

Visibility: public

Requested revision: 09b7aabe094c11d7e4772c2e0c67ec7c28672266

Requested commit: 09b7aabe094c11d7e4772c2e0c67ec7c28672266

Commit: 09b7aabe094c11d7e4772c2e0c67ec7c28672266

Tree: c17f8c036558cd0228866d9bd071ffbdd55065c4

Author: David Rubin

Committer: David Rubin

## Message

```
riscv: add `allocReg` helper, and clean up some comparing logic

- Added the basic framework for panicing with an overflow in `airAddWithOverflow`, but there is no check done yet.
- added the `cmp_lt`, `cmp_gte`, and `cmp_imm_eq` MIR instructions, and their respective functionality.

```

## Parents

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

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