Set a default SP
authorLauri Kasanen <cand@gmx.com>
Fri, 28 May 2021 10:29:32 +0000 (13:29 +0300)
committerLauri Kasanen <cand@gmx.com>
Fri, 28 May 2021 10:29:32 +0000 (13:29 +0300)
main.c

diff --git a/main.c b/main.c
index 62a6fc7dc41a17c685e34b5dcf89127301156bf2..42890f62dc8b04c3c1fa5e65e3138139c7708d58 100644 (file)
--- a/main.c
+++ b/main.c
@@ -339,6 +339,7 @@ int main(int argc, char **argv) {
        regs.lr = -1;
        regs.pc = PROGSTART;
        regs.msr = MSR_64 | MSR_FP | MSR_LE;
+       regs.gpr[1] = 0x8000; // Default stack pointer at 32kb, 20kb free space before vecs
 
        while (1) {
                const int c = getopt_long(argc, argv, opts, longopts, NULL);