diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-12-06 02:42:00 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-01-06 01:17:39 -0500 |
commit | 95e40d770e95c0d5317c2566a7976bd3421f380a (patch) | |
tree | ee409c8b3279492f88f1b3b5e675e86d254b899d /sim/ppc/bits.h | |
parent | e4c803f5bb08e946f0550260b39f71eff0192262 (diff) | |
download | binutils-95e40d770e95c0d5317c2566a7976bd3421f380a.zip binutils-95e40d770e95c0d5317c2566a7976bd3421f380a.tar.gz binutils-95e40d770e95c0d5317c2566a7976bd3421f380a.tar.bz2 |
sim: ppc: migrate to standard uintXX_t types
Drop the sim-specific unsignedXX types and move to the standard uintXX_t
types that C11 provides.
Diffstat (limited to 'sim/ppc/bits.h')
-rw-r--r-- | sim/ppc/bits.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sim/ppc/bits.h b/sim/ppc/bits.h index d3b765a..d08f8d5 100644 --- a/sim/ppc/bits.h +++ b/sim/ppc/bits.h @@ -108,7 +108,7 @@ /* multi bit mask */ #define _MASKn(WIDTH, START, STOP) \ -(((((unsigned##WIDTH)0) - 1) \ +(((((uint##WIDTH##_t)0) - 1) \ >> (WIDTH - ((STOP) - (START) + 1))) \ << (WIDTH - 1 - (STOP))) @@ -151,14 +151,14 @@ /* mask the required bits, leaving them in place */ INLINE_BITS\ -(unsigned32) MASKED32 -(unsigned32 word, +(uint32_t) MASKED32 +(uint32_t word, unsigned start, unsigned stop); INLINE_BITS\ -(unsigned64) MASKED64 -(unsigned64 word, +(uint64_t) MASKED64 +(uint64_t word, unsigned start, unsigned stop); @@ -169,8 +169,8 @@ INLINE_BITS\ unsigned stop); INLINE_BITS\ -(unsigned64) LSMASKED64 -(unsigned64 word, +(uint64_t) LSMASKED64 +(uint64_t word, int first, int last); @@ -191,8 +191,8 @@ INLINE_BITS\ unsigned stop); INLINE_BITS\ -(unsigned64) LSEXTRACTED64 -(unsigned64 val, +(uint64_t) LSEXTRACTED64 +(uint64_t val, int start, int stop); @@ -200,10 +200,10 @@ INLINE_BITS\ /* NB: the wierdness (N>O?N-O:0) is to stop a warning from GCC */ #define _SHUFFLEDn(N, WORD, OLD, NEW) \ ((OLD) < (NEW) \ - ? (((unsigned##N)(WORD) \ + ? (((uint##N##_t)(WORD) \ >> (((NEW) > (OLD)) ? ((NEW) - (OLD)) : 0)) \ & MASK32((NEW), (NEW))) \ - : (((unsigned##N)(WORD) \ + : (((uint##N##_t)(WORD) \ << (((OLD) > (NEW)) ? ((OLD) - (NEW)) : 0)) \ & MASK32((NEW), (NEW)))) @@ -229,7 +229,7 @@ INLINE_BITS\ /* depending on MODE return a 64bit or 32bit (sign extended) value */ #if (WITH_TARGET_WORD_BITSIZE == 64) -#define EXTENDED(X) ((signed64)(signed32)(X)) +#define EXTENDED(X) ((int64_t)(int32_t)(X)) #else #define EXTENDED(X) (X) #endif @@ -270,13 +270,13 @@ do { \ (((VAL) << (SHIFT)) | ((VAL) >> ((N)-(SHIFT)))) INLINE_BITS\ -(unsigned32) ROTL32 -(unsigned32 val, +(uint32_t) ROTL32 +(uint32_t val, long shift); INLINE_BITS\ -(unsigned64) ROTL64 -(unsigned64 val, +(uint64_t) ROTL64 +(uint64_t val, long shift); |