[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.21.2012111950290.2104409@eddie.linux-mips.org>
Date:   Fri, 11 Dec 2020 19:54:07 +0000 (GMT)
From:   "Maciej W. Rozycki" <macro@...ux-mips.org>
To:     Anders Roxell <anders.roxell@...aro.org>
cc:     tsbogend@...ha.franken.de, natechancellor@...il.com,
        ndesaulniers@...gle.com, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org, clang-built-linux@...glegroups.com
Subject: Re: [PATCH v2] mips: lib: uncached: fix non-standard usage of variable
 'sp'
On Fri, 11 Dec 2020, Anders Roxell wrote:
> diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c
> index 09d5deea747f..f80a67c092b6 100644
> --- a/arch/mips/lib/uncached.c
> +++ b/arch/mips/lib/uncached.c
> @@ -37,10 +37,12 @@
>   */
>  unsigned long run_uncached(void *func)
>  {
> -	register long sp __asm__("$sp");
>  	register long ret __asm__("$2");
>  	long lfunc = (long)func, ufunc;
>  	long usp;
> +	long sp;
> +
> +	__asm__("move %0, $sp" : "=r" (sp));
 I thought it might be better to make `sp' global instead, so that it's 
the compiler that chooses how to schedule accesses.  Have you tried that?
  Maciej
Powered by blists - more mailing lists
 
