]>
Commit | Line | Data |
---|---|---|
3402aac7 | 1 | #------------------------------------------------------------------------------\r |
1e57a462 | 2 | #\r |
3 | # Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r | |
4 | #\r | |
5 | # This program and the accompanying materials\r | |
6 | # are licensed and made available under the terms and conditions of the BSD License\r | |
7 | # which accompanies this distribution. The full text of the license may be found at\r | |
8 | # http://opensource.org/licenses/bsd-license.php\r | |
9 | #\r | |
10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | #\r | |
13 | #------------------------------------------------------------------------------\r | |
14 | \r | |
15 | .text\r | |
16 | .align 2\r | |
17 | GCC_ASM_EXPORT(__clzsi2)\r | |
18 | \r | |
19 | ASM_PFX(__clzsi2):\r | |
20 | @ frame_needed = 1, uses_anonymous_args = 0\r | |
21 | stmfd sp!, {r7, lr}\r | |
22 | add r7, sp, #0\r | |
23 | movs r3, r0, lsr #16\r | |
24 | movne r3, #16\r | |
25 | moveq r3, #0\r | |
26 | movne r9, #0\r | |
27 | moveq r9, #16\r | |
28 | mov r3, r0, lsr r3\r | |
29 | tst r3, #65280\r | |
30 | movne r0, #8\r | |
31 | moveq r0, #0\r | |
32 | movne lr, #0\r | |
33 | moveq lr, #8\r | |
34 | mov r3, r3, lsr r0\r | |
35 | tst r3, #240\r | |
36 | movne r0, #4\r | |
37 | moveq r0, #0\r | |
38 | movne ip, #0\r | |
39 | moveq ip, #4\r | |
40 | mov r3, r3, lsr r0\r | |
41 | tst r3, #12\r | |
42 | movne r0, #2\r | |
43 | moveq r0, #0\r | |
44 | movne r1, #0\r | |
45 | moveq r1, #2\r | |
46 | mov r2, r3, lsr r0\r | |
47 | add r3, lr, r9\r | |
48 | add r0, r3, ip\r | |
49 | add r1, r0, r1\r | |
50 | mov r0, r2, lsr #1\r | |
51 | eor r0, r0, #1\r | |
52 | ands r0, r0, #1\r | |
53 | mvnne r0, #0\r | |
54 | rsb r3, r2, #2\r | |
55 | and r0, r0, r3\r | |
56 | add r0, r1, r0\r | |
57 | ldmfd sp!, {r7, pc}\r |