diff options
author | Kwok Cheung Yeung <kcy@codesourcery.com> | 2020-01-10 23:19:41 +0000 |
---|---|---|
committer | Kwok Cheung Yeung <kcy@gcc.gnu.org> | 2020-01-10 23:19:41 +0000 |
commit | af9bd92015b4c55187ef1e6ada62a8b0f89c4608 (patch) | |
tree | 82a4fe208640199e37d4913d4d65411f34ccbbc9 /libgcc | |
parent | 6fc0385c0ce39470e137eab27dee8955b3f98258 (diff) | |
download | gcc-af9bd92015b4c55187ef1e6ada62a8b0f89c4608.zip gcc-af9bd92015b4c55187ef1e6ada62a8b0f89c4608.tar.gz gcc-af9bd92015b4c55187ef1e6ada62a8b0f89c4608.tar.bz2 |
[amdgcn] Remove dependency on stdint.h in libgcc
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
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/ChangeLog | 6 | ||||
-rw-r--r-- | libgcc/config/gcn/atomic.c | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index d72249d..4deee0d 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -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. diff --git a/libgcc/config/gcn/atomic.c b/libgcc/config/gcn/atomic.c index 214c9a5..adceb02 100644 --- a/libgcc/config/gcn/atomic.c +++ b/libgcc/config/gcn/atomic.c @@ -22,15 +22,14 @@ <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; \ |