src/stdlib/SDL_stdlib.c
changeset 2760 02aa80d7905f
parent 2735 204be4fc2726
child 2781 5651642f4a78
     1.1 --- a/src/stdlib/SDL_stdlib.c	Mon Sep 15 06:49:23 2008 +0000
     1.2 +++ b/src/stdlib/SDL_stdlib.c	Mon Sep 15 07:34:36 2008 +0000
     1.3 @@ -640,6 +640,33 @@
     1.4  
     1.5  void
     1.6  __declspec(naked)
     1.7 +_allshr()
     1.8 +{
     1.9 +    /* *INDENT-OFF* */
    1.10 +    __asm {
    1.11 +        cmp         cl,40h
    1.12 +        jae         RETZERO
    1.13 +        cmp         cl,20h
    1.14 +        jae         MORE32
    1.15 +        shrd        eax,edx,cl
    1.16 +        sar         edx,cl
    1.17 +        ret
    1.18 +MORE32:
    1.19 +        mov         eax,edx
    1.20 +        xor         edx,edx
    1.21 +        and         cl,1Fh
    1.22 +        sar         eax,cl
    1.23 +        ret
    1.24 +RETZERO:
    1.25 +        xor         eax,eax
    1.26 +        xor         edx,edx
    1.27 +        ret
    1.28 +    }
    1.29 +    /* *INDENT-ON* */
    1.30 +}
    1.31 +
    1.32 +void
    1.33 +__declspec(naked)
    1.34  _aullshr()
    1.35  {
    1.36      /* *INDENT-OFF* */