summaryrefslogtreecommitdiff
path: root/include/stack.h
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-09-03 12:30:14 -0700
committerGitHub <noreply@github.com>2024-09-03 15:30:14 -0400
commit2152d1df2d38f71f3693d73a764c981e54031924 (patch)
tree9834f567e6b1622c056b09f1b57fa7b20c2d03e9 /include/stack.h
parent6f396e7cc8796b8a7f05661e2924f75257520457 (diff)
[ntsc-1.2] Import libleo from Decompollaborate/n64dd (#2104)
* Create stack.h for STACK/STACK_TOP * Import libleo from Decompollaborate/n64dd Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> * Use (unsigned) int when in mdebug * Apply suggestions from code review Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Use && in leocmdex.c * Use proper names for character tables, revert sNonKanjiIndices * Fix incorrect OSMesg casts * Use LEO_ERROR_GOOD even where docs say 0 Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Remove "Presumably" comment * Whitespace * Remove redundant (debug-only) returns --------- Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Diffstat (limited to 'include/stack.h')
-rw-r--r--include/stack.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/stack.h b/include/stack.h
new file mode 100644
index 000000000..231f0d061
--- /dev/null
+++ b/include/stack.h
@@ -0,0 +1,10 @@
+#ifndef STACK_H
+#define STACK_H
+
+#define STACK(stack, size) \
+ u64 stack[ALIGN8(size) / sizeof(u64)]
+
+#define STACK_TOP(stack) \
+ ((u8*)(stack) + sizeof(stack))
+
+#endif