From bfa7e2bd24c5f54d8f2a36b039538493ecaca2e3 Mon Sep 17 00:00:00 2001 From: Tormod Volden Date: Fri, 24 Apr 2015 13:08:48 +0200 Subject: [PATCH] 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 --- Kernel/lowlevel-6809.s | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- 2.34.1