Port-m68k archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: More toolchain issues



On Tue, 29 Sep 2009 12:17:52 +0200
Martin Husemann <martin%duskware.de@localhost> wrote:

> On Tue, Sep 29, 2009 at 12:01:57PM +0200, Frank Wille wrote:
> > [..CERROR trashes a0..]
> > Indeed. What can we do about that?
> 
> Use a "this call returns a pointer" variant of _CERROR?

Possibly. But I doubt that it's worth the effort. You would have to create
a new SYSCALL-macro with calls _CERRORPTR instead of _CERROR, and determine
all the syscalls which actually return a pointer.

I would suggest to change src/lib/libc/arch/m68k/sys/cerror.S like that:

--- cerror.S.orig       2009-09-29 13:52:31.000000000 +0200
+++ cerror.S    2009-09-29 13:53:44.000000000 +0200
@@ -79,5 +79,6 @@
 #endif
 #endif /* _REENTRANT */
        movl    #-1,%d0
+       movl    %d0,%a0
        movl    #-1,%d1
        rts

But maybe I'm missing something?

-- 
Frank Wille


Home | Main Index | Thread Index | Old Index