one more go-round

This commit is contained in:
Thomas "elfprince13" Dickerson 2017-01-06 17:54:19 -05:00
parent e554fc7f93
commit 0adab54678
2 changed files with 9 additions and 9 deletions

View file

@ -114,20 +114,20 @@ U32 endHighResolutionTimer(U32 time[2])
void startHighResolutionTimer(U32 time[2]) void startHighResolutionTimer(U32 time[2])
{ {
__asm__ __volatile__( __asm__ __volatile__(
"rdtsc\n" "rdtsc\n"
: "=a" (time[0]), "=d" (time[1]) : "=a" (time[0]), "=d" (time[1])
); );
} }
U32 endHighResolutionTimer(U32 time[2]) U32 endHighResolutionTimer(U32 time[2])
{ {
U32 ticks; U32 ticks;
__asm__ __volatile__( __asm__ __volatile__(
"rdtsc\n" "rdtsc\n"
"sub 0x4(%%ecx), %%edx\n" "sub 0x4(%%ecx), %%edx\n"
"sbb (%%ecx), %%eax\n" "sbb (%%ecx), %%eax\n"
: "=a" (ticks) : "c" (time) : "=a" (ticks) : "c" (time)
); );
return ticks; return ticks;
} }

View file

@ -994,7 +994,7 @@ bool Platform::fileTimeToString(FileTime * time, char * string, U32 strLen) { re
#if defined(TORQUE_DEBUG) #if defined(TORQUE_DEBUG)
ConsoleFunction(testHasSubdir,void,2,2,"tests platform::hasSubDirectory") { ConsoleFunction(testHasSubdir,void,2,2,"tests platform::hasSubDirectory") {
Con::printf("testing %s",(const char*)argv[1]); Con::printf("testing %s",(const char*)argv[1]);
Platform::addExcludedDirectory(".svn"); Platform::addExcludedDirectory(".svn");
if(Platform::hasSubDirectory(argv[1])) if(Platform::hasSubDirectory(argv[1]))
Con::printf(" has subdir"); Con::printf(" has subdir");
else else