[amdgcn] Remove dependency on stdint.h in libgcc
authorKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 10 Jan 2020 23:19:41 +0000 (23:19 +0000)
committerKwok Cheung Yeung <kcy@gcc.gnu.org>
Fri, 10 Jan 2020 23:19:41 +0000 (23:19 +0000)
2020-01-10  Kwok Cheung Yeung  <kcy@codesourcery.com>

libgcc/
* config/gcn/atomic.c: Remove include of stdint.h.
(__sync_val_compare_and_swap_##SIZE): Replace uintptr_t with
__UINTPTR_TYPE__.

From-SVN: r280152

libgcc/ChangeLog
libgcc/config/gcn/atomic.c

index d72249d6aeba2c155373352be88d1430538e4ac8..4deee0dcacd972cb6bd3d5ed3dc9d465675fef3f 100644 (file)
@@ -1,3 +1,9 @@
+2020-01-10  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
+       * config/gcn/atomic.c: Remove include of stdint.h.
+       (__sync_val_compare_and_swap_##SIZE): Replace uintptr_t with
+       __UINTPTR_TYPE__.
+
 2020-01-09  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
        * config/gcn/atomic.c: New.
index 214c9a5a413d16e9d0000be6df90d8d69e993281..adceb029c022968852b08df624858cf599217a17 100644 (file)
    <http://www.gnu.org/licenses/>.  */
 
 #include <stdbool.h>
-#include <stdint.h>
 
 #define __SYNC_SUBWORD_COMPARE_AND_SWAP(TYPE, SIZE)                         \
                                                                             \
 TYPE                                                                        \
 __sync_val_compare_and_swap_##SIZE (TYPE *ptr, TYPE oldval, TYPE newval)     \
 {                                                                           \
-  unsigned int *wordptr = (unsigned int *)((uintptr_t) ptr & ~3UL);         \
-  int shift = ((uintptr_t) ptr & 3UL) * 8;                                  \
+  unsigned int *wordptr = (unsigned int *)((__UINTPTR_TYPE__ ) ptr & ~3UL);  \
+  int shift = ((__UINTPTR_TYPE__ ) ptr & 3UL) * 8;                          \
   unsigned int valmask = (1 << (SIZE * 8)) - 1;                                     \
   unsigned int wordmask = ~(valmask << shift);                              \
   unsigned int oldword = *wordptr;                                          \