[Top] [All Lists]

Re: Build failure for R3000 DECstation

To: Jun Sun <>
Subject: Re: Build failure for R3000 DECstation
From: "Maciej W. Rozycki" <>
Date: Wed, 15 Nov 2000 21:31:41 +0100 (MET)
Cc: Harald Koerfgen <>,, Ralf Baechle <>
In-reply-to: <>
Organization: Technical University of Gdansk
Reply-to: "Maciej W. Rozycki" <>
On Wed, 15 Nov 2000, Jun Sun wrote:

> I did not doubt the non-zero value of k0.  I really doubted the
> approach: a userland primitive is based on non-documented,
> non-guarranteed kernel stack restoring code.  Once something changes in
> kernel, you will get really obscure bugs.

 We need not rely on a non-documented behaviour.  We may clobber k0
explicitly, e.g.:

#define RESTORE_SP_AND_RET                      \
                .set    push;                   \
                .set    noreorder;              \
                lw      k1, PT_EPC(sp);         \
                lw      sp, PT_R29(sp);         \
                nor     k0, zero, zero;         \
                jr      k1;                     \
                 rfe;                           \
                .set    pop


+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

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