From: Tormod Volden Date: Fri, 24 Apr 2015 11:08:48 +0000 (+0200) Subject: lowlevel-6809.s: ashlsi3 workaround X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bfa7e2bd24c5f54d8f2a36b039538493ecaca2e3;p=FUZIX.git lowlevel-6809.s: ashlsi3 workaround When calling ashlsi3 (taken from the libgcc source) the arguments are not set up on the stack as the ashlsi3 code expects. It might be a bug in gcc-6809, but until we get this sorted out, use this little prologue to have the function work correctly. This was the last hurdle to get a relatively usable system going. Signed-off-by: Tormod Volden --- diff --git a/Kernel/lowlevel-6809.s b/Kernel/lowlevel-6809.s index 2c1fbc3b..899b20d8 100644 --- a/Kernel/lowlevel-6809.s +++ b/Kernel/lowlevel-6809.s @@ -552,6 +552,15 @@ _ashlhi3_2: ___ashlsi3: pshs u + + ; FIXME temporary hack until we fix gcc-6809 or our use of it + ; the argument passing doesn't match so we'll mangle it + ldu 4,s + stu ,x + ldu 6,s + stu 2,x + ldb 9,s + cmpb #16 blt try8 subb #16