# stage2: more arithmetic support · gitcafe/zig

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

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

Visibility: public

Requested revision: 79bc5891c1c4cde0592fe1b10b6c9a85914155cf

Requested commit: 79bc5891c1c4cde0592fe1b10b6c9a85914155cf

Commit: 79bc5891c1c4cde0592fe1b10b6c9a85914155cf

Tree: 92999a5e04df045c03d63e4d02e53ad796c70911

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: more arithmetic support

 * AIR: add `mod` instruction for modulus division
   - Implement for LLVM backend
 * Sema: implement `@mod`, `@rem`, and `%`.
 * Sema: fix comptime switch evaluation
 * Sema: implement comptime shift left
 * Sema: fix the logic inside analyzeArithmetic to handle all the
   nuances between the different mathematical operations.
   - Implement comptime wrapping operations

```

## Parents

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

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