# riscv: big rewrite to use latest liveness · gitcafe/zig

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

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

Visibility: public

Requested revision: 6740c1f0849dd2615859e4d65df355087165e073

Requested commit: 6740c1f0849dd2615859e4d65df355087165e073

Commit: 6740c1f0849dd2615859e4d65df355087165e073

Tree: 71e28e23a53dea1dd6a882a2c737ed1ad3a3c14c

Author: David Rubin

Committer: David Rubin

## Message

```
riscv: big rewrite to use latest liveness

this one is even harder to document then the last large overhaul.

TLDR;
- split apart Emit.zig into an Emit.zig and a Lower.zig
- created seperate files for the encoding, and now adding a new instruction
is as simple as just adding it to a couple of switch statements and providing the encoding.
- relocs are handled in a more sane maner, and we have a clear defining boundary between
lea_symbol and load_symbol now.
- a lot of different abstractions for things like the stack, memory, registers, and others.
- we're using x86_64's FrameIndex now, which simplifies a lot of the tougher design process.
- a lot more that I don't have the energy to document. at this point, just read the commit itself :p

```

## Parents

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

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