Subject: Re: RFC: Change SWI number base?
To: Ben Harris <bjh21@netbsd.org>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm
Date: 01/04/2002 12:21:43
>
> str r3, [sp, #-4]!
> mov r3, r2
> mov r2, r1
> mov r1, r0
> mov r0, #SYS_foo
> swi SYS_syscall
> bcs __cerror
> mov pc, lr
Actually, a better code sequence would probably be
Sys_N:
ldr ip, =SYS_N
b __syscall_common
.pool
__syscall_common:
str r3, [sp, #-4]!
mov r3, r2
mov r2, r1
mov r1, r0
mov r0, ip
swi 0
add sp, sp, #4
movcc pc, lr
__cerror:
...