| To: | Rich Felker <dalias@aerifal.cx> |
|---|---|
| Subject: | Re: Is r25 saved across syscalls? |
| From: | Ralf Baechle <ralf@linux-mips.org> |
| Date: | Mon, 10 Sep 2012 19:08:30 +0200 |
| Cc: | linux-mips@linux-mips.org |
| In-reply-to: | <20120909193008.GA15157@brightrain.aerifal.cx> |
| List-archive: | <http://www.linux-mips.org/archives/linux-mips/> |
| List-help: | <mailto:ecartis@linux-mips.org?Subject=help> |
| List-id: | linux-mips <linux-mips.eddie.linux-mips.org> |
| List-owner: | <mailto:ralf@linux-mips.org> |
| List-post: | <mailto:linux-mips@linux-mips.org> |
| List-software: | Ecartis version 1.0.0 |
| List-subscribe: | <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips> |
| List-unsubscribe: | <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips> |
| References: | <20120909193008.GA15157@brightrain.aerifal.cx> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Sun, Sep 09, 2012 at 03:30:08PM -0400, Rich Felker wrote: > The kernel syscall entry/exit code seems to always save and restore > r25. Is this stable/documented behavior I can rely on? If there's a > reason it _needs_ to be preserved, knowing that would help convince me > it's safe to assume it will always be done. The intended usage is to > be able to make syscalls (where the syscall # is not a constant that > could be loaded with lwi) without a stack frame, as in "move $2,$25 ; > syscall". The basic design idea is that syscalls use a calling convention similar to subroutine calls. $25 is $t9, so a temp register which is callee saved. So if the kernel is saving $t9 and you've been relying on that, consider yourself lucky - there's not guarantee for that. Ralf |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH v2 0/3] MIPS: JZ4740: Move PWM driver to PWM framework, Lars-Peter Clausen |
|---|---|
| Next by Date: | Re: MIPS: Fix build error with modern GCC for non-Cavium., Ralf Baechle |
| Previous by Thread: | Is r25 saved across syscalls?, Rich Felker |
| Next by Thread: | Re: Is r25 saved across syscalls?, Rich Felker |
| Indexes: | [Date] [Thread] [Top] [All Lists] |