123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- .file "round_Xsig.S"
- #include "fpu_emu.h"
- .text
- ENTRY(round_Xsig)
- pushl %ebp
- movl %esp,%ebp
- pushl %ebx
- pushl %ebx
- pushl %esi
- movl PARAM1,%esi
- movl 8(%esi),%edx
- movl 4(%esi),%ebx
- movl (%esi),%eax
- movl $0,-4(%ebp)
- orl %edx,%edx
- js L_round
- jnz L_shift_1
- movl %ebx,%edx
- movl %eax,%ebx
- xorl %eax,%eax
- movl $-32,-4(%ebp)
- L_shift_1:
- bsrl %edx,%ecx
- subl $31,%ecx
- negl %ecx
- subl %ecx,-4(%ebp)
- shld %cl,%ebx,%edx
- shld %cl,%eax,%ebx
- shl %cl,%eax
- L_round:
- testl $0x80000000,%eax
- jz L_exit
- addl $1,%ebx
- adcl $0,%edx
- jnz L_exit
- movl $0x80000000,%edx
- incl -4(%ebp)
- L_exit:
- movl %edx,8(%esi)
- movl %ebx,4(%esi)
- movl %eax,(%esi)
- movl -4(%ebp),%eax
- popl %esi
- popl %ebx
- leave
- ret
- ENTRY(norm_Xsig)
- pushl %ebp
- movl %esp,%ebp
- pushl %ebx
- pushl %ebx
- pushl %esi
- movl PARAM1,%esi
- movl 8(%esi),%edx
- movl 4(%esi),%ebx
- movl (%esi),%eax
- movl $0,-4(%ebp)
- orl %edx,%edx
- js L_n_exit
- jnz L_n_shift_1
- movl %ebx,%edx
- movl %eax,%ebx
- xorl %eax,%eax
- movl $-32,-4(%ebp)
- orl %edx,%edx
- js L_n_exit
- jnz L_n_shift_1
- movl %ebx,%edx
- movl %eax,%ebx
- xorl %eax,%eax
- addl $-32,-4(%ebp)
- jmp L_n_exit
- L_n_shift_1:
- bsrl %edx,%ecx
- subl $31,%ecx
- negl %ecx
- subl %ecx,-4(%ebp)
- shld %cl,%ebx,%edx
- shld %cl,%eax,%ebx
- shl %cl,%eax
- L_n_exit:
- movl %edx,8(%esi)
- movl %ebx,4(%esi)
- movl %eax,(%esi)
- movl -4(%ebp),%eax
- popl %esi
- popl %ebx
- leave
- ret
|