[llvm-commits] [llvm-gcc-4.2] r54154 - in /llvm-gcc-4.2/trunk/more-hdrs: ppc_intrinsics.h stdint.h

Bill Wendling isanbard at gmail.com
Tue Jul 29 01:22:19 PDT 2008


Author: void
Date: Tue Jul 29 03:22:19 2008
New Revision: 54154

URL: http://llvm.org/viewvc/llvm-project?rev=54154&view=rev
Log:
Update to GCC 4.2 TOT from r142930:

- Remove C++ guards.
- Rename variables.

Modified:
    llvm-gcc-4.2/trunk/more-hdrs/ppc_intrinsics.h
    llvm-gcc-4.2/trunk/more-hdrs/stdint.h

Modified: llvm-gcc-4.2/trunk/more-hdrs/ppc_intrinsics.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/more-hdrs/ppc_intrinsics.h?rev=54154&r1=54153&r2=54154&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/more-hdrs/ppc_intrinsics.h (original)
+++ llvm-gcc-4.2/trunk/more-hdrs/ppc_intrinsics.h Tue Jul 29 03:22:19 2008
@@ -216,9 +216,9 @@
  *   int __lhbrx(void *, int);
  */
 #define __lhbrx(base, index)   \
-  ({ unsigned short lhbrxResult;       \
-     __asm__ volatile ("lhbrx %0, %1, %2" : "=r" (lhbrxResult) : "b%" (index), "r" (base) : "memory"); \
-     /*return*/ lhbrxResult; })
+  ({ unsigned short __ppc_i_lhbrxResult;       \
+     __asm__ volatile ("lhbrx %0, %1, %2" : "=r" (__ppc_i_lhbrxResult) : "b%" (index), "r" (base) : "memory"); \
+     /*return*/ __ppc_i_lhbrxResult; })
 
 /*
  * __lwbrx - Load Word Byte-Reverse Indexed
@@ -226,9 +226,9 @@
  *   int __lwbrx(void *, int);
  */
 #define __lwbrx(base, index)    \
-  ({ unsigned int lwbrxResult; \
-     __asm__ volatile ("lwbrx %0, %1, %2" : "=r" (lwbrxResult) : "b%" (index), "r" (base) : "memory"); \
-     /*return*/ lwbrxResult; })
+  ({ unsigned int __ppc_i_lwbrxResult; \
+     __asm__ volatile ("lwbrx %0, %1, %2" : "=r" (__ppc_i_lwbrxResult) : "b%" (index), "r" (base) : "memory"); \
+     /*return*/ __ppc_i_lwbrxResult; })
 
 /*
  * __sthbrx - Store Half Word Byte-Reverse Indexed
@@ -278,22 +278,22 @@
  *
  *   int __rlwinm(long, int, int, int);
  */
-#define __rlwinm(rS, cnt, mb, me)                          \
-  ({ unsigned int val;                         \
-     __asm__ ("rlwinm %0,%1,%2,%3,%4" : "=r" (val)         \
-              : "r" (rS), "n" (cnt), "n" (mb), "n" (me)); \
-     /*return*/ val;})
+#define __rlwinm(rS, cnt, mb, me)						\
+  ({ unsigned int __ppc_i_val;							\
+     __asm__ ("rlwinm %0,%1,%2,%3,%4" : "=r" (__ppc_i_val)			\
+              : "r" (rS), "n" (cnt), "n" (mb), "n" (me));			\
+     /*return*/ __ppc_i_val;})
 
 /*
  * __rlwnm - Rotate Left Word then AND with Mask
  *
  *   int __rlwnm(long, int, int, int);
  */
-#define __rlwnm(value, leftRotateBits, maskStart, maskEnd)                        \
-  ({ unsigned int result;                                                        \
-     __asm__ ("rlwnm %0, %1, %2, %3, %4" : "=r" (result) :                        \
+#define __rlwnm(value, leftRotateBits, maskStart, maskEnd)			\
+  ({ unsigned int __ppc_i_result;						\
+     __asm__ ("rlwnm %0, %1, %2, %3, %4" : "=r" (__ppc_i_result) :		\
               "r" (value), "r" (leftRotateBits), "n" (maskStart), "n" (maskEnd)); \
-     /*return */ result; })
+     /*return */ __ppc_i_result; })
 
 
 /*******************************************************************
@@ -930,10 +930,10 @@
  *
  *   int __mfspr(int);
  */
-#define __mfspr(spr)    \
-  __extension__ ({ long mfsprResult; \
-     __asm__ volatile ("mfspr %0, %1" : "=r" (mfsprResult) : "n" (spr)); \
-     /*return*/ mfsprResult; })
+#define __mfspr(spr)							\
+  __extension__ ({ long __ppc_i_mfsprResult;				\
+     __asm__ volatile ("mfspr %0, %1" : "=r" (__ppc_i_mfsprResult) : "n" (spr)); \
+     /*return*/ __ppc_i_mfsprResult; })
 
 /*
  * __mtfsf - Move to SPSCR Fields

Modified: llvm-gcc-4.2/trunk/more-hdrs/stdint.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/more-hdrs/stdint.h?rev=54154&r1=54153&r2=54154&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/more-hdrs/stdint.h (original)
+++ llvm-gcc-4.2/trunk/more-hdrs/stdint.h Tue Jul 29 03:22:19 2008
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, 2003, 2004 Apple Computer, Inc.
+ * Copyright (c) 2000, 2001, 2003, 2004, 2008 Apple Computer, Inc.
  * All rights reserved.
  */
 
@@ -109,15 +109,6 @@
 #endif /* __UINTMAX_TYPE__ */
 #endif /* _UINTMAX_T */
 
-/* "C++ implementations should define these macros only when
- *  __STDC_LIMIT_MACROS is defined before <stdint.h> is included."
- * In other words, if C++, then __STDC_LIMIT_MACROS enables the
- * macros below.  (Note that there also exists a different enabling
- * macro (__STDC_CONSTANT_MACROS) for the last few, below.)
- */
-#if (! defined(__cplusplus)) || defined(__STDC_LIMIT_MACROS)
-
-
 /* 7.18.2 Limits of specified-width integer types:
  *   These #defines specify the minimum and maximum limits
  *   of each of the types declared above.
@@ -245,13 +236,6 @@
 #define SIG_ATOMIC_MIN	  INT32_MIN
 #define SIG_ATOMIC_MAX	  INT32_MAX
 
-#endif /* if C++, then __STDC_LIMIT_MACROS enables the above macros */
-
-/* "C++ implementations should define these macros only when
- *  __STDC_CONSTANT_MACROS is defined before <stdint.h> is included."
- */
-#if (! defined(__cplusplus)) || defined(__STDC_CONSTANT_MACROS)
-
 /* 7.18.4 Macros for integer constants */
 #define INT8_C(v)    (v)
 #define INT16_C(v)   (v)
@@ -266,6 +250,4 @@
 #define INTMAX_C(v)  (v ## LL)
 #define UINTMAX_C(v) (v ## ULL)
 
-#endif /* if C++, then __STDC_CONSTANT_MACROS enables the above macros */
-
 #endif /* _STDINT_H_ */





More information about the llvm-commits mailing list