1 .file "shr_Xsig.S"
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #include "fpu_asm.h"
22
23 .text
24 .align 2,144
25
26 .globl _shr_Xsig
27 _shr_Xsig:
28 push %ebp
29 movl %esp,%ebp
30 pushl %esi
31 movl PARAM2,%ecx
32 movl PARAM1,%esi
33 cmpl $32,%ecx
34 jnc L_more_than_31
35
36
37 pushl %ebx
38 movl (%esi),%eax
39 movl 4(%esi),%ebx
40 movl 8(%esi),%edx
41 shrd %cl,%ebx,%eax
42 shrd %cl,%edx,%ebx
43 shr %cl,%edx
44 movl %eax,(%esi)
45 movl %ebx,4(%esi)
46 movl %edx,8(%esi)
47 popl %ebx
48 popl %esi
49 leave
50 ret
51
52 L_more_than_31:
53 cmpl $64,%ecx
54 jnc L_more_than_63
55
56 subb $32,%cl
57 movl 4(%esi),%eax
58 movl 8(%esi),%edx
59 shrd %cl,%edx,%eax
60 shr %cl,%edx
61 movl %eax,(%esi)
62 movl %edx,4(%esi)
63 movl $0,8(%esi)
64 popl %esi
65 leave
66 ret
67
68 L_more_than_63:
69 cmpl $96,%ecx
70 jnc L_more_than_95
71
72 subb $64,%cl
73 movl 8(%esi),%eax
74 shr %cl,%eax
75 xorl %edx,%edx
76 movl %eax,(%esi)
77 movl %edx,4(%esi)
78 movl %edx,8(%esi)
79 popl %esi
80 leave
81 ret
82
83 L_more_than_95:
84 xorl %eax,%eax
85 movl %eax,(%esi)
86 movl %eax,4(%esi)
87 movl %eax,8(%esi)
88 popl %esi
89 leave
90 ret