Mercurial > sdl-ios-xcode
diff 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 |
line wrap: on
line diff
--- a/src/timer/mint/SDL_vbltimer.S Fri Oct 20 00:15:18 2006 +0000 +++ b/src/timer/mint/SDL_vbltimer.S Sat Oct 21 18:56:35 2006 +0000 @@ -33,6 +33,8 @@ .globl _SDL_AtariVblInstall .globl _SDL_AtariVblUninstall + .globl _SDL_MintAudio_hasfpu + /*--- Vector installer ---*/ _SDL_AtariVblInstall: @@ -113,8 +115,30 @@ notw vbl_mutex moveml d0-d7/a0-a6,sp@- + + /* Save FPU if needed */ + tstw _SDL_MintAudio_hasfpu + beqs SDL_AtariVbl_nofpu1 + .chip 68060 + fsave sp@- + fmoveml fpcr/fpsr/fpiar,sp@- + fmovemx fp0-fp7,sp@- + .chip 68000 +SDL_AtariVbl_nofpu1: + movel my_vector,a0 jsr a0@ + + /* Restore FPU if needed */ + tstw _SDL_MintAudio_hasfpu + beqs SDL_AtariVbl_Xbios_nofpu2 + .chip 68060 + fmovemx sp@+,fp0-fp7 + fmoveml sp@+,fpcr/fpsr/fpiar + frestore sp@+ + .chip 68000 +SDL_AtariVbl_Xbios_nofpu2: + moveml sp@+,d0-d7/a0-a6 clrw vbl_mutex