diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-04-20 13:27:48 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-04-20 13:27:48 +0000 |
commit | 32eadeb2503fd632f1a78c0b3ac9fcc64d6cd3c4 (patch) | |
tree | e63003af28b3d394648affabb4b244595d9f11d5 | |
parent | 2010-04-20 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-32eadeb2503fd632f1a78c0b3ac9fcc64d6cd3c4.tar.bz2 |
2010-04-20 Allan Hessenflow <allanh@kallisti.com>
* cpu_asm.S: L0-L3 were part of the interrupt context, but as
Mike Frysinger noted they were not being zeroed before calling
the C handlers. A patch that corrects this, as well as improving
some of the push/pop order to avoid stalls.
-rw-r--r-- | cpukit/score/cpu/bfin/ChangeLog | 7 | ||||
-rw-r--r-- | cpukit/score/cpu/bfin/cpu_asm.S | 28 |
2 files changed, 26 insertions, 9 deletions
diff --git a/cpukit/score/cpu/bfin/ChangeLog b/cpukit/score/cpu/bfin/ChangeLog index 14bd10ba49..e7c04fa420 100644 --- a/cpukit/score/cpu/bfin/ChangeLog +++ b/cpukit/score/cpu/bfin/ChangeLog @@ -1,3 +1,10 @@ +2010-04-20 Allan Hessenflow <allanh@kallisti.com> + + * cpu_asm.S: L0-L3 were part of the interrupt context, but as + Mike Frysinger noted they were not being zeroed before calling + the C handlers. A patch that corrects this, as well as improving + some of the push/pop order to avoid stalls. + 2010-04-17 Allan Hessenflow <allanh@kallisti.com> * cpu.c, cpu_asm.S, rtems/score/cpu.h: Fine tune registers saved in the diff --git a/cpukit/score/cpu/bfin/cpu_asm.S b/cpukit/score/cpu/bfin/cpu_asm.S index 7180c635fc..8f80e82ae1 100644 --- a/cpukit/score/cpu/bfin/cpu_asm.S +++ b/cpukit/score/cpu/bfin/cpu_asm.S @@ -383,10 +383,10 @@ vectorIDLoop: [--sp] = r3; [--sp] = p3; [--sp] = p2; - [--sp] = lt1; - [--sp] = lt0; [--sp] = lc1; [--sp] = lc0; + [--sp] = lt1; + [--sp] = lt0; [--sp] = lb1; [--sp] = lb0; [--sp] = i3; @@ -406,8 +406,13 @@ vectorIDLoop: [--sp] = b1; [--sp] = b0; [--sp] = rets; - r1 = fp; /* is this really what should be passed here? */ /* call user isr; r0 = vector number, r1 = frame pointer */ + r1 = fp; /* is this really what should be passed here? */ + r2 = 0; + l0 = r2; + l1 = r2; + l2 = r2; + l3 = r2; sp += -12; /* bizarre abi... */ call (p0); sp += 12; @@ -430,10 +435,10 @@ vectorIDLoop: i3 = [sp++]; lb0 = [sp++]; lb1 = [sp++]; - lc0 = [sp++]; - lc1 = [sp++]; lt0 = [sp++]; lt1 = [sp++]; + lc0 = [sp++]; + lc1 = [sp++]; p2 = [sp++]; p3 = [sp++]; r3 = [sp++]; @@ -515,10 +520,10 @@ __ISR15_Handler: [--sp] = p2; [--sp] = p1; [--sp] = p0; - [--sp] = lt1; - [--sp] = lt0; [--sp] = lc1; [--sp] = lc0; + [--sp] = lt1; + [--sp] = lt0; [--sp] = lb1; [--sp] = lb0; [--sp] = i3; @@ -537,6 +542,11 @@ __ISR15_Handler: [--sp] = b2; [--sp] = b1; [--sp] = b0; + r2 = 0; + l0 = r2; + l1 = r2; + l2 = r2; + l3 = r2; sp += -12; /* bizarre abi... */ call __Thread_Dispatch; sp += 12; @@ -558,10 +568,10 @@ __ISR15_Handler: i3 = [sp++]; lb0 = [sp++]; lb1 = [sp++]; - lc0 = [sp++]; - lc1 = [sp++]; lt0 = [sp++]; lt1 = [sp++]; + lc0 = [sp++]; + lc1 = [sp++]; p0 = [sp++]; p1 = [sp++]; p2 = [sp++]; |