Ticket #267: rtems-ss-20020301-m68k-cpu_asm.diff

File rtems-ss-20020301-m68k-cpu_asm.diff, 2.3 KB (added by brett.swimley, on Dec 3, 2006 at 1:31:13 PM)

rtems-ss-20020301-m68k-cpu_asm.diff

Line 
1*** rtems-ss-20020301/c/src/exec/score/cpu/m68k/cpu_asm.S       Thu Aug  9 15:04:29 2001
2--- /home/bretts/rtems-4.5.0/tools/rtems-ss-20020301/c/src/exec/score/cpu/m68k/cpu_asm.S        Fri Apr 19 13:47:51 2002
3***************
4*** 139,144 ****
5--- 139,146 ----
6 
7 
8  #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
9+       tstl    SYM (_ISR_Nest_level)   | Interrupting an interrupt handler?
10+       bne     2f                      | Yes, just skip over stack switch code
11        movel   _CPU_Interrupt_stack_high,a0    | a0 now point just above interrupt stack
12        cmpl    _CPU_Interrupt_stack_low,a7     | stack below interrupt stack?
13        bcs.b   1f                      | yes, switch to interrupt stack
14***************
15*** 151,156 ****
16--- 153,160 ----
17  2:
18  #endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
19 
20+       addql   #1,SYM(_ISR_Nest_level) | one nest level deeper
21+         
22          movel   SYM (_ISR_Vector_table),a0 | a0= base of RTEMS table
23  #if ( M68K_HAS_PREINDEXING == 1 )
24          movel   (a0,d0:w:1),a0           | a0 = address of user routine
25***************
26*** 165,178 ****
27          addql   #4,a7                    | remove vector number
28 
29  #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
30        movel   _CPU_Interrupt_stack_high,a0
31        subql   #4,a0
32        cmpl    a0,a7                   | At top of interrupt stack?
33        bne.b   1f                      | No, do not restore task stack pointer
34        movel   (a7),a7                 | Restore task stack pointer
35  1:
36  #endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
37-
38          subql   #1,SYM (_Thread_Dispatch_disable_level)
39                                           | unnest multitasking
40          bne.b    exit                    | If dispatch disabled, exit
41--- 169,185 ----
42          addql   #4,a7                    | remove vector number
43 
44  #if ( CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 )
45+       subql   #1,SYM(_ISR_Nest_level) | Reduce interrupt-nesting count
46+       bne     1f                      | Skip if return to interrupt
47        movel   _CPU_Interrupt_stack_high,a0
48        subql   #4,a0
49        cmpl    a0,a7                   | At top of interrupt stack?
50        bne.b   1f                      | No, do not restore task stack pointer
51        movel   (a7),a7                 | Restore task stack pointer
52  1:
53+ #else
54+       subql   #1,SYM (_ISR_Nest_level) | one less nest level
55  #endif /* CPU_HAS_SOFTWARE_INTERRUPT_STACK == 1 */
56          subql   #1,SYM (_Thread_Dispatch_disable_level)
57                                           | unnest multitasking
58          bne.b    exit                    | If dispatch disabled, exit