diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-12-06 02:14:44 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-01-06 01:17:38 -0500 |
commit | 868b6a9d3bbfd4059b29ac58371cc92937ab1393 (patch) | |
tree | f7f6158000b2f69cee697e1fd89cd743510ce1a6 /sim/msp430/msp430-sim.c | |
parent | 5a33ead2d35e4195147e9befe9e18addfa2abcd2 (diff) | |
download | gdb-868b6a9d3bbfd4059b29ac58371cc92937ab1393.zip gdb-868b6a9d3bbfd4059b29ac58371cc92937ab1393.tar.gz gdb-868b6a9d3bbfd4059b29ac58371cc92937ab1393.tar.bz2 |
sim: msp430: migrate to standard uintXX_t types
Move off the sim-specific unsignedXX types and to the standard uintXX_t
types that C11 provides.
Diffstat (limited to 'sim/msp430/msp430-sim.c')
-rw-r--r-- | sim/msp430/msp430-sim.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sim/msp430/msp430-sim.c b/sim/msp430/msp430-sim.c index bd911a5..2ca5e17 100644 --- a/sim/msp430/msp430-sim.c +++ b/sim/msp430/msp430-sim.c @@ -573,7 +573,7 @@ put_op (SIM_DESC sd, MSP430_Opcode_Decoded *opc, int n, int val) /* For unsigned 32-bit multiplication of 16-bit operands, an explicit cast is required to prevent any implicit sign-extension. */ - HWMULT (sd, hwmult_result) = (unsigned32) a * (unsigned32) b; + HWMULT (sd, hwmult_result) = (uint32_t) a * (uint32_t) b; HWMULT (sd, hwmult_signed_result) = a * b; HWMULT (sd, hwmult_accumulator) = HWMULT (sd, hwmult_signed_accumulator) = 0; break; @@ -582,7 +582,7 @@ put_op (SIM_DESC sd, MSP430_Opcode_Decoded *opc, int n, int val) a = sign_ext (HWMULT (sd, hwmult_op1), 16); b = sign_ext (HWMULT (sd, hwmult_op2), 16); HWMULT (sd, hwmult_signed_result) = a * b; - HWMULT (sd, hwmult_result) = (unsigned32) a * (unsigned32) b; + HWMULT (sd, hwmult_result) = (uint32_t) a * (uint32_t) b; HWMULT (sd, hwmult_accumulator) = HWMULT (sd, hwmult_signed_accumulator) = 0; break; @@ -590,7 +590,7 @@ put_op (SIM_DESC sd, MSP430_Opcode_Decoded *opc, int n, int val) a = HWMULT (sd, hwmult_op1); b = HWMULT (sd, hwmult_op2); HWMULT (sd, hwmult_accumulator) - += (unsigned32) a * (unsigned32) b; + += (uint32_t) a * (uint32_t) b; HWMULT (sd, hwmult_signed_accumulator) += a * b; HWMULT (sd, hwmult_result) = HWMULT (sd, hwmult_accumulator); HWMULT (sd, hwmult_signed_result) = HWMULT (sd, hwmult_signed_accumulator); @@ -600,7 +600,7 @@ put_op (SIM_DESC sd, MSP430_Opcode_Decoded *opc, int n, int val) a = sign_ext (HWMULT (sd, hwmult_op1), 16); b = sign_ext (HWMULT (sd, hwmult_op2), 16); HWMULT (sd, hwmult_accumulator) - += (unsigned32) a * (unsigned32) b; + += (uint32_t) a * (uint32_t) b; HWMULT (sd, hwmult_signed_accumulator) += a * b; HWMULT (sd, hwmult_result) = HWMULT (sd, hwmult_accumulator); HWMULT (sd, hwmult_signed_result) = HWMULT (sd, hwmult_signed_accumulator); @@ -660,8 +660,8 @@ put_op (SIM_DESC sd, MSP430_Opcode_Decoded *opc, int n, int val) { case UNSIGN_64: HWMULT (sd, hw32mult_result) - = (unsigned64) HWMULT (sd, hw32mult_op1) - * (unsigned64) HWMULT (sd, hw32mult_op2); + = (uint64_t) HWMULT (sd, hw32mult_op1) + * (uint64_t) HWMULT (sd, hw32mult_op2); break; case SIGN_64: HWMULT (sd, hw32mult_result) |