diff src/stdlib/SDL_stdlib.c @ 2760:02aa80d7905f

Updated Visual C++ build
author Sam Lantinga <slouken@libsdl.org>
date Mon, 15 Sep 2008 07:34:36 +0000
parents 204be4fc2726
children 5651642f4a78
line wrap: on
line diff
--- a/src/stdlib/SDL_stdlib.c	Mon Sep 15 06:49:23 2008 +0000
+++ b/src/stdlib/SDL_stdlib.c	Mon Sep 15 07:34:36 2008 +0000
@@ -640,6 +640,33 @@
 
 void
 __declspec(naked)
+_allshr()
+{
+    /* *INDENT-OFF* */
+    __asm {
+        cmp         cl,40h
+        jae         RETZERO
+        cmp         cl,20h
+        jae         MORE32
+        shrd        eax,edx,cl
+        sar         edx,cl
+        ret
+MORE32:
+        mov         eax,edx
+        xor         edx,edx
+        and         cl,1Fh
+        sar         eax,cl
+        ret
+RETZERO:
+        xor         eax,eax
+        xor         edx,edx
+        ret
+    }
+    /* *INDENT-ON* */
+}
+
+void
+__declspec(naked)
 _aullshr()
 {
     /* *INDENT-OFF* */