diff options
author | Nay <dnpd.dd@gmail.com> | 2012-09-17 23:50:08 +0100 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2012-09-17 23:50:08 +0100 |
commit | 23961d0dce22e234e62f116469f04bb62d8986a7 (patch) | |
tree | ab271f0a3fffa8f21f9ac7fd669f457beb9eb356 /dep/acelite/ace/gethrtime.cpp | |
parent | 2431895a54b38e4c0e6444c740ff2298e31e26e2 (diff) | |
parent | 2e21fa6b925c4572d620248f1b149a5d652836b2 (diff) |
Merge remote-tracking branch 'origin/master' into mmaps
Diffstat (limited to 'dep/acelite/ace/gethrtime.cpp')
-rw-r--r-- | dep/acelite/ace/gethrtime.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/dep/acelite/ace/gethrtime.cpp b/dep/acelite/ace/gethrtime.cpp deleted file mode 100644 index 5c32d16dadd..00000000000 --- a/dep/acelite/ace/gethrtime.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// $Id: gethrtime.cpp 91286 2010-08-05 09:04:31Z johnnyw $ -// -// Build this file with g++. It can be linked in to a ACE application -// that was compiled with GreenHills. It wouldn't be necessary if I -// knew a way to correctly move values from registers to a 64-bit -// variable in GHS asm code. That's easy with g++ asm. - -#include "ace/config-all.h" - - - -#if defined (ghs) && (defined (i386) || defined(__i386__)) - -#include "ace/OS_NS_time.h" - -extern "C" -ACE_hrtime_t -ACE_GETHRTIME_NAME (void) -{ -#if defined (ACE_HAS_PENTIUM) - // ACE_TRACE ("ACE_GETHRTIME_NAME"); - -#if defined (ACE_LACKS_LONGLONG_T) - double now; -#else /* ! ACE_LACKS_LONGLONG_T */ - ACE_hrtime_t now; -#endif /* ! ACE_LACKS_LONGLONG_T */ - - // Read the high-res tick counter directly into memory variable - // "now". The A constraint signifies a 64-bit int. -#if defined (__GNUG__) - asm volatile ("rdtsc" : "=A" (now) : : "memory"); -// #elif defined (ghs) -// The following doesn't work. For now, this file must be compile with g++. -// asm ("rdtsc"); -// asm ("movl %edx,-16(%ebp)"); -// asm ("movl %eax,-12(%ebp)"); -#else -# error unsupported compiler -#endif - -#if defined (ACE_LACKS_LONGLONG_T) - // ACE_U_LongLong doesn't have the same layout as now, so construct - // it "properly". - ACE_UINT32 least, most; - ACE_OS::memcpy (&least, &now, sizeof (ACE_UINT32)); - ACE_OS::memcpy (&most, (unsigned char *) &now + sizeof (ACE_UINT32), - sizeof (ACE_UINT32)); - - const ACE_hrtime_t ret (least, most); - return ret; -#else /* ! ACE_LACKS_LONGLONG_T */ - return now; -#endif /* ! ACE_LACKS_LONGLONG_T */ - -#else /* ! ACE_HAS_PENTIUM */ -# error This file can _only_ be compiled with ACE_HAS_PENTIUM. -#endif /* ! ACE_HAS_PENTIUM */ -} -#endif /* ghs */ |