aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/bits.h
diff options
context:
space:
mode:
Diffstat (limited to 'sim/ppc/bits.h')
-rw-r--r--sim/ppc/bits.h32
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);