aboutsummaryrefslogtreecommitdiff
path: root/sim/ppc/idecode_expression.h
diff options
context:
space:
mode:
Diffstat (limited to 'sim/ppc/idecode_expression.h')
-rw-r--r--sim/ppc/idecode_expression.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/sim/ppc/idecode_expression.h b/sim/ppc/idecode_expression.h
index 01b7ebb..9c4cb7a 100644
--- a/sim/ppc/idecode_expression.h
+++ b/sim/ppc/idecode_expression.h
@@ -30,7 +30,7 @@
/* 32bit target expressions:
Each calculation is performed three times using each of the
- signed64, unsigned64 and long integer types. The macro ALU_END
+ int64_t, uint64_t and long integer types. The macro ALU_END
(in _ALU_RESULT_VAL) then selects which of the three alternative
results will be used in the final assignment of the target
register. As this selection is determined at compile time by
@@ -57,8 +57,8 @@
/* Macro's to type cast 32bit constants to 64bits */
-#define SIGNED64(val) ((signed64)(signed32)(val))
-#define UNSIGNED64(val) ((unsigned64)(unsigned32)(val))
+#define SIGNED64(val) ((int64_t)(int32_t)(val))
+#define UNSIGNED64(val) ((uint64_t)(uint32_t)(val))
/* Start a section of ALU code */
@@ -66,8 +66,8 @@
#define ALU_BEGIN(val) \
{ \
signed_word alu_val; \
- unsigned64 alu_carry_val; \
- signed64 alu_overflow_val; \
+ uint64_t alu_carry_val; \
+ int64_t alu_overflow_val; \
ALU_SET(val)
@@ -78,7 +78,7 @@
signed_word const alu_result = _ALU_RESULT_VAL(CA,OE,Rc); \
/* determine the overflow bit if needed */ \
if (OE) { \
- if ((((unsigned64)(alu_overflow_val & BIT64(0))) \
+ if ((((uint64_t)(alu_overflow_val & BIT64(0))) \
>> 32) \
== (alu_overflow_val & BIT64(32))) \
XER &= (~xer_overflow); \
@@ -118,23 +118,23 @@
#define ALU_SET(val) \
do { \
alu_val = val; \
- alu_carry_val = ((unsigned64)alu_val) >> 32; \
- alu_overflow_val = ((signed64)alu_val) >> 32; \
+ alu_carry_val = ((uint64_t)alu_val) >> 32; \
+ alu_overflow_val = ((int64_t)alu_val) >> 32; \
} while (0)
#endif
#if (WITH_TARGET_WORD_BITSIZE == 32)
#define ALU_SET(val) \
do { \
alu_val = val; \
- alu_carry_val = (unsigned32)(alu_val); \
- alu_overflow_val = (signed32)(alu_val); \
+ alu_carry_val = (uint32_t)(alu_val); \
+ alu_overflow_val = (int32_t)(alu_val); \
} while (0)
#endif
#if (WITH_TARGET_WORD_BITSIZE == 64)
#define ALU_ADD(val) \
do { \
- unsigned64 alu_lo = (UNSIGNED64(alu_val) \
+ uint64_t alu_lo = (UNSIGNED64(alu_val) \
+ UNSIGNED64(val)); \
signed alu_carry = ((alu_lo & BIT(31)) != 0); \
alu_carry_val = (alu_carry_val \
@@ -150,8 +150,8 @@ do { \
#define ALU_ADD(val) \
do { \
alu_val += val; \
- alu_carry_val += (unsigned32)(val); \
- alu_overflow_val += (signed32)(val); \
+ alu_carry_val += (uint32_t)(val); \
+ alu_overflow_val += (int32_t)(val); \
} while (0)
#endif
@@ -179,8 +179,8 @@ do { \
#define ALU_SUB(val) \
do { \
alu_val -= val; \
- alu_carry_val -= (unsigned32)(val); \
- alu_overflow_val -= (signed32)(val); \
+ alu_carry_val -= (uint32_t)(val); \
+ alu_overflow_val -= (int32_t)(val); \
} while (0)
#endif
#endif
@@ -191,8 +191,8 @@ do { \
#define ALU_OR(val) \
do { \
alu_val |= val; \
- alu_carry_val = (unsigned32)(alu_val); \
- alu_overflow_val = (signed32)(alu_val); \
+ alu_carry_val = (uint32_t)(alu_val); \
+ alu_overflow_val = (int32_t)(alu_val); \
} while (0)
#endif
@@ -203,8 +203,8 @@ do { \
#define ALU_XOR(val) \
do { \
alu_val ^= val; \
- alu_carry_val = (unsigned32)(alu_val); \
- alu_overflow_val = (signed32)(alu_val); \
+ alu_carry_val = (uint32_t)(alu_val); \
+ alu_overflow_val = (int32_t)(alu_val); \
} while (0)
#endif
@@ -229,8 +229,8 @@ do { \
#define ALU_AND(val) \
do { \
alu_val &= val; \
- alu_carry_val = (unsigned32)(alu_val); \
- alu_overflow_val = (signed32)(alu_val); \
+ alu_carry_val = (uint32_t)(alu_val); \
+ alu_overflow_val = (int32_t)(alu_val); \
} while (0)
#endif
@@ -238,7 +238,7 @@ do { \
#if (WITH_TARGET_WORD_BITSIZE == 64)
#define ALU_NOT \
do { \
- signed64 new_alu_val = ~alu_val; \
+ int64_t new_alu_val = ~alu_val; \
ALU_SET(new_alu_val); \
} while (0)
#endif