diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-29 17:19:16 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-09-29 17:19:16 +0000 |
commit | 11290355c9454c575d56c7928a725fd95e88d6f8 (patch) | |
tree | 1cd5ff063250cff764a59189f1e1956c40925a35 /c/src/exec/score/cpu/m68k/cpu_asm.s | |
parent | new programs added (diff) | |
download | rtems-11290355c9454c575d56c7928a725fd95e88d6f8.tar.bz2 |
all targets compile .. tony's patches in place
Diffstat (limited to 'c/src/exec/score/cpu/m68k/cpu_asm.s')
-rw-r--r-- | c/src/exec/score/cpu/m68k/cpu_asm.s | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/c/src/exec/score/cpu/m68k/cpu_asm.s b/c/src/exec/score/cpu/m68k/cpu_asm.s index 2f0758f33d..fb8ba678b2 100644 --- a/c/src/exec/score/cpu/m68k/cpu_asm.s +++ b/c/src/exec/score/cpu/m68k/cpu_asm.s @@ -59,15 +59,15 @@ restore: movml a0@,d1-d7/a2-a7 | restore context .global SYM (_CPU_Context_save_fp) SYM (_CPU_Context_save_fp): #if ( M68K_HAS_FPU == 1 ) - moval a7@(FPCONTEXT_ARG),a1 | a1 = &ptr to context area - moval a1@,a0 | a0 = Save context area + moval a7@(FPCONTEXT_ARG),a1 | a1 = &ptr to context area + moval a1@,a0 | a0 = Save context area fsave a0@- | save 68881/68882 state frame tstb a0@ | check for a null frame - beq nosv | Yes, skip save of user model - fmovem fp0-fp7,a0@- | save data registers (fp0-fp7) - fmovem fpc/fps/fpi,a0@- | and save control registers + beq nosv | Yes, skip save of user model + fmovem fp0-fp7,a0@- | save data registers (fp0-fp7) + fmovem fpc/fps/fpi,a0@- | and save control registers movl #-1,a0@- | place not-null flag on stack -nosv: movl a0,a1@ | save pointer to saved context +nosv: movl a0,a1@ | save pointer to saved context #endif rts @@ -75,15 +75,15 @@ nosv: movl a0,a1@ | save pointer to saved context .global SYM (_CPU_Context_restore_fp) SYM (_CPU_Context_restore_fp): #if ( M68K_HAS_FPU == 1 ) - moval a7@(FPCONTEXT_ARG),a1 | a1 = &ptr to context area - moval a1@,a0 | a0 = address of saved context + moval a7@(FPCONTEXT_ARG),a1 | a1 = &ptr to context area + moval a1@,a0 | a0 = address of saved context tstb a0@ | Null context frame? - beq norst | Yes, skip fp restore + beq norst | Yes, skip fp restore addql #4,a0 | throwaway non-null flag - fmovem a0@+,fpc/fps/fpi | restore control registers - fmovem a0@+,fp0-fp7 | restore data regs (fp0-fp7) + fmovem a0@+,fpc/fps/fpi | restore control registers + fmovem a0@+,fp0-fp7 | restore data regs (fp0-fp7) norst: frestore a0@+ | restore the fp state frame - movl a0,a1@ | save pointer to saved context + movl a0,a1@ | save pointer to saved context #endif rts @@ -112,6 +112,9 @@ norst: frestore a0@+ | restore the fp state frame * higher priority interrupt in the new context if * permitted by the new interrupt level mask, and (2) when * the original context regains the cpu. + * + * XXX: Code for switching to a software maintained interrupt stack is + * not in place. */ #if ( M68K_HAS_VBR == 1) @@ -134,6 +137,13 @@ SYM (_ISR_Handler): addql #1,SYM (_Thread_Dispatch_disable_level) | disable multitasking moveml d0-d1/a0-a1,a7@- | save d0-d1,a0-a1 +/* + * NOTE FOR CPUs WITHOUT HARDWARE INTERRUPT STACK: + * + * After the interrupted codes registers have been saved, it is save + * to switch to the software maintained interrupt stack. + */ + #if ( M68K_HAS_VBR == 0) movel a7@(SAVED+JSR_OFFSET),d0 | assume the exception table at 0x0000 addql #6,d0 | points to a jump table (jsr) in RAM |