From b698d4e317d61a4aa00bdd4c291b864bc4f13208 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 8 Mar 2025 02:09:54 -0800 Subject: [PATCH] ARM: Placate Coverity even more --- src/arm/isa-arm.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/arm/isa-arm.c b/src/arm/isa-arm.c index aaecf2517..dba4dfe94 100644 --- a/src/arm/isa-arm.c +++ b/src/arm/isa-arm.c @@ -743,11 +743,11 @@ DEFINE_INSTRUCTION_ARM(MRSR, \ cpu->gprs[rd] = cpu->spsr.packed;) DEFINE_INSTRUCTION_ARM(MSRI, - int c = opcode & 0x00010000; - int f = opcode & 0x00080000; - int rotate = (opcode & 0x00000F00) >> 7; - int32_t operand = ROR(opcode & 0x000000FF, rotate); - int32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0); + uint32_t c = opcode & 0x00010000; + uint32_t f = opcode & 0x00080000; + uint32_t rotate = (opcode & 0x00000F00) >> 7; + uint32_t operand = ROR(opcode & 0x000000FF, rotate); + uint32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0); if (mask & PSR_USER_MASK) { cpu->cpsr.packed = (cpu->cpsr.packed & ~PSR_USER_MASK) | (operand & PSR_USER_MASK); } @@ -769,11 +769,11 @@ DEFINE_INSTRUCTION_ARM(MSRI, }) DEFINE_INSTRUCTION_ARM(MSRRI, - int c = opcode & 0x00010000; - int f = opcode & 0x00080000; - int rotate = (opcode & 0x00000F00) >> 7; - int32_t operand = ROR(opcode & 0x000000FF, rotate); - int32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0); + uint32_t c = opcode & 0x00010000; + uint32_t f = opcode & 0x00080000; + uint32_t rotate = (opcode & 0x00000F00) >> 7; + uint32_t operand = ROR(opcode & 0x000000FF, rotate); + uint32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0); mask &= PSR_USER_MASK | PSR_PRIV_MASK | PSR_STATE_MASK; cpu->spsr.packed = (cpu->spsr.packed & ~mask) | (operand & mask) | 0x00000010;)