You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/target
Stephen Longfield b2ba5ff272 target/arm: Use uint32_t in t32_expandimm_imm()
In t32_expandimm_imm(), we take an 8 bit value XY and construct a
32-bit value which might be of the form XY, 00XY00XY, XY00XY00, or
XYXYXYXY.  We do this with multiplications, and we use an 'int' type.
For the cases where we're setting the high byte of the 32-bit value
to XY, this means that we do an integer multiplication that might
overflow, and rely on the -fwrapv semantics to keep this from being
undefined behaviour.

It's clearer to use an unsigned type here, because we're really
doing operations on the value considered as a set of bits. The
result is the same.

The return value from the function remains 'int', because this
is a decodetree !function function, and follows the API for those
functions.

Signed-off-by: Stephen Longfield <slongfield@google.com>
Signed-off-by: Roque Arcudia Hernandez <roqueh@google.com>
Message-id: 20250219165534.3387376-1-slongfield@google.com
[PMM: Rewrote the commit message]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2 days ago
..
alpha fpu: allow flushing of output denormals to be after rounding 2 weeks ago
arm target/arm: Use uint32_t in t32_expandimm_imm() 2 days ago
avr target/*: Remove TARGET_LONG_BITS from cpu-param.h 2 weeks ago
hexagon target/*: Remove TARGET_LONG_BITS from cpu-param.h 2 weeks ago
hppa fpu: allow flushing of output denormals to be after rounding 2 weeks ago
i386 overall: Remove unnecessary g_strdup_printf() calls 1 week ago
loongarch target/loongarch: Use VADDR_PRIx for logging pc_next 4 days ago
m68k target/*: Remove TARGET_LONG_BITS from cpu-param.h 2 weeks ago
microblaze target/*: Remove TARGET_LONG_BITS from cpu-param.h 2 weeks ago
mips target/mips: Use VADDR_PRIx for logging pc_next 4 days ago
openrisc target/*: Remove TARGET_LONG_BITS from cpu-param.h 2 weeks ago
ppc fpu: allow flushing of output denormals to be after rounding 2 weeks ago
riscv tcg: Remove TCG_OVERSIZED_GUEST 4 days ago
rx fpu: allow flushing of output denormals to be after rounding 2 weeks ago
s390x QAPI patches patches for 2025-02-10 2 weeks ago
sh4 fpu: allow flushing of output denormals to be after rounding 2 weeks ago
sparc target/sparc: fake UltraSPARC T1 PCR and PIC registers 4 days ago
tricore fpu: allow flushing of output denormals to be after rounding 2 weeks ago
xtensa target/*: Remove TARGET_LONG_BITS from cpu-param.h 2 weeks ago
Kconfig target/cris: Remove the deprecated CRIS target 5 months ago
meson.build target/cris: Remove the deprecated CRIS target 5 months ago