Import of InfoZIP

Peter Naulls peter at chocky.org
Wed Dec 19 13:11:22 PST 2001


In message <3C20FE5A.3020503 at illudium.org.uk>
          David Marston <david at illudium.org.uk> wrote:

> Nick Burrett wrote:
> 
> >I have just completed installing Peter's patch.
> >
> A few lines seem to have ended up being included twice in the import,
> or it's my checkout (I tried twice to make sure).

Ah yes, so it is.

> I think there is also
> a typo in the return from RegisterUpCall if it fails to allocate the memory.
> Patch below:

>      MOV     r3, #12          
>      SWI     XOS_Module         ; Claim memory to use
>  
> -    LDMVSFD sp!, {r2, r3, lr}  ; Return to caller if error
> +    LDMVSFD sp!, {r0, r3, lr}  ; Return to caller if error

No, the point is to return the error from OS_Module, otherwise we're
just restoring the old r0, thereby trashing the error block pointer.
r2 was chosen as it modified anyway by the SWI (instead of using R1 for
example).

Peter

-- 
------------------------------------------------------------------------
 Peter Naulls - peter at chocky.org
 RISC OS Projects Initiative  -  http://www.chocky.org/initiative/
 Java for RISC OS and ARM     -  http://www.chocky.org/java/
 Debian Linux on RiscPCs      -  http://www.chocky.org/debian/
------------------------------------------------------------------------



More information about the gcc mailing list