lowlevel-6809.s: ashlsi3 workaround
authorTormod Volden <debian.tormod@gmail.com>
Fri, 24 Apr 2015 11:08:48 +0000 (13:08 +0200)
committerAlan Cox <alan@linux.intel.com>
Fri, 24 Apr 2015 11:32:24 +0000 (12:32 +0100)
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 <debian.tormod@gmail.com>
Kernel/lowlevel-6809.s

index 2c1fbc3..899b20d 100644 (file)
@@ -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