Import of InfoZIP

David Marston david at illudium.org.uk
Thu Dec 20 02:19:53 PST 2001


Peter Naulls wrote:

>In message <3C20FE5A.3020503 at illudium.org.uk>
>          David Marston <david at illudium.org.uk> wrote:
>
>>     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).
>
OK, I understand now.  I had a feeling I was probably missing something 
:-)  You're not
checking for the error condition when you call it in _syslib.s though 
are you?  Couldn't that be
potentially nasty?

D





More information about the gcc mailing list