diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-06-21 20:49:40 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-06-21 20:49:40 +0200 |
commit | 126439237eeccce05608d9d431e3bf1c4d68e49a (patch) | |
tree | 5da8e989ecd90e15dddb66801980af526124ddb0 /ACE/ace/CDR_Base.inl | |
parent | 247ef819c09c78d5bd11ce03d61a658ff105d581 (diff) | |
download | ATCD-126439237eeccce05608d9d431e3bf1c4d68e49a.tar.gz |
Removed ACE_REGISTER completely. register is a compiler hint which is mostly ignored by compilers and recent compilers all give warnings when register is still used.
* ACE/ASNMP/asnmp/asn1.cpp:
* ACE/ace/CDR_Base.cpp:
* ACE/ace/CDR_Base.inl:
* ACE/ace/ETCL/ETCL_y.cpp:
* ACE/ace/Global_Macros.h:
* ACE/ace/Handle_Set.cpp:
* ACE/ace/OS_NS_stdlib.cpp:
* ACE/ace/OS_NS_string.cpp:
Diffstat (limited to 'ACE/ace/CDR_Base.inl')
-rw-r--r-- | ACE/ace/CDR_Base.inl | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/ACE/ace/CDR_Base.inl b/ACE/ace/CDR_Base.inl index 2a93c82b632..24000ac669e 100644 --- a/ACE/ace/CDR_Base.inl +++ b/ACE/ace/CDR_Base.inl @@ -86,8 +86,8 @@ ACE_CDR::swap_2 (const char *orig, char* target) __asm rol ax, 8; __asm mov [ecx], ax; #else - ACE_REGISTER ACE_UINT16 usrc = * reinterpret_cast<const ACE_UINT16*> (orig); - ACE_REGISTER ACE_UINT16* udst = reinterpret_cast<ACE_UINT16*> (target); + ACE_UINT16 usrc = * reinterpret_cast<const ACE_UINT16*> (orig); + ACE_UINT16* udst = reinterpret_cast<ACE_UINT16*> (target); *udst = (usrc << 8) | (usrc >> 8); #endif /* ACE_HAS_PENTIUM */ } @@ -108,7 +108,7 @@ ACE_CDR::swap_4 (const char* orig, char* target) bswap_32 (*reinterpret_cast<uint32_t const *> (orig)); #elif defined(ACE_HAS_INTEL_ASSEMBLY) // We have ACE_HAS_PENTIUM, so we know the sizeof's. - ACE_REGISTER unsigned int j = + unsigned int j = *reinterpret_cast<const unsigned int*> (orig); asm ("bswap %1" : "=r" (j) : "0" (j)); *reinterpret_cast<unsigned int*> (target) = j; @@ -121,7 +121,7 @@ ACE_CDR::swap_4 (const char* orig, char* target) __asm bswap eax; __asm mov [ecx], eax; #else - ACE_REGISTER ACE_UINT32 x = * reinterpret_cast<const ACE_UINT32*> (orig); + ACE_UINT32 x = * reinterpret_cast<const ACE_UINT32*> (orig); x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24); * reinterpret_cast<ACE_UINT32*> (target) = x; #endif /* ACE_HAS_INTRINSIC_BYTESWAP */ @@ -143,16 +143,14 @@ ACE_CDR::swap_8 (const char* orig, char* target) bswap_64 (*reinterpret_cast<uint64_t const *> (orig)); #elif (defined (__amd64__) || defined (__x86_64__)) && defined(__GNUG__) \ && !defined(ACE_LACKS_INLINE_ASSEMBLY) - ACE_REGISTER unsigned long x = + unsigned long x = * reinterpret_cast<const unsigned long*> (orig); asm ("bswapq %1" : "=r" (x) : "0" (x)); *reinterpret_cast<unsigned long*> (target) = x; #elif defined(ACE_HAS_PENTIUM) && defined(__GNUG__) \ && !defined(ACE_LACKS_INLINE_ASSEMBLY) - ACE_REGISTER unsigned int i = - *reinterpret_cast<const unsigned int*> (orig); - ACE_REGISTER unsigned int j = - *reinterpret_cast<const unsigned int*> (orig + 4); + unsigned int i =*reinterpret_cast<const unsigned int*> (orig); + unsigned int j = *reinterpret_cast<const unsigned int*> (orig + 4); asm ("bswap %1" : "=r" (i) : "0" (i)); asm ("bswap %1" : "=r" (j) : "0" (j)); *reinterpret_cast<unsigned int*> (target + 4) = i; @@ -170,20 +168,17 @@ ACE_CDR::swap_8 (const char* orig, char* target) __asm mov [edx], ebx; #elif ACE_SIZEOF_LONG == 8 // 64 bit architecture. - ACE_REGISTER unsigned long x = - * reinterpret_cast<const unsigned long*> (orig); - ACE_REGISTER unsigned long x84 = (x & 0x000000ff000000ffUL) << 24; - ACE_REGISTER unsigned long x73 = (x & 0x0000ff000000ff00UL) << 8; - ACE_REGISTER unsigned long x62 = (x & 0x00ff000000ff0000UL) >> 8; - ACE_REGISTER unsigned long x51 = (x & 0xff000000ff000000UL) >> 24; + unsigned long x = * reinterpret_cast<const unsigned long*> (orig); + unsigned long x84 = (x & 0x000000ff000000ffUL) << 24; + unsigned long x73 = (x & 0x0000ff000000ff00UL) << 8; + unsigned long x62 = (x & 0x00ff000000ff0000UL) >> 8; + unsigned long x51 = (x & 0xff000000ff000000UL) >> 24; x = (x84 | x73 | x62 | x51); x = (x << 32) | (x >> 32); *reinterpret_cast<unsigned long*> (target) = x; #else - ACE_REGISTER ACE_UINT32 x = - * reinterpret_cast<const ACE_UINT32*> (orig); - ACE_REGISTER ACE_UINT32 y = - * reinterpret_cast<const ACE_UINT32*> (orig + 4); + ACE_UINT32 x = * reinterpret_cast<const ACE_UINT32*> (orig); + ACE_UINT32 y = * reinterpret_cast<const ACE_UINT32*> (orig + 4); x = (x << 24) | ((x & 0xff00) << 8) | ((x & 0xff0000) >> 8) | (x >> 24); y = (y << 24) | ((y & 0xff00) << 8) | ((y & 0xff0000) >> 8) | (y >> 24); * reinterpret_cast<ACE_UINT32*> (target) = y; |