[llvmlinux] [PATCH 1/2] [mips] Replace named register fix with an upstreamable version.

Daniel Sanders Daniel.Sanders at imgtec.com
Fri Jan 9 19:17:54 UTC 2015


Hi,

That's part of the patch I replaced. The previous version of the patch dropped the asm("...") and explicitly moved the register with inline assembly and a 'move' instruction.
The replacement patch is much smaller than the original and replaces a single named register local (for $28) with a named register global. The others turned out to be unnecessary after discussing it with Behan before Christmas.

To be clear, this patch applies to llvm-linux itself. Sorry, if I've caused any confusion.

> -----Original Message-----
> From: llvmlinux-bounces at lists.linuxfoundation.org [mailto:llvmlinux-
> bounces at lists.linuxfoundation.org] On Behalf Of Vinícius Tinti
> Sent: 09 January 2015 18:34
> To: Renato Golin
> Cc: Compiling the Linux Kernel with Clang/LLVM
> Subject: Re: [llvmlinux] [PATCH 1/2] [mips] Replace named register fix with an
> upstreamable version.
> 
> On Fri, Jan 9, 2015 at 4:09 PM, Renato Golin <renato.golin at linaro.org> wrote:
> > On 9 January 2015 at 18:04, Vinícius Tinti <viniciustinti at gmail.com> wrote:
> >> -     register unsigned long n asm("v0");
> >> -     register unsigned long r asm("v0");
> >> +     register unsigned long n;
> >> +     register unsigned long r;
> >>
> >> How can you guarantee that the compiler will honor the register placement?
> >
> > You can't, and it won't. Maybe that's the intention?
> >
> > cheers,
> > --renato
> 
> Strange, because in the past we have just done the inverse of this
> exactly code in ARM and get rid of __asmeq().
> 
> http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob;f=arch/arm/patches/regis
> ter_allocation_arm_psci.patch;h=aeda361116ae68bec070b06a6106a416684de
> 91f;hb=HEAD
> 
> --
> Simplicity is the ultimate sophistication
> _______________________________________________
> LLVMLinux mailing list
> LLVMLinux at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux


More information about the LLVMLinux mailing list