# riscv: un-cache the \`avl\` and \`vtype\` when returning from a function call · gitcafe/zig

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

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

Visibility: public

Requested revision: 9766b68c475438e24885dd75cf137d51e72ccfa3

Requested commit: 9766b68c475438e24885dd75cf137d51e72ccfa3

Commit: 9766b68c475438e24885dd75cf137d51e72ccfa3

Tree: 85096570a8f57a68f209c741c5960d7bfb036786

Author: David Rubin

Committer: David Rubin

## Message

```
riscv: un-cache the `avl` and `vtype` when returning from a function call

the csrs `avl` and `vtype` are considered caller-saved so it could have changed while inside of the function.
the easiest way to handle this is to just set the cached `vtype` and `avl` to null, so that the next time something
needs to set it, it'll emit an instruction instead of relying on a potentially invalid setting.

```

## Parents

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

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