cores/cpu/microwatt: temporary revert crt0.S/setup stack.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 22 Jun 2020 09:36:19 +0000 (11:36 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 22 Jun 2020 09:36:19 +0000 (11:36 +0200)
lxsim --cpu-type=microwatt --cpu-variant=standard+ghdl no longer working otherwise.

litex/soc/cores/cpu/microwatt/crt0.S

index 0fc8868ef0c2269e4f4bcd978a61243c7b521d62..5fc295f1baa6f8f8840d1132b680674bf10f4bc5 100644 (file)
@@ -76,9 +76,11 @@ _start:
        bdnz    0b
 1:
        /* setup stack */
-       ld      %r1,_fstack@got(%r2)
-       bl      main
-       b       .
+       LOAD_IMM64(%r1, _fstack - 0x100)
+       LOAD_IMM64(%r12, main)
+       mtctr   %r12,
+       bctrl
+       b .
 
 #define EXCEPTION(nr)          \
        .=  nr;      \