Port-mips archive

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

Re: CVS commit: [matt-nb5-mips64] src/sys/arch/mips/mips




On Aug 24, 2009, at 9:09 AM, Jason Thorpe wrote:


On Aug 23, 2009, at 9:04 PM, Matt Thomas wrote:

Module Name:    src
Committed By:   matt
Date:           Mon Aug 24 04:04:53 UTC 2009

Modified Files:
        src/sys/arch/mips/mips [matt-nb5-mips64]: mipsX_subr.S

Log Message:
SyscallCall exception didn't save the temporaries which libc no longer likes.
So now it saves them.

This seems wrong... the syscall trap is like making a function call, so the temporaries should be expected to be clobbered. If the syscall stubs don't like this, they should make use of callee-saved registers.

What am I missing?

That the syscall needs the arguments and stack pointer unchanged from the start of syscall stub. Thus if the syscall needs to store things, it's limited t using the temporary registers. And MIPS NewABI makes the global pointer callee-saved so it has to be saved somewhere. And that place is a temporary register. If the trap nukes the temporaries, that would be bad.

Home | Main Index | Thread Index | Old Index