Blackfin arch: Fix decoding of opcodes 41-47 in decode_instruction()
PATCH 1/1 Blackfin arch: Fix decoding of opcodes 41-47 in decode_instruction()
This condition allowed only decoding of opcode 0x0040
Signed-off-by Roel Kluin <[email protected]>
--- arch/blackfin/kernel/traps.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Found with static code analysis. Correct?
arch/blackfin/kernel/traps.c +1 -1
@@ -712,7 +712,7 @@ static void decode_instruction(unsigned short *address)verbose_printk ("RTE" ); else if (opcode == 0x0025) verbose_printk("EMUEXCPT"); - else if (opcode == 0x0040 && opcode <= 0x0047) + else if (opcode >= 0x0040 && opcode <= 0x0047)verbose_printk ("STI R%i" , opcode &7 ); else if (opcode >= 0x0050 && opcode <= 0x0057)verbose_printk ("JUMP (P%i)" , opcode &7 );
Quoted 8 lines · Roel Kluin
This condition allowed only decoding of opcode
0x0040Signed-off-by Roel Kluin <[email protected]>---
arch/blackfin/kernel/traps.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)Found with static code analysis. Correct?
looks like it to me:
0: 40 00 STI R0; 2: 41 00 STI R1; 4: 42 00 STI R2; 6: 43 00 STI R3; 8: 44 00 STI R4; a: 45 00 STI R5; c: 46 00 STI R6; e: 47 00 STI R7;
ive added this to the Blackfin repo, thanks
-mike