From 5b2f9c244dd71d2896f2bfca9a61c91f49f0251e Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 22 Jun 2020 17:09:55 +0200 Subject: [PATCH] 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. --- litex/soc/cores/cpu/microwatt/crt0.S | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) \ -- 2.30.2