1/* 2Copyright (c) 1990 The Regents of the University of California. 3All rights reserved. 4 5Redistribution and use in source and binary forms are permitted 6provided that the above copyright notice and this paragraph are 7duplicated in all such forms and that any documentation, 8and/or other materials related to such 9distribution and use acknowledge that the software was developed 10by the University of California, Berkeley. The name of the 11University may not be used to endorse or promote products derived 12from this software without specific prior written permission. 13THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16 */ 17#include <picolibc.h> 18 19 .file "strlen.S" 20 21 .section .text 22 .global _strlen 23 .type _strlen,@function 24_strlen: 25 movm [d2,d3,a2,a3],(sp) 26.Lend_of_prologue: 27 mov d0,a0 28 mov a0,a2 29#ifndef __OPTIMIZE_SIZE__ 30 btst 3,d0 31 bne .L21 32 mov (a0),d0 33 mov -16843009,a1 34 mov a1,d1 35 add d0,d1 36 not d0 37 and d0,d1 38 mov -2139062144,d2 39 btst -2139062144,d1 40 bne .L21 41 setlb 42 inc4 a0 43 mov (a0),d0 44 mov a1,d1 45 add d0,d1 46 not d0 47 and d0,d1 48 and d2,d1 49 leq 50 jmp .L21 51#endif 52.L19: 53 inc a0 54.L21: 55 movbu (a0),d3 56 cmp 0,d3 57 bne .L19 58 sub a2,a0 59 mov a0,d0 60.Lepilogue: 61 ret [d2,d3,a2,a3],16 62.Lend_of_strlen: 63 .size _strlen, .Lend_of_strlen - _strlen 64 65 .section .debug_frame,"",@progbits 66.Lstart_of_debug_frame: 67 # Common Information Entry (CIE) 68 .4byte .Lend_of_CIE - .Lstart_of_CIE # CIE Length 69.Lstart_of_CIE: 70 .4byte 0xffffffff # CIE Identifier Tag 71 .byte 0x1 # CIE Version 72 .ascii "\0" # CIE Augmentation 73 .uleb128 0x1 # CIE Code Alignment Factor 74 .sleb128 -4 # CIE Data Alignment Factor 75 .byte 0x32 # CIE RA Column 76 .byte 0xc # DW_CFA_def_cfa 77 .uleb128 0x9 78 .uleb128 0x0 79 .byte 0xb2 # DW_CFA_offset, column 0x32 80 .uleb128 0x0 81 .align 2 82.Lend_of_CIE: 83 84 # Frame Description Entry (FDE) 85 .4byte .Lend_of_FDE - .Lstart_of_FDE # FDE Length 86.Lstart_of_FDE: 87 .4byte .Lstart_of_debug_frame # FDE CIE offset 88 .4byte _strlen # FDE initial location 89 .4byte .Lend_of_strlen - _strlen # FDE address range 90 .byte 0x4 # DW_CFA_advance_loc4 91 .4byte .Lend_of_prologue - _strlen 92 .byte 0xe # DW_CFA_def_cfa_offset 93 .uleb128 0x4 94 .byte 0x87 # DW_CFA_offset, column 0x7 95 .uleb128 0x1 96 .align 2 97.Lend_of_FDE: 98