This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: volatile qualifier hurts single-threaded optimized case


Paolo Carlini wrote:

Benjamin Kosnik wrote:

#ifdef __arch64__
typedef long _Atomic_word;
#else
typedef int _Atomic_word;
#endif

I'm pretty sure: I scoped out the baseline files for what is exported. However, if there is an issue, I'll fix it up.

If __arch64__ is defined the signatures should be:


   _ZN9__gnu_cxx12__atomic_addEPVli
   _ZN9__gnu_cxx18__exchange_and_addEPVli

therefore we could use the usual:

    _ZN9__gnu_cxx12__atomic_addEPV[il]i
   _ZN9__gnu_cxx18__exchange_and_addEPV[il]i

Ah, in the meanwhile I tried to understand why the baseline for sparc uses ii also for sparc64 and testresults are fine: it seems from the documentation that *by default* the sparc back end always generates code for v7. Then the problem arises if the user starts generating code for v9 and passes -m64.


To be super-safe, I think we should "respect" the macro above and export also the long variant...

Paolo.


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