Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: converting SWIs to pass swi number in a register.

Richard Earnshaw wrote:
> On Wed, 2008-07-02 at 22:41 -0700, Matt Thomas wrote:
>> On Jul 2, 2008, at 2:43 PM, Chris Gilbert wrote:
>>> This would allow a post 5.0 kernel to only need to look at the r12/ 
>>> ip to work out the SWI call.
>> I'm already doing that for the THUMB SWI where syscall # > 255.
>> One question is how do we know we are using ip?  Think binary
>> compat with older binaries...
> Use 0 in the SWI # field (as linux does).  You only need to look in the
> SWI field if you have a relevant COMPAT_.. enabled.

And if we find 0 look at the register?  I had hoped to cheat for now and
not do the kernel side change, just setup userland to do the right
thing, but that's just laziness on my part :)  But then the kernel work
is quite small really.

> Overall I think this would be a good move (with potential performance
> boost), but probably should be combined with a move to the AEABI as
> well...

That was something I suggested doing when we do a libc major (which is
expected when time_t becomes 64bit.)  I was hoping to sneak this in so
that come the release after 5.0 we can make use of this...

> BTW, AFAICT linux uses r7 for the syscall number, since Thumb finds it
> very hard to set up r12.

Yes it does, I was thinking about how to avoid stacking r7, and r12
doesn't normally need to be stacked.


Home | Main Index | Thread Index | Old Index