Re[3]: [Gc] [libatomic_ops] Intel Compiler with gcc compatible mode

Ivan Maidanski ivmai at mail.ru
Fri Feb 19 09:16:53 PST 2010


I wrote today:
> Patrick MARLIER <patrick.marlier at unine.ch> wrote:
> > It seems that Intel 11.1+ has support for __sync_ primitive.
> > So maybe we can also do this in my previous patch:
> > 
> > - /* Intel Compiler in gcc compatible mode (but not support __sync_ 
> > primitive) */
> > + /* Intel Compiler in gcc compatible mode */
> > + #  if __INTEL_COMPILER > 1110
> > + #   define HAVE_GCC_ATOMIC_BUILTINS 1
> > + #  endif /* __INTEL_COMPILER */
> > 
> > Patrick Marlier

Ok. I did mostly as you want. See the 2nd patch.

> 
> 1. I'd prefer something like AO_USE_SYNC_CAS_BUILTIN instead of HAVE_GCC_ATOMIC_BUILTINS as we are talking about CAS only.
> 
> 2. Is it really worth adding to libatomics auto-detection of all possible compilers that have correctly working built-in CAS provided the supplied asm variant works for them fine (just to save a couple of CPU cycles?) - I'd prefer to auto-define that macro for GCC v4.2+ amd64 and check it in gcc/x86 and gcc/x86_64. (We could add more auto-detection in the next libatomics release.)
> 
> > 
> > Patrick MARLIER wrote:
> > > Since Intel Compiler (icc) is gcc compatible mode by default under 
> > > linux, libatomic_ops can use the gcc definition to support more 
> > > architecture.
> > > 
> > > Here a proposed patch.
> > > 
> > > Patrick Marlier.

Bye.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bdwgc-ivmai-233.diff
Type: application/octet-stream
Size: 3423 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20100219/97be3b4c/bdwgc-ivmai-233-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bdwgc-ivmai-232.diff
Type: application/octet-stream
Size: 3261 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20100219/97be3b4c/bdwgc-ivmai-232-0001.obj


More information about the Gc mailing list