This is the mail archive of the libc-alpha@sources.redhat.com 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] PPC32 cancellation support


Franz Sirl wrote:

> +# ifndef __ASSEMBLER__
> +extern int __local_multiple_threads attribute_hidden;
> +#  define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
> +# else
> +#  if !defined PIC
> +#   define SINGLE_THREAD_P						\
> +  lis 10,__local_multiple_threads@ha;					\
> +  lwz 10,__local_multiple_threads@l(10);				\
> +  cmpwi 10,0
> +#  else
> +#   if !defined HAVE_HIDDEN || !USE___THREAD
> +#    define SINGLE_THREAD_P						\
> +  mflr 9;								\
> +  bl _GLOBAL_OFFSET_TABLE_@local-4;					\
> +  mflr 10;								\
> +  mtlr 9;								\
> +  lwz 10,__local_multiple_threads@got(10);				\
> +  lwz 10,0(10);								\
> +  cmpwi 10,0
> +#   else
> +#    define SINGLE_THREAD_P						\
> +  mflr 9;								\
> +  bl _GLOBAL_OFFSET_TABLE_@local-4;					\
> +  mflr 10;								\
> +  mtlr 9;								\
> +  lwz 10,__local_multiple_threads@got(10);				\
> +  lwz 10,0(10);								\
> +  cmpwi 10,0
> +#   endif
> +#  endif
> +# endif

Do I mis something or are the two SINGLE_THREAD_P asm constructs identical?

-- 
--------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------


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