This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: About the prefetch


Yang_Jialin@emc.com 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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]