]> Zhao Yanbai Git Server - minix.git/commitdiff
ARM: correctly store kernel_info_struct pointer
authorThomas Veerman <thomas@minix3.org>
Wed, 23 Jan 2013 13:56:48 +0000 (14:56 +0100)
committerThomas Veerman <thomas@minix3.org>
Fri, 25 Jan 2013 17:07:02 +0000 (17:07 +0000)
lib/libc/arch/arm/sys-minix/_ipc.S

index 352f33ce8099b5f8740e2fde6836c284a7996da4..74499d38cb095fba06977348f87dd7a7ad651650 100644 (file)
@@ -49,9 +49,8 @@ ENTRY(_minix_kernel_info_struct)
        mov     r0, #MINIX_KERNINFO /* kerninfo() */
        mov     r3, #IPCVEC  /* r3 determines the SVC type */
        svc     #0           /* trap to kernel */
-       pop     {r0}         /* r0 = return struct ptr */
-       ldr     r0, [r0]
-       mov     r0, r1
+       pop     {r2}         /* r2 = return struct ptr (was r0) */
+       str     r1, [r2]
        pop     {fp}
        bx      lr