Author: markj Date: Sat Jun 9 18:31:19 2018 New Revision: 334890 URL: https://svnweb.freebsd.org/changeset/base/334890
Log: Tell the compiler that rdtscp clobbers %ecx. Modified: head/sys/amd64/include/cpufunc.h head/sys/i386/include/cpufunc.h Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Sat Jun 9 18:11:46 2018 (r334889) +++ head/sys/amd64/include/cpufunc.h Sat Jun 9 18:31:19 2018 (r334890) @@ -391,7 +391,7 @@ rdtscp(void) { uint32_t low, high; - __asm __volatile("rdtscp" : "=a" (low), "=d" (high)); + __asm __volatile("rdtscp" : "=a" (low), "=d" (high) : : "ecx"); return (low | ((uint64_t)high << 32)); } Modified: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Sat Jun 9 18:11:46 2018 (r334889) +++ head/sys/i386/include/cpufunc.h Sat Jun 9 18:31:19 2018 (r334890) @@ -373,7 +373,7 @@ rdtscp(void) { uint64_t rv; - __asm __volatile("rdtscp" : "=A" (rv)); + __asm __volatile("rdtscp" : "=A" (rv) : : "ecx"); return (rv); } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"