source: trunk/libs/newlib/src/newlib/libc/machine/mn10300/strlen.S @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.6 KB
Line 
1        .file "strlen.S"
2
3        .section .text
4        .global _strlen
5        .type    _strlen,@function
6_strlen:
7        movm [d2,d3,a2,a3],(sp)
8.Lend_of_prologue:
9        mov d0,a0
10        mov a0,a2
11#ifndef __OPTIMIZE_SIZE__
12        btst 3,d0
13        bne .L21
14        mov (a0),d0
15        mov -16843009,a1
16        mov a1,d1
17        add d0,d1
18        not d0
19        and d0,d1
20        mov -2139062144,d2
21        btst -2139062144,d1
22        bne .L21
23        setlb
24        inc4 a0
25        mov (a0),d0
26        mov a1,d1
27        add d0,d1
28        not d0
29        and d0,d1
30        and d2,d1
31        leq
32        jmp .L21
33#endif
34.L19:
35        inc a0
36.L21:
37        movbu (a0),d3
38        cmp 0,d3
39        bne .L19
40        sub a2,a0
41        mov a0,d0
42.Lepilogue:
43        ret [d2,d3,a2,a3],16
44.Lend_of_strlen:
45        .size    _strlen, .Lend_of_strlen - _strlen
46
47        .section        .debug_frame,"",@progbits
48.Lstart_of_debug_frame:
49        # Common Information Entry (CIE)
50        .4byte  .Lend_of_CIE - .Lstart_of_CIE   # CIE Length
51.Lstart_of_CIE:
52        .4byte   0xffffffff                     # CIE Identifier Tag
53        .byte    0x1                            # CIE Version
54        .ascii   "\0"                           # CIE Augmentation
55        .uleb128 0x1                            # CIE Code Alignment Factor
56        .sleb128 -4                             # CIE Data Alignment Factor
57        .byte    0x32                           # CIE RA Column
58        .byte    0xc                            # DW_CFA_def_cfa
59        .uleb128 0x9
60        .uleb128 0x0
61        .byte    0xb2                           # DW_CFA_offset, column 0x32
62        .uleb128 0x0
63        .align   2
64.Lend_of_CIE:
65       
66        # Frame Description Entry (FDE)
67        .4byte  .Lend_of_FDE - .Lstart_of_FDE   # FDE Length
68.Lstart_of_FDE:
69        .4byte   .Lstart_of_debug_frame         # FDE CIE offset
70        .4byte   _strlen                        # FDE initial location
71        .4byte   .Lend_of_strlen - _strlen      # FDE address range
72        .byte    0x4                            # DW_CFA_advance_loc4
73        .4byte   .Lend_of_prologue - _strlen
74        .byte    0xe                            # DW_CFA_def_cfa_offset
75        .uleb128 0x4
76        .byte    0x87                           # DW_CFA_offset, column 0x7
77        .uleb128 0x1
78        .align 2
79.Lend_of_FDE:
Note: See TracBrowser for help on using the repository browser.