# stage2: clean up preserving callee regs on the stack · gitcafe/zig

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

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

Visibility: public

Requested revision: 4a5e75245bc60f76a82bb6bcb70553bec7d7c4f2

Requested commit: 4a5e75245bc60f76a82bb6bcb70553bec7d7c4f2

Commit: 4a5e75245bc60f76a82bb6bcb70553bec7d7c4f2

Tree: 82750d896591ef9737c8e86ec0d8f847d026b901

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
stage2: clean up preserving callee regs on the stack

Instead of using `push` and `pop` combo, we now re-use our stack
allocation mechanism which means we don't have to worry about
16-byte stack adjustments on macOS as it is handled automatically
for us. Another benefit is that we don't have to backpatch stack
offsets when pulling args from the stack.

```

## Parents

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

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