Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly document ABI #13

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
10 changes: 10 additions & 0 deletions docs/abi/stack-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Stack Layout
A function's stack frame under the ZDK ABI is laid out as follows, from the highest address to the lowest address:

| Name | Notes |
| ------------------ | ------------------------------------------------------------------------- |
| Parameters | For parameter order, see the [calling convention](calling-convention.md). |
| Return Address | |
| Old Locals Pointer | The caller's stack pointer, if the callee allocates space for locals. |
| Old Stack Pointer | The previous stack frame's stack pointer. |
| Locals | Local variables. |
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ nav:
- 'index.md'
- Development:
- 'development/compiler-debugging.md'
- 'calling-convention.md'
- ABI:
- 'abi/calling-convention.md'
- 'abi/stack-layout.md'

theme:
name: material
Expand Down