This is the mail archive of the gcc@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: How to implement "unsigned long long __rdtsc ()" for x86?


On Fri, Jan 16, 2009 at 11:35 AM, Jack Lloyd <lloyd@randombit.net> wrote:
> According to the info docs, the Alpha has __builtin_alpha_rpcc which
> doesn't take any inputs either, and should just call rpcc much as an
> rdtsc intrinsic would, so it may provide a more direct model.

(define_insn "builtin_rpcc"
  [(set (match_operand:DI 0 "register_operand" "=r")
        (unspec_volatile:DI [(const_int 0)] UNSPECV_RPCC))]
  ""
  "rpcc %0"
  [(set_attr "type" "ilog")])

So yes this is exactly what I was mentioning to do ...

-- Pinski


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