summaryrefslogtreecommitdiff
path: root/ACE/ace/CDR_Base.inl
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2014-09-08 18:00:53 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2014-09-08 18:00:53 +0000
commitf8facdab88eebb12fddff8dfb79b2070ac98876b (patch)
tree6014c7293d7628fd8341660cad726bf4020117bd /ACE/ace/CDR_Base.inl
parent711ff82124ddf73cfb0cfe86ba126b5153bce03d (diff)
downloadATCD-f8facdab88eebb12fddff8dfb79b2070ac98876b.tar.gz
Mon Sep 8 17:59:55 UTC 2014 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Base_Thread_Adapter.h: * ace/CDR_Base.inl: * ace/CDR_Base.cpp: * ace/ETCL/ETCL_l.cpp: * ace/ETCL/ETCL_l.cpp.diff: * ace/ETCL/ETCL_y.cpp: * ace/ETCL/ETCL_y.cpp.diff: * ace/Global_Macros.h: * ace/Handle_Set.cpp: * ace/OS_NS_stdlib.cpp: * ace/OS_NS_string.cpp: C++11 deprecated the register keyword, so introduce a new ACE_REGISTER define which normall expands to register, but to nothing with C++11
Diffstat (limited to 'ACE/ace/CDR_Base.inl')
-rw-r--r--ACE/ace/CDR_Base.inl28
1 files changed, 14 insertions, 14 deletions
diff --git a/ACE/ace/CDR_Base.inl b/ACE/ace/CDR_Base.inl
index 351c853c2e3..fef29b6dc0e 100644
--- a/ACE/ace/CDR_Base.inl
+++ b/ACE/ace/CDR_Base.inl
@@ -90,8 +90,8 @@ ACE_CDR::swap_2 (const char *orig, char* target)
__asm rol ax, 8;
__asm mov [ecx], ax;
#else
- register ACE_UINT16 usrc = * reinterpret_cast<const ACE_UINT16*> (orig);
- register ACE_UINT16* udst = reinterpret_cast<ACE_UINT16*> (target);
+ ACE_REGISTER ACE_UINT16 usrc = * reinterpret_cast<const ACE_UINT16*> (orig);
+ ACE_REGISTER ACE_UINT16* udst = reinterpret_cast<ACE_UINT16*> (target);
*udst = (usrc << 8) | (usrc >> 8);
#endif /* ACE_HAS_PENTIUM */
}
@@ -112,7 +112,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.
- register unsigned int j =
+ ACE_REGISTER unsigned int j =
*reinterpret_cast<const unsigned int*> (orig);
asm ("bswap %1" : "=r" (j) : "0" (j));
*reinterpret_cast<unsigned int*> (target) = j;
@@ -125,7 +125,7 @@ ACE_CDR::swap_4 (const char* orig, char* target)
__asm bswap eax;
__asm mov [ecx], eax;
#else
- register ACE_UINT32 x = * reinterpret_cast<const ACE_UINT32*> (orig);
+ ACE_REGISTER 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 */
@@ -147,15 +147,15 @@ 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)
- register unsigned long x =
+ ACE_REGISTER 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)
- register unsigned int i =
+ ACE_REGISTER unsigned int i =
*reinterpret_cast<const unsigned int*> (orig);
- register unsigned int j =
+ ACE_REGISTER unsigned int j =
*reinterpret_cast<const unsigned int*> (orig + 4);
asm ("bswap %1" : "=r" (i) : "0" (i));
asm ("bswap %1" : "=r" (j) : "0" (j));
@@ -174,19 +174,19 @@ ACE_CDR::swap_8 (const char* orig, char* target)
__asm mov [edx], ebx;
#elif ACE_SIZEOF_LONG == 8
// 64 bit architecture.
- register unsigned long x =
+ ACE_REGISTER unsigned long x =
* reinterpret_cast<const unsigned long*> (orig);
- register unsigned long x84 = (x & 0x000000ff000000ffUL) << 24;
- register unsigned long x73 = (x & 0x0000ff000000ff00UL) << 8;
- register unsigned long x62 = (x & 0x00ff000000ff0000UL) >> 8;
- register unsigned long x51 = (x & 0xff000000ff000000UL) >> 24;
+ 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;
x = (x84 | x73 | x62 | x51);
x = (x << 32) | (x >> 32);
*reinterpret_cast<unsigned long*> (target) = x;
#else
- register ACE_UINT32 x =
+ ACE_REGISTER ACE_UINT32 x =
* reinterpret_cast<const ACE_UINT32*> (orig);
- register ACE_UINT32 y =
+ ACE_REGISTER 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);