From c35ebe6c3fefc179802499f69a219d3a9efadb8a Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 24 Nov 2003 22:39:03 +0000 Subject: Save fs before calling vm86, this might eleminate bugs (if there were any) in cooperation of using vesa with win32 dlls. Patch by Peter Kosinar git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11520 b3059339-0415-0410-9bf9-f77b7e298cf2 --- osdep/lrmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'osdep') diff --git a/osdep/lrmi.c b/osdep/lrmi.c index c04a470f75..8df2cdc3a1 100644 --- a/osdep/lrmi.c +++ b/osdep/lrmi.c @@ -794,14 +794,16 @@ run_vm86(void) { unsigned int vret; sigset_t allsigs, cursigs; - unsigned long oldgs; + unsigned long oldgs, oldfs; while (1) { sigfillset(&allsigs); sigprocmask(SIG_SETMASK, &allsigs, &cursigs); asm volatile ("movl %%gs, %0" : "=g" (oldgs)); + asm volatile ("movl %%fs, %0" : "=g" (oldfs)); vret = lrmi_vm86(&context.vm); + asm volatile ("movl %0, %%fs" :: "g" (oldfs)); asm volatile ("movl %0, %%gs" :: "g" (oldgs)); sigprocmask(SIG_SETMASK, &cursigs, NULL); -- cgit v1.2.3