aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-03 02:13:55 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-03 02:13:55 -0500
commit9c81c318f6c78500e1022ba759ba659482cbe5c4 (patch)
tree478d236d73bfbb6adfc9bf6151b633e0529e5540 /sim
parent34cacf7d970c6e2506e2c8eba9b7cb77accd53a4 (diff)
downloadgdb-9c81c318f6c78500e1022ba759ba659482cbe5c4.zip
gdb-9c81c318f6c78500e1022ba759ba659482cbe5c4.tar.gz
gdb-9c81c318f6c78500e1022ba759ba659482cbe5c4.tar.bz2
sim: ppc: rename local ALU SIGNED64 macros
The common/ code has macros with the same name but different behavior: it's for declaring integer constants as 64-bit, not for casting them. Rename ppc's local variant since it's only used in this file in order to avoid conflicts.
Diffstat (limited to 'sim')
-rw-r--r--sim/ppc/idecode_expression.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sim/ppc/idecode_expression.h b/sim/ppc/idecode_expression.h
index 9c4cb7a..86b3394 100644
--- a/sim/ppc/idecode_expression.h
+++ b/sim/ppc/idecode_expression.h
@@ -57,8 +57,8 @@
/* Macro's to type cast 32bit constants to 64bits */
-#define SIGNED64(val) ((int64_t)(int32_t)(val))
-#define UNSIGNED64(val) ((uint64_t)(uint32_t)(val))
+#define ALU_SIGNED64(val) ((int64_t)(int32_t)(val))
+#define ALU_UNSIGNED64(val) ((uint64_t)(uint32_t)(val))
/* Start a section of ALU code */
@@ -134,14 +134,14 @@ do { \
#if (WITH_TARGET_WORD_BITSIZE == 64)
#define ALU_ADD(val) \
do { \
- uint64_t alu_lo = (UNSIGNED64(alu_val) \
- + UNSIGNED64(val)); \
+ uint64_t alu_lo = (ALU_UNSIGNED64(alu_val) \
+ + ALU_UNSIGNED64(val)); \
signed alu_carry = ((alu_lo & BIT(31)) != 0); \
alu_carry_val = (alu_carry_val \
- + UNSIGNED64(EXTRACTED(val, 0, 31)) \
+ + ALU_UNSIGNED64(EXTRACTED(val, 0, 31)) \
+ alu_carry); \
alu_overflow_val = (alu_overflow_val \
- + SIGNED64(EXTRACTED(val, 0, 31)) \
+ + ALU_SIGNED64(EXTRACTED(val, 0, 31)) \
+ alu_carry); \
alu_val = alu_val + val; \
} while (0)