# riscv: implement \`@abs\` · gitcafe/zig

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

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

Visibility: public

Requested revision: 28df64cba45595a201f8c2312656922a8c28a67c

Requested commit: 28df64cba45595a201f8c2312656922a8c28a67c

Commit: 28df64cba45595a201f8c2312656922a8c28a67c

Tree: 13679895113da1e2fa0199e1b117060bbed880cf

Author: David Rubin

Committer: David Rubin

## Message

```
riscv: implement `@abs`

- add the `abs` MIR instruction
- implement `@abs` by shifting to the right by `bits - 1`, and xoring.

```

## Parents

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

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