[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
converting SWIs to pass swi number in a register.
I was wondering if anyone had an opinion on switching to passing the SWI
number into syscall. I know Linux did this a while back.
I think it particularly makes sense for processors with seperate
instruction and data caches, as it save taking a data cache miss for
every SWI call.
Looking at the current code and our current ABI, I'm thinking we could
use ip (r12) to pass the SWI to the kernel, eg SYSTRAP becomes similar
#define SYSTRAP(x) \
mov r12, # ((SYS_ ## x) & 0xff) ;\
add r12, r12, #((SYS_ ## x) & 0xff00) ;\
swi SWI_OS_NETBSD | SYS_ ## x
Note I thinking we can probably a bit of tweaking to remove an
instruction count if the swi is < 256
This would allow a post 5.0 kernel to only need to look at the r12/ip to
work out the SWI call.
Main Index |
Thread Index |