* [PATCH] Blackfin arch: Fix decoding of opcodes 41-47 in decode_instruction()
@ 2010-01-08 19:06 Roel Kluin
2010-01-09 7:13 ` Mike Frysinger
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2010-01-08 19:06 UTC (permalink / raw)
To: Mike Frysinger, uclinux-dist-devel, Andrew Morton, LKML
This condition allowed only decoding of opcode 0x0040
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
arch/blackfin/kernel/traps.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Found with static code analysis. Correct?
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index d3cbcd6..870d74b 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Blackfin arch: Fix decoding of opcodes 41-47 in decode_instruction()
2010-01-08 19:06 [PATCH] Blackfin arch: Fix decoding of opcodes 41-47 in decode_instruction() Roel Kluin
@ 2010-01-09 7:13 ` Mike Frysinger
0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2010-01-09 7:13 UTC (permalink / raw)
To: Roel Kluin; +Cc: uclinux-dist-devel, Andrew Morton, LKML
On Fri, Jan 8, 2010 at 14:06, Roel Kluin wrote:
> This condition allowed only decoding of opcode 0x0040
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-09 7:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08 19:06 [PATCH] Blackfin arch: Fix decoding of opcodes 41-47 in decode_instruction() Roel Kluin
2010-01-09 7:13 ` Mike Frysinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.