Import of InfoZIP

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

In message <3C20FE5A.3020503 at>
          David Marston <david at> 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


 Peter Naulls - peter at
 RISC OS Projects Initiative  -
 Java for RISC OS and ARM     -
 Debian Linux on RiscPCs      -

More information about the gcc mailing list