mirror of https://gitlab.com/qemu-project/qemu
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.
![]() 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 | 2 weeks ago | |
arm | 2 days ago | |
avr | 2 weeks ago | |
hexagon | 2 weeks ago | |
hppa | 2 weeks ago | |
i386 | 1 week ago | |
loongarch | 4 days ago | |
m68k | 2 weeks ago | |
microblaze | 2 weeks ago | |
mips | 4 days ago | |
openrisc | 2 weeks ago | |
ppc | 2 weeks ago | |
riscv | 4 days ago | |
rx | 2 weeks ago | |
s390x | 2 weeks ago | |
sh4 | 2 weeks ago | |
sparc | 4 days ago | |
tricore | 2 weeks ago | |
xtensa | 2 weeks ago | |
Kconfig | 5 months ago | |
meson.build | 5 months ago |