[Top] [All Lists]

Re: Is r25 saved across syscalls?

To: "Maciej W. Rozycki" <>
Subject: Re: Is r25 saved across syscalls?
From: Ralf Baechle <>
Date: Tue, 11 Sep 2012 10:58:27 +0200
Cc: Rich Felker <>,
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
References: <> <> <> <>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Sep 11, 2012 at 01:29:52AM +0100, Maciej W. Rozycki wrote:

>  Relying on any call-clobbered registers, including $7 to be preserved 
> across a syscall is risky, to say the least, as this is not guaranteed by 
> the syscall ABI.  I do wonder however why we have these instructions to 
> save/restore $25 in SAVE_SOME/RESTORE_SOME.  This dates back to 2.4 at the 
> very least.
>  Ralf, any insights?

It dates back to the initial commit in 36ea5120 from March 27, 1998 for
2.1.90 when for the sake of better lmbench syscall latency numbers I had
introduced the concept of partial saving of a register frame.  I think it
should rather have been in SAVE_TEMP/RESTORE_TEMP instead.


<Prev in Thread] Current Thread [Next in Thread>