On Sun, Jul 25, 2021 at 6:41 PM Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > On Sun, 25 Jul 2021, 22:46 NightStrike via Gcc-help, <gcc-help@xxxxxxxxxxx> wrote: >> >> Where does GCC document how to use the builtin rdtsc and rdtscp functions? > > It doesn't, see the Intel Intrinsics Guide: > https://software.intel.com/sites/landingpage/IntrinsicsGuide/ > > Search for __rdtscp there. Interesting, thanks! Strangely: __int64 _rdtsc (void) #include <immintrin.h> unsigned __int64 __rdtscp (unsigned int * mem_addr) #include <immintrin.h> Any idea why rdtsc would return a signed value?