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/2] [powerpc] add 'volatile' to asm


* Paul A. Clarke:

> diff --git a/sysdeps/powerpc/fpu/fenv_libc.h b/sysdeps/powerpc/fpu/fenv_libc.h
> index f8dd1b7..f66bf24 100644
> --- a/sysdeps/powerpc/fpu/fenv_libc.h
> +++ b/sysdeps/powerpc/fpu/fenv_libc.h
> @@ -56,9 +56,9 @@ extern const fenv_t *__fe_mask_env (void) attribute_hidden;
>  #define relax_fenv_state() \
>  	do { \
>  	   if (GLRO(dl_hwcap) & PPC_FEATURE_HAS_DFP) \
> -	     asm (".machine push; .machine \"power6\"; " \
> +	     asm volatile (".machine push; .machine \"power6\"; " \
>  		  "mtfsfi 7,0,1; .machine pop"); \
> -	   asm ("mtfsfi 7,0"); \
> +	   asm volatile ("mtfsfi 7,0"); \
>  	} while(0)

I think this change is a no-op because asm statements without inputs and
outputs (“Basic Asm”) are implicitly volatile.  Are you adding these
just for consistency?

Thanks,
Florian


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