Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-06-11 Thread Sriraman Tallam
On Wed, Jun 6, 2012 at 6:52 AM, H.J. Lu wrote: > On Tue, Jun 5, 2012 at 3:00 PM, Sriraman Tallam wrote: >> Hi H.J., >> >> I am attaching a patch to add __cpu_indicator_init to the list of >> symbols to be versioned and exported in libgcc_s.so. Also, updating >> builtin_target.c test to explicitly

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-06-06 Thread H.J. Lu
On Tue, Jun 5, 2012 at 3:00 PM, Sriraman Tallam wrote: > Hi H.J., > > I am attaching a patch to add __cpu_indicator_init to the list of > symbols to be versioned and exported in libgcc_s.so. Also, updating > builtin_target.c test to explicitly do a CPUID and check if the > features are identified

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-06-05 Thread Sriraman Tallam
Hi H.J., I am attaching a patch to add __cpu_indicator_init to the list of symbols to be versioned and exported in libgcc_s.so. Also, updating builtin_target.c test to explicitly do a CPUID and check if the features are identified correctly like you had suggested earlier. Patch ok? * co

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-25 Thread Marc Glisse
On Wed, 25 Apr 2012, H.J. Lu wrote: You can download an AVX2 emulator (SDE) from http://software.intel.com/en-us/avx/ to test AVX2 binaries. Hello, not related to this specific patch, but do you have a dejagnu board description that you could share that enables running the compiler normal

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-25 Thread Sriraman Tallam
Patch committed. Thanks, -Sri. On Wed, Apr 25, 2012 at 4:52 PM, H.J. Lu wrote: > On Wed, Apr 25, 2012 at 4:38 PM, Sriraman Tallam wrote: >> Hi H.J, >> >>   Could you please review this patch for AVX2 check? >> >>        * config/i386/i386-cpuinfo.c (FEATURE_AVX2): New enum value. >>        (get

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-25 Thread H.J. Lu
On Wed, Apr 25, 2012 at 4:38 PM, Sriraman Tallam wrote: > Hi H.J, > >   Could you please review this patch for AVX2 check? > >        * config/i386/i386-cpuinfo.c (FEATURE_AVX2): New enum value. >        (get_available_features): New argument. Check for AVX2. >        (__cpu_indicator_init): Modif

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-25 Thread Sriraman Tallam
Hi H.J, Could you please review this patch for AVX2 check? * config/i386/i386-cpuinfo.c (FEATURE_AVX2): New enum value. (get_available_features): New argument. Check for AVX2. (__cpu_indicator_init): Modify call to get_available_features . * doc/extend.texi: Doc

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-25 Thread Sriraman Tallam
On Wed, Apr 25, 2012 at 2:28 PM, H.J. Lu wrote: > On Wed, Apr 25, 2012 at 2:25 PM, Sriraman Tallam wrote: >> On Tue, Apr 24, 2012 at 7:39 PM, H.J. Lu wrote: >>> On Tue, Apr 24, 2012 at 7:06 PM, Sriraman Tallam >>> wrote: On Tue, Apr 24, 2012 at 5:24 PM, H.J. Lu wrote: > On Tue, Apr 2

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-25 Thread H.J. Lu
On Wed, Apr 25, 2012 at 2:25 PM, Sriraman Tallam wrote: > On Tue, Apr 24, 2012 at 7:39 PM, H.J. Lu wrote: >> On Tue, Apr 24, 2012 at 7:06 PM, Sriraman Tallam wrote: >>> On Tue, Apr 24, 2012 at 5:24 PM, H.J. Lu wrote: On Tue, Apr 24, 2012 at 5:10 PM, Sriraman Tallam wrote: > Hi,

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-25 Thread Sriraman Tallam
On Tue, Apr 24, 2012 at 7:39 PM, H.J. Lu wrote: > On Tue, Apr 24, 2012 at 7:06 PM, Sriraman Tallam wrote: >> On Tue, Apr 24, 2012 at 5:24 PM, H.J. Lu wrote: >>> On Tue, Apr 24, 2012 at 5:10 PM, Sriraman Tallam >>> wrote: Hi,   Thanks for all the comments. I have made all the cha

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-24 Thread H.J. Lu
On Tue, Apr 24, 2012 at 7:06 PM, Sriraman Tallam wrote: > On Tue, Apr 24, 2012 at 5:24 PM, H.J. Lu wrote: >> On Tue, Apr 24, 2012 at 5:10 PM, Sriraman Tallam wrote: >>> Hi, >>> >>>   Thanks for all the comments. I have made all the changes as >>> mentioned and submiited the patch. Summary of cha

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-24 Thread Sriraman Tallam
On Tue, Apr 24, 2012 at 5:24 PM, H.J. Lu wrote: > On Tue, Apr 24, 2012 at 5:10 PM, Sriraman Tallam wrote: >> Hi, >> >>   Thanks for all the comments. I have made all the changes as >> mentioned and submiited the patch. Summary of changes made: >> >> * Add support for AVX >> * Fix documentation in

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-24 Thread H.J. Lu
On Tue, Apr 24, 2012 at 5:10 PM, Sriraman Tallam wrote: > Hi, > >   Thanks for all the comments. I have made all the changes as > mentioned and submiited the patch. Summary of changes made: > > * Add support for AVX > * Fix documentation in extend.texi > * Make it thread-safe according to H.J.'s c

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-24 Thread Sriraman Tallam
Hi, Thanks for all the comments. I have made all the changes as mentioned and submiited the patch. Summary of changes made: * Add support for AVX * Fix documentation in extend.texi * Make it thread-safe according to H.J.'s comments. I have attached the patch. Boot-strapped and checked for tes

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-23 Thread H.J. Lu
On Mon, Apr 23, 2012 at 1:43 PM, Sriraman Tallam wrote: > On Mon, Apr 23, 2012 at 12:16 PM, Uros Bizjak wrote: >> On Mon, Apr 23, 2012 at 6:59 PM, Sriraman Tallam wrote: >> > i386 maintainers -  Is this patch ok? Has the community reached the consensus on how this kind of func

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-23 Thread Sriraman Tallam
On Mon, Apr 23, 2012 at 12:16 PM, Uros Bizjak wrote: > On Mon, Apr 23, 2012 at 6:59 PM, Sriraman Tallam wrote: > i386 maintainers -  Is this patch ok? >>> >>> Has the community reached the consensus on how this kind of >>> functionality has to be implemented? I have followed the discussion a

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-23 Thread H.J. Lu
On Mon, Apr 23, 2012 at 9:59 AM, Sriraman Tallam wrote: > Hi, > > On Mon, Apr 23, 2012 at 1:19 AM, Uros Bizjak wrote: >> On Tue, Apr 3, 2012 at 9:47 PM, Sriraman Tallam wrote: >> >>> i386 maintainers -  Is this patch ok? >> >> Has the community reached the consensus on how this kind of >> functi

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-23 Thread Uros Bizjak
On Mon, Apr 23, 2012 at 6:59 PM, Sriraman Tallam wrote: >       * config/i386/i386.c (build_processor_features_struct): New function. >       (build_processor_model_struct): New function. >       (make_var_decl): New function. >       (get_field_from_struct): New function. >       (fold_builtin_t

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-23 Thread Uros Bizjak
On Mon, Apr 23, 2012 at 6:59 PM, Sriraman Tallam wrote: >>> i386 maintainers -  Is this patch ok? >> >> Has the community reached the consensus on how this kind of >> functionality has to be implemented? I have followed the discussion a >> bit, but IIRC, there was no clear decision. Without this

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-23 Thread Sriraman Tallam
On Mon, Apr 23, 2012 at 1:19 AM, Uros Bizjak wrote: > On Tue, Apr 3, 2012 at 9:47 PM, Sriraman Tallam wrote: > >> i386 maintainers -  Is this patch ok? > > Has the community reached the consensus on how this kind of > functionality has to be implemented? I have followed the discussion a > bit, bu

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-23 Thread Sriraman Tallam
Hi, On Mon, Apr 23, 2012 at 1:19 AM, Uros Bizjak wrote: > On Tue, Apr 3, 2012 at 9:47 PM, Sriraman Tallam wrote: > >> i386 maintainers -  Is this patch ok? > > Has the community reached the consensus on how this kind of > functionality has to be implemented? I have followed the discussion a > bi

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-23 Thread Uros Bizjak
On Tue, Apr 3, 2012 at 9:47 PM, Sriraman Tallam wrote: > i386 maintainers -  Is this patch ok? Has the community reached the consensus on how this kind of functionality has to be implemented? I have followed the discussion a bit, but IIRC, there was no clear decision. Without this decision, I am

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-18 Thread Sriraman Tallam
Ping. On Thu, Apr 12, 2012 at 4:14 PM, Sriraman Tallam wrote: > Ping. > > On Tue, Apr 3, 2012 at 12:47 PM, Sriraman Tallam wrote: >> Hi, >> >> i386 maintainers -  Is this patch ok? >> >> Thanks, >> -Sri. >> >> On Mon, Apr 2, 2012 at 5:48 PM, Sriraman Tallam wrote: >>> On Mon, Apr 2, 2012 at 5:3

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-12 Thread Sriraman Tallam
Ping. On Tue, Apr 3, 2012 at 12:47 PM, Sriraman Tallam wrote: > Hi, > > i386 maintainers -  Is this patch ok? > > Thanks, > -Sri. > > On Mon, Apr 2, 2012 at 5:48 PM, Sriraman Tallam wrote: >> On Mon, Apr 2, 2012 at 5:38 AM, Richard Guenther >> wrote: >>> On Sat, Mar 31, 2012 at 1:03 AM, Srirama

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-09 Thread Sriraman Tallam
On Sun, Apr 8, 2012 at 6:17 AM, Gerald Pfeifer wrote: > On Thu, 29 Mar 2012, Sriraman Tallam wrote: >> Hi, >> >>     I have made a new patch to only have two builtins : >> >> * __builtin_cpu_is ("") >> * __builtin_cpu_supports ("") >> >> apart from the cpu init builtin, __builtin_cpu_init. > > I d

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-08 Thread Gerald Pfeifer
On Thu, 29 Mar 2012, Sriraman Tallam wrote: > Hi, > > I have made a new patch to only have two builtins : > > * __builtin_cpu_is ("") > * __builtin_cpu_supports ("") > > apart from the cpu init builtin, __builtin_cpu_init. I don't see any .texi file as part of this change. Shouldn't this b

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-03 Thread Sriraman Tallam
Hi, i386 maintainers - Is this patch ok? Thanks, -Sri. On Mon, Apr 2, 2012 at 5:48 PM, Sriraman Tallam wrote: > On Mon, Apr 2, 2012 at 5:38 AM, Richard Guenther > wrote: >> On Sat, Mar 31, 2012 at 1:03 AM, Sriraman Tallam wrote: >>> On Fri, Mar 30, 2012 at 5:47 AM, Michael Matz wrote:

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-02 Thread Sriraman Tallam
On Mon, Apr 2, 2012 at 5:38 AM, Richard Guenther wrote: > On Sat, Mar 31, 2012 at 1:03 AM, Sriraman Tallam wrote: >> On Fri, Mar 30, 2012 at 5:47 AM, Michael Matz wrote: >>> Hi, >>> >>> On Thu, 29 Mar 2012, Sriraman Tallam wrote: >>> +struct __processor_model +{ +  /* Vendor. */ >

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-02 Thread Sriraman Tallam
On Mon, Apr 2, 2012 at 5:38 AM, Richard Guenther wrote: > On Sat, Mar 31, 2012 at 1:03 AM, Sriraman Tallam wrote: >> On Fri, Mar 30, 2012 at 5:47 AM, Michael Matz wrote: >>> Hi, >>> >>> On Thu, 29 Mar 2012, Sriraman Tallam wrote: >>> +struct __processor_model +{ +  /* Vendor. */ >

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-04-02 Thread Richard Guenther
On Sat, Mar 31, 2012 at 1:03 AM, Sriraman Tallam wrote: > On Fri, Mar 30, 2012 at 5:47 AM, Michael Matz wrote: >> Hi, >> >> On Thu, 29 Mar 2012, Sriraman Tallam wrote: >> >>> +struct __processor_model >>> +{ >>> +  /* Vendor. */ >>> +  unsigned int __cpu_is_amd : 1; >>> +  unsigned int __cpu_is_i

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-03-30 Thread Sriraman Tallam
On Fri, Mar 30, 2012 at 5:47 AM, Michael Matz wrote: > Hi, > > On Thu, 29 Mar 2012, Sriraman Tallam wrote: > >> +struct __processor_model >> +{ >> +  /* Vendor. */ >> +  unsigned int __cpu_is_amd : 1; >> +  unsigned int __cpu_is_intel : 1; >> +  /* CPU type. */ >> +  unsigned int __cpu_is_intel_at

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-03-30 Thread Michael Matz
Hi, On Thu, 29 Mar 2012, Sriraman Tallam wrote: > +struct __processor_model > +{ > + /* Vendor. */ > + unsigned int __cpu_is_amd : 1; > + unsigned int __cpu_is_intel : 1; > + /* CPU type. */ > + unsigned int __cpu_is_intel_atom : 1; > + unsigned int __cpu_is_intel_core2 : 1; > + unsigned i

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-03-29 Thread Sriraman Tallam
Subject:Support for Runtime CPU type detection via builtins Hi, I have uploaded a new patch to only have two builtins : * __builtin_cpu_is ("") * __builtin_cpu_supports ("") apart from the cpu init builtin, __builtin_cpu_init. List of CPU names : * "amd" * "intel" * "atom" * "core2" * "cor

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-03-12 Thread Richard Guenther
On Thu, Mar 8, 2012 at 9:35 PM, Xinliang David Li wrote: > On Wed, Mar 7, 2012 at 5:51 AM, Richard Guenther > wrote: >> On Wed, Mar 7, 2012 at 1:49 AM, Sriraman Tallam wrote: >>> Patch for CPU detection at run-time. >>> === >>> >>> Patch for CPU detection at run-t

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-03-08 Thread Xinliang David Li
On Wed, Mar 7, 2012 at 5:51 AM, Richard Guenther wrote: > On Wed, Mar 7, 2012 at 1:49 AM, Sriraman Tallam wrote: >> Patch for CPU detection at run-time. >> === >> >> Patch for CPU detection at run-time, to be used in dispatching of >> multi-versioned functions.   P

Re: Support for Runtime CPU type detection via builtins (issue5754058)

2012-03-07 Thread Richard Guenther
On Wed, Mar 7, 2012 at 1:49 AM, Sriraman Tallam wrote: > Patch for CPU detection at run-time. > === > > Patch for CPU detection at run-time, to be used in dispatching of > multi-versioned functions.   Please see this discussion: > http://gcc.gnu.org/ml/gcc-patches/2