public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Why is __i686 undefined for x86_64 -m32 (in mainline)
@ 2010-03-16 19:53 Paolo Carlini
  0 siblings, 0 replies; 21+ messages in thread
From: Paolo Carlini @ 2010-03-16 19:53 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org', H.J. Lu

Hi,

I'm rather surprised that now, in the "sane default world", only __i386
is defined, whereas __i686 is not on x86_64 -m32, I need -march=i686 on
the command line (together with -m32).

I noticed that while analyzing libstdc++/43394, where I was surprised
that some preprocessor lines, legacy code actually, in the library code
for parallel mode do not "notice" that we have now a better default:

#elif defined(__GNUC__) && defined(__i386) &&                   \
  (defined(__i686) || defined(__pentium4) || defined(__athlon))
    return __sync_fetch_and_add(__ptr, __addend);

... indeed, such lines want __i686 in order to safely enable the builtin
and still find it undefined.

If - as it's probably the case - I'm a bit confused about the meaning of
those __i?86 macros, what people suggest instead? I suspect my
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_* could be put to good use, still I'm
still curious about the exact semantics of the __i?86 macros...

Thanks in advance,
Paolo.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2010-03-16 23:11 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4B9FDCC1.2080201@oracle.com>
2010-03-16 20:00 ` Why is __i686 undefined for x86_64 -m32 (in mainline) H.J. Lu
2010-03-16 20:40   ` Paolo Carlini
2010-03-16 20:53     ` H.J. Lu
2010-03-16 20:58       ` Paolo Carlini
2010-03-16 21:03         ` Jakub Jelinek
2010-03-16 21:06           ` Paolo Carlini
2010-03-16 21:06             ` H.J. Lu
2010-03-16 21:08               ` H.J. Lu
2010-03-16 21:15           ` H.J. Lu
2010-03-16 21:21             ` Paolo Carlini
2010-03-16 21:31               ` H.J. Lu
2010-03-16 21:34                 ` Paolo Carlini
2010-03-16 21:36                   ` H.J. Lu
2010-03-16 22:27                     ` Paolo Carlini
2010-03-16 22:32                       ` H.J. Lu
2010-03-16 22:36                         ` Paolo Carlini
2010-03-16 22:39                           ` H.J. Lu
2010-03-16 22:57                             ` Paolo Carlini
2010-03-16 23:11                               ` H.J. Lu
2010-03-17  3:27                                 ` Paolo Carlini
2010-03-16 19:53 Paolo Carlini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).