diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-09-14 09:47:59 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-09-14 09:47:59 +0000 |
commit | 0276aa62752af213bd9ac8e94282749e63f81297 (patch) | |
tree | 4458ef305331f6dd9f8b070626c609a319061b1f | |
parent | 4fa417e71cead406f0fd7b34e2477dc5adca661b (diff) | |
download | ATCD-0276aa62752af213bd9ac8e94282749e63f81297.tar.gz |
Fri Sep 14 09:47:38 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | ACE/ChangeLog | 6 | ||||
-rw-r--r-- | ACE/ace/CDR_Base.inl | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 99175677897..90927e21d06 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,9 @@ +Fri Sep 14 09:47:38 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> + + * ace/CDR_Base.{inl}: + The swap_8 method was incorrect, there we use an EM64T instruction, + use ACE_HAS_INTEL_ASSEMBLY in the swap_2 and swap_4 method + Fri Sep 14 04:51:38 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> * ace/CDR_Base.{cpp.inl}: diff --git a/ACE/ace/CDR_Base.inl b/ACE/ace/CDR_Base.inl index fc991d41cd1..811165f91bf 100644 --- a/ACE/ace/CDR_Base.inl +++ b/ACE/ace/CDR_Base.inl @@ -73,7 +73,7 @@ ACE_CDR::swap_2 (const char *orig, char* target) #elif defined (ACE_HAS_BSWAP_16) *reinterpret_cast<unsigned short *> (target) = bswap_16 (*reinterpret_cast<unsigned short const *> (orig)); -#elif (defined(ACE_HAS_PENTIUM) || defined (__amd64__) || defined (__x86_64__)) && defined(__GNUG__) +#elif defined(ACE_HAS_INTEL_ASSEMBLY) unsigned short a = *reinterpret_cast<const unsigned short*> (orig); asm( "rolw $8, %0" : "=r" (a) : "0" (a) ); @@ -104,7 +104,7 @@ ACE_CDR::swap_4 (const char* orig, char* target) #elif defined (ACE_HAS_BSWAP_32) *reinterpret_cast<unsigned int *> (target) = bswap_32 (*reinterpret_cast<unsigned int const *> (orig)); -#elif (defined(ACE_HAS_PENTIUM) || defined (__amd64__) || defined (__x86_64__)) && defined(__GNUG__) +#elif defined(ACE_HAS_INTEL_ASSEMBLY) // We have ACE_HAS_PENTIUM, so we know the sizeof's. register unsigned int j = *reinterpret_cast<const unsigned int*> (orig); @@ -136,7 +136,7 @@ ACE_CDR::swap_8 (const char* orig, char* target) #elif defined (ACE_HAS_BSWAP_64) *reinterpret_cast<unsigned long long *> (target) = bswap_64 (*reinterpret_cast<unsigned long long const *> (orig)); -#elif (defined(ACE_HAS_PENTIUM) || defined (__amd64__) || defined (__x86_64__)) && defined(__GNUG__) +#elif (defined (__amd64__) || defined (__x86_64__)) && defined(__GNUG__) register unsigned long x = * reinterpret_cast<const unsigned long*> (orig); asm ("bswapq %1" : "=r" (x) : "0" (x)); |