Ticket #26881: orc_test.x86.asm

File orc_test.x86.asm, 1.9 KB (added by neverlunch@…, 13 years ago)

backup_convert_fc32_to_int32 x86 asm (orc/orcpowerpc.c)

Line 
1__backup_convert_fc32_to_int32:
2        pushl   %ebp
3        movl    %esp, %ebp
4        pushl   %edi
5        pushl   %esi
6        pushl   %ebx
7        subl    $32, %esp
8        movl    8(%ebp), %eax
9        movl    4(%eax), %edx
10        movl    %edx, -16(%ebp)
11        movl    20(%eax), %edx
12        movl    %edx, -24(%ebp)
13        movl    36(%eax), %eax
14        movl    %eax, -20(%ebp)
15        movl    -16(%ebp), %esi
16        testl   %esi, %esi
17        jle     L1148
18        xorl    %ebx, %ebx
19        jmp     L1127
20        .align 4,0x90
21L1140:
22        movl    %edx, -40(%ebp)
23        cvttss2si       -28(%ebp), %ecx
24        movl    %ecx, %eax
25        cmpl    $-2147483648, %ecx
26        je      L1150
27L1145:
28        movl    %ecx, -36(%ebp)
29        movl    %eax, %edx
30        sall    $16, %edx
31        movzwl  -40(%ebp), %eax
32        orl     %edx, %eax
33        movl    -24(%ebp), %edx
34        movl    %eax, (%edx,%ebx,4)
35        incl    %ebx
36        cmpl    -16(%ebp), %ebx
37        je      L1148
38L1127:
39        movl    -20(%ebp), %eax
40        movl    (%eax,%ebx,8), %esi
41        movl    4(%eax,%ebx,8), %edi
42        movl    %esi, %eax
43        andl    $2139095040, %eax
44        cmpl    $1, %eax
45        sbbl    %edx, %edx
46        andl    $-8388607, %edx
47        decl    %edx
48        andl    %esi, %edx
49        leal    LC0-"L00000000006$pb"(%ebx), %eax
50        movd    (%eax), %xmm0
51        movl    %edx, -44(%ebp)
52        movss   -44(%ebp), %xmm1
53        mulss   %xmm0, %xmm1
54        movss   %xmm1, -44(%ebp)
55        movl    -44(%ebp), %edx
56        movl    %edx, %eax
57        andl    $2139095040, %eax
58        cmpl    $1, %eax
59        sbbl    %eax, %eax
60        andl    $-8388607, %eax
61        decl    %eax
62        andl    %edx, %eax
63        movl    %eax, -32(%ebp)
64        movl    %edi, %eax
65        andl    $2139095040, %eax
66        cmpl    $1, %eax
67        sbbl    %edx, %edx
68        andl    $-8388607, %edx
69        decl    %edx
70        andl    %edi, %edx
71        movl    %edx, -44(%ebp)
72        movss   -44(%ebp), %xmm1
73        mulss   %xmm0, %xmm1
74        movss   %xmm1, -44(%ebp)
75        movl    -44(%ebp), %edx
76        movl    %edx, %eax
77        andl    $2139095040, %eax
78        cmpl    $1, %eax
79        sbbl    %eax, %eax
80        andl    $-8388607, %eax
81        leal    -1(%eax), %esi
82        andl    %edx, %esi
83        movl    %esi, -28(%ebp)
84        cvttss2si       -32(%ebp), %edx
85        cmpl    $-2147483648, %edx
86        jne     L1140
87        movl    -32(%ebp), %ecx
88        testl   %ecx, %ecx
89        movl    $2147483647, %eax
90        cmovns  %eax, %edx
91        jmp     L1140
92        .align 4,0x90
93L1150:
94        testl   %esi, %esi
95        movl    $2147483647, %eax
96        cmovns  %eax, %ecx
97        sarl    $31, %esi
98        movl    %esi, %eax
99        notl    %eax
100        jmp     L1145
101L1148:
102        addl    $32, %esp
103        popl    %ebx
104        popl    %esi
105        popl    %edi
106        leave
107        ret