ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/asm_support.s
(Generate patch)

Comparing BasiliskII/src/Unix/asm_support.s (file contents):
Revision 1.2 by cebix, 2000-10-11T17:55:05Z vs.
Revision 1.7 by gbeauche, 2005-01-30T21:42:14Z

# Line 1 | Line 1
1   /*
2 < *  asm_support.s - Utility functions in assemmbly language (for native 68k support)
2 > *  asm_support.s - Utility functions in assembly language (for native 68k support)
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2005 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 27 | Line 27
27                  .globl  _ClearInterruptFlag__FUi
28                  .globl  _Execute68k
29                  .globl  _Execute68kTrap
30                .globl  _Scod060Patch1
31                .globl  _Scod060Patch2
32                .globl  _ThInitFPUPatch
30                  .globl  _EmulOpTrampoline
31  
32                  .globl  _RAMBaseHost
# Line 181 | Line 178 | _EmulOpTrampoline:
178   eot1:           moveml  sp@+,d0-d7/a0-a6        |Restore registers
179                  addql   #4,sp                   |Skip saved SP
180                  rtr
184
185
186 /*
187 *  Process Manager 68060 FPU patches
188 */
189
190                .type   _Scod060Patch1,@function
191 _Scod060Patch1: fsave   sp@-            |Save FPU state
192                tstb    sp@(2)          |Null?
193                beqs    sc1
194                fmovemx fp0-fp7,sp@-    |No, save FPU registers
195                fmovel  fpi,sp@-
196                fmovel  fpsr,sp@-
197                fmovel  fpcr,sp@-
198                pea     -1              |Push "FPU state saved" flag
199 sc1:            movl    d1,sp@-
200                movl    d0,sp@-
201                bsrs    sc3             |Switch integer registers and stack
202                addql   #8,sp
203                tstb    sp@(2)          |New FPU state null or "FPU state saved" flag set?
204                beqs    sc2
205                addql   #4,sp           |Flag set, skip it
206                fmovel  sp@+,fpcr       |Restore FPU registers and state
207                fmovel  sp@+,fpsr
208                fmovel  sp@+,fpi
209                fmovemx sp@+,fp0-fp7
210 sc2:            frestore sp@+
211                movml   sp@+,d0-d1
212                rts
213
214 sc3:            movl    sp@(4),a0       |Switch integer registers and stack
215                movw    sr,sp@-
216                movml   d2-d7/a2-a6,sp@-
217                cmpw    #0,a0
218                beqs    sc4
219                movl    sp,a0@
220 sc4:            movl    sp@(0x36),a0
221                movml   a0@+,d2-d7/a2-a6
222                movw    a0@+,sr
223                movl    a0,sp
224                rts
225
226                .type   _Scod060Patch2,@function
227 _Scod060Patch2: movl    d0,sp@-         |Create 68060 null frame on stack
228                movl    d0,sp@-
229                movl    d0,sp@-
230                frestore sp@+           |and load it
231                rts
232
233
234 /*
235 *  Thread Manager 68060 FPU patches
236 */
237
238                .type   _ThInitFPUPatch,@function
239 _ThInitFPUPatch:
240                tstb    a4@(0x40)
241                bnes    th1
242                moveq   #0,d0           |Create 68060 null frame on stack
243                movl    d0,a3@-
244                movl    d0,a3@-
245                movl    d0,a3@-
246 th1:            rts

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines