# codegen: fix padding calculation for error unions when lowering · gitcafe/zig

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

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

Visibility: public

Requested revision: 12cdb36c5ba1fd9dfa5985d36a2f5955528c2de7

Requested commit: 12cdb36c5ba1fd9dfa5985d36a2f5955528c2de7

Commit: 12cdb36c5ba1fd9dfa5985d36a2f5955528c2de7

Tree: b28b98a8c43ad1a81eeac26e2a07d7acbb38ebf9

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
codegen: fix padding calculation for error unions when lowering

* do not track `rdi` register before `call` inst, but instead freeze
  it from further use, until `call` has been realised
* pass more error union tests

```

## Parents

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

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