Commit 0a1cd99d authored by Patrice Mandin's avatar Patrice Mandin

Also save/restore fpu register in vbl interrupt

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402198
parent b894bd1a
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
#include "SDL_vbltimer_s.h" #include "SDL_vbltimer_s.h"
/* from audio/mint */
void SDL_MintAudio_CheckFpu(void);
/* The first ticks value of the application */ /* The first ticks value of the application */
static Uint32 start; static Uint32 start;
static SDL_bool supervisor; static SDL_bool supervisor;
...@@ -119,6 +122,8 @@ int SDL_SYS_TimerInit(void) ...@@ -119,6 +122,8 @@ int SDL_SYS_TimerInit(void)
supervisor=SDL_FALSE; supervisor=SDL_FALSE;
SDL_MintAudio_CheckFpu();
/* Install RunTimer in vbl vector */ /* Install RunTimer in vbl vector */
oldpile=(void *)Super(0); oldpile=(void *)Super(0);
timer_installed = !SDL_AtariVblInstall(RunTimer); timer_installed = !SDL_AtariVblInstall(RunTimer);
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
.globl _SDL_AtariVblInstall .globl _SDL_AtariVblInstall
.globl _SDL_AtariVblUninstall .globl _SDL_AtariVblUninstall
.globl _SDL_MintAudio_hasfpu
/*--- Vector installer ---*/ /*--- Vector installer ---*/
_SDL_AtariVblInstall: _SDL_AtariVblInstall:
...@@ -113,8 +115,30 @@ _my_vbl: ...@@ -113,8 +115,30 @@ _my_vbl:
notw vbl_mutex notw vbl_mutex
moveml d0-d7/a0-a6,sp@- 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 movel my_vector,a0
jsr 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 moveml sp@+,d0-d7/a0-a6
clrw vbl_mutex clrw vbl_mutex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment