This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] PowerPC: Add the low level infrastructure for pthreads


On Fri, Nov 07, 2014 at 05:30:38PM -0200, Adhemerval Zanella wrote:
> +static __force_inline
> +unsigned int _tbegin (void)
> +{
> +  unsigned int ret;
> +  asm volatile (
> +    TBEGIN "\t\n"
> +    "mfcr   %0,128\t\n"
> +    "rlwinm %0,%0,3,1\t\n"
> +    "subfic %0,%0,1\t\n"
> +    : "=r" (ret) :: "cr0", "memory");
> +  return ret;
> +}

This needs a "xer" clobber because you use subfic (which sets XER[CA]).
Better is to not use subfic, but instead e.g. "xori %0,%0,1".


Segher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]