From: Florent Kermarrec Date: Mon, 22 Jun 2020 15:09:55 +0000 (+0200) Subject: cores/cpu/microwatt: revert setup stack and fix missing subi %r1,%r1,0x100 (thanks... X-Git-Tag: 24jan2021_ls180~166 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b2f9c244dd71d2896f2bfca9a61c91f49f0251e;p=litex.git cores/cpu/microwatt: revert setup stack and fix missing subi %r1,%r1,0x100 (thanks ozbenh). Tested with powerpc64le-buildroot-linux-gnu-gcc.br_real (Buildroot 2020.02-00011-g7ea8a52) 8.4.0. --- diff --git a/litex/soc/cores/cpu/microwatt/crt0.S b/litex/soc/cores/cpu/microwatt/crt0.S index 5fc295f1..cfd67017 100644 --- a/litex/soc/cores/cpu/microwatt/crt0.S +++ b/litex/soc/cores/cpu/microwatt/crt0.S @@ -76,10 +76,9 @@ _start: bdnz 0b 1: /* setup stack */ - LOAD_IMM64(%r1, _fstack - 0x100) - LOAD_IMM64(%r12, main) - mtctr %r12, - bctrl + ld %r1,_fstack@got(%r2) + subi %r1,%r1,0x100 + bl main b . #define EXCEPTION(nr) \