# x64: overhaul stack handling mechanics · gitcafe/zig

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

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

Visibility: public

Requested revision: 09d468b237e58dd70cfa0a4311efab5ddabc9f95

Requested commit: 09d468b237e58dd70cfa0a4311efab5ddabc9f95

Commit: 09d468b237e58dd70cfa0a4311efab5ddabc9f95

Tree: 47d75db266872db5e4c4cad0c95ee1a2ba51febe

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
x64: overhaul stack handling mechanics

Now, the abstracted stack offsets grow in the same direction as
the real stack values in hardware, and allocating stack memory is done
by the taking the last stack offset, adding required abi size
and aligning to the required abi align. Stack handling is now more
natural as it aligns itself with how it works in hardware; hence
stepping through the debugger and printing out different stack
values is intuitive. Finally, the stack pointers are now correctly
aligned to the required (and not necessarily natural) alignment.

```

## Parents

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

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