[PATCH][X86] Add Clang support for intrinsics __rdtsc and __rdtscp.

Reid Kleckner rnk at google.com
Thu Apr 24 11:38:45 PDT 2014


We can remove them.  intrin.h pulls in ia32intrin.h.


On Thu, Apr 24, 2014 at 11:35 AM, Hans Wennborg <hans at chromium.org> wrote:

> Should lib/Headers/Intrin.h be updated in some way? I guess both rdtsc
> and rdtscp should be marked inline now, or maybe they should simply be
> removed from Intrin.h?
>
>  - Hans
>
> On Thu, Apr 24, 2014 at 11:26 AM, Reid Kleckner <rnk at google.com> wrote:
> > LGTM
> >
> >
> > On Thu, Apr 24, 2014 at 11:20 AM, Andrea Di Biagio
> > <andrea.dibiagio at gmail.com> wrote:
> >>
> >> Hi,
> >>
> >> This patch:
> >> 1. adds a definition for two new Builtinsx86:
> >>   __builtin_ia32_rdtsc;
> >>   __builtin_ia32_rdtscp.
> >>
> >> 2. Replaces the already existing definition of intrinsics __rdtsc in
> >> ia32intrin.h with a simple call to the new GCC builtin
> >> '__builtin_ia32_rdtsc()'.
> >>
> >> 3. Adds a definition for the new intrinsic __rdtscp in ia32intrin.h.
> >>
> >> LLVM revision 207127 (
> >> http://llvm.org/viewvc/llvm-project?view=revision&revision=207127)
> >> added the two new x86 builtin intrinsics to the IR.
> >> This patch is simply adding the support for the two new intrinsics to
> >> Clang.
> >>
> >> Please let me know if ok to submit.
> >>
> >> Thanks,
> >> Andrea Di Biagio
> >> SN Systems - Sony Computer Entertainment Group.
> >>
> >> _______________________________________________
> >> cfe-commits mailing list
> >> cfe-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >>
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140424/3f2ce10c/attachment.html>


More information about the cfe-commits mailing list