comparison src/timer/mint/SDL_vbltimer.S @ 2052:eb5e61b72da3

Also save/restore fpu register in vbl interrupt
author Patrice Mandin <patmandin@gmail.com>
date Sat, 21 Oct 2006 18:56:35 +0000
parents c9b51268668f
children b42abf0a50bc
comparison
equal deleted inserted replaced
2051:c03f1446e897 2052:eb5e61b72da3
30 30
31 .text 31 .text
32 32
33 .globl _SDL_AtariVblInstall 33 .globl _SDL_AtariVblInstall
34 .globl _SDL_AtariVblUninstall 34 .globl _SDL_AtariVblUninstall
35
36 .globl _SDL_MintAudio_hasfpu
35 37
36 /*--- Vector installer ---*/ 38 /*--- Vector installer ---*/
37 39
38 _SDL_AtariVblInstall: 40 _SDL_AtariVblInstall:
39 movel sp@(4),my_vector 41 movel sp@(4),my_vector
111 tstw vbl_mutex 113 tstw vbl_mutex
112 bnes vbl_end 114 bnes vbl_end
113 notw vbl_mutex 115 notw vbl_mutex
114 116
115 moveml d0-d7/a0-a6,sp@- 117 moveml d0-d7/a0-a6,sp@-
118
119 /* Save FPU if needed */
120 tstw _SDL_MintAudio_hasfpu
121 beqs SDL_AtariVbl_nofpu1
122 .chip 68060
123 fsave sp@-
124 fmoveml fpcr/fpsr/fpiar,sp@-
125 fmovemx fp0-fp7,sp@-
126 .chip 68000
127 SDL_AtariVbl_nofpu1:
128
116 movel my_vector,a0 129 movel my_vector,a0
117 jsr a0@ 130 jsr a0@
131
132 /* Restore FPU if needed */
133 tstw _SDL_MintAudio_hasfpu
134 beqs SDL_AtariVbl_Xbios_nofpu2
135 .chip 68060
136 fmovemx sp@+,fp0-fp7
137 fmoveml sp@+,fpcr/fpsr/fpiar
138 frestore sp@+
139 .chip 68000
140 SDL_AtariVbl_Xbios_nofpu2:
141
118 moveml sp@+,d0-d7/a0-a6 142 moveml sp@+,d0-d7/a0-a6
119 143
120 clrw vbl_mutex 144 clrw vbl_mutex
121 vbl_end: 145 vbl_end:
122 rts 146 rts