src/stdlib/SDL_stdlib.c
changeset 2760 02aa80d7905f
parent 2735 204be4fc2726
child 2781 5651642f4a78
--- 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* */