Re: About the prefetch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yang_Jialin@xxxxxxx writes:

 > About the prefetch data of gcc, with optimization option "-O0", some gcc
 > versions have defined "prefetch" and ''prefetchw" function, whether with
 > operations or not.
 > But for other gcc versions , they have not been defined, e.g. 3.4 . I am
 > now confused about what version defines it and which not. Can you tell
 > me about this?

BUILT_IN_PREFETCH was added here:

r47582 | janis | 2001-12-04 00:50:35 +0000 (Tue, 04 Dec 2001) | 6 lines

        * builtin-types.def (BT_FN_VOID_PTR_INT_INT): New.
        * builtins.def (BUILT_IN_PREFETCH): New.
        * builtins.c (expand_builtin_expect): New.
          (expand_builtin): Call it.
        * doc/extend.texi: Document __builtin_expect.

So every version of gcc that branched since then has it.  That would
be, I think, 3.1 onwards.  

Whether __builtin_prefetc does anything or not depends on the
particular back end you're using.

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux