[Vesautils-devel] CVS: vesautils/libvbe vbe.c,1.3,1.4

Alex Beregszaszi alex at mplayerhq.hu
Sun Dec 4 15:07:40 CET 2005


Update of /cvsroot/vesautils/vesautils/libvbe
In directory mail:/var2/tmp/cvs-serv17030

Modified Files:
	vbe.c 
Log Message:
Fixing asm inline code which crashed when used as a shared library. Patch by Tomas Janousek

Index: vbe.c
===================================================================
RCS file: /cvsroot/vesautils/vesautils/libvbe/vbe.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- vbe.c	12 Aug 2005 17:53:54 -0000	1.3
+++ vbe.c	4 Dec 2005 14:07:37 -0000	1.4
@@ -525,9 +525,10 @@
      __asm __volatile(
 	"pushl	%%ebx\n"
 	"movl	%1, %%ebx\n"
-	::"a"(0x4f05),"S"(win_num & 0x0f),"d"(win_gran):"memory");
-    (*vbe_pm_info.SetWindowCall)();
-    __asm __volatile("popl	%%ebx":::"memory");
+	"call	*%2\n"
+	"popl	%%ebx"
+	::"a"(0x4f05),"S"(win_num & 0x0f),"D"(vbe_pm_info.SetWindowCall),
+	"d"(win_gran):"memory");
     retval = VBE_OK;
   }
   else
@@ -637,10 +638,10 @@
      __asm __volatile(
 	"pushl	%%ebx\n"
 	"movl	%1, %%ebx\n"
-	::"a"(0x4f07),"S"(vsync ? 0x80 : 0),
+	"call	*%2\n"
+	"popl	%%ebx\n"
+	::"a"(0x4f07),"S"(vsync ? 0x80 : 0),"D"(vbe_pm_info.SetDisplayStart),
 	  "c"((offset>>2) & 0xffff),"d"((offset>>18)&0xffff):"memory");
-    (*vbe_pm_info.SetDisplayStart)();
-    __asm __volatile("popl	%%ebx":::"memory");
     retval = VBE_OK;
   }
   else




More information about the Vesautils-devel mailing list