diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
commit | 3df4acfa816441fc28a95dee6d0191a927145d95 (patch) | |
tree | b5ae7ca44662cfd8e5c95f1826e4406021a606f5 /ace/gethrtime.cpp | |
parent | 60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff) | |
download | ATCD-pre-subset.tar.gz |
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'ace/gethrtime.cpp')
-rw-r--r-- | ace/gethrtime.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/ace/gethrtime.cpp b/ace/gethrtime.cpp deleted file mode 100644 index 08de489f7f6..00000000000 --- a/ace/gethrtime.cpp +++ /dev/null @@ -1,60 +0,0 @@ -// $Id$ -// -// 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/OS.h" - -ACE_RCSID(ace, gethrtime, "$Id$") - -#if defined (ghs) && (defined (i386) || defined(__i386__)) -extern "C" -ACE_hrtime_t -ACE_gethrtime (void) -{ -#if defined (ACE_HAS_PENTIUM) - // ACE_TRACE ("ACE_gethrtime"); - -#if defined (ACE_LACKS_LONGLONG_T) - double now; -#else /* ! ACE_LACKS_LONGLONG_T */ - ACE_hrtime_t now; -#endif /* ! ACE_LACKS_LONGLONG_T */ - - // See comments about the RDTSC Pentium instruction for the - // ACE_WIN32 version of ACE_OS::gethrtime () in ace/OS.i. - // - // 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 */ |