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 "strcmp.S" 20 21 .section .text 22 .global _strcmp 23 .type _strcmp,@function 24_strcmp: 25 movm [d2,d3,a2,a3],(sp) 26.Lend_of_prologue: 27 mov d0,a0 28 mov d1,a1 29#ifndef __OPTIMIZE_SIZE__ 30 or d1,d0 31 btst 3,d0 32 bne .L11 33 mov (a0),d1 34 mov (a1),d0 35 cmp d0,d1 36 bne .L11 37 mov -16843009,d3 38 setlb 39 mov (a0),d0 40 mov d3,d1 41 add d0,d1 42 not d0 43 and d0,d1 44 and -2139062144,d1 45 beq .L6 46 clr d0 47 jmp .Lepilogue 48.L6: 49 inc4 a0 50 inc4 a1 51 mov (a0),d1 52 mov (a1),d0 53 cmp d0,d1 54 leq 55.L11: 56#endif 57 setlb 58 movbu (a1),d2 59 movbu (a0),d0 60 cmp 0,d0 61 beq .L9 62 cmp d2,d0 63 bne .L9 64 inc a0 65 inc a1 66 lra 67.L9: 68 sub d2,d0 69.Lepilogue: 70 ret [d2,d3,a2,a3],16 71.Lend_of_strcmp: 72 .size _strcmp, .Lend_of_strcmp - _strcmp 73 74 .section .debug_frame,"",@progbits 75.Lstart_of_debug_frame: 76 # Common Information Entry (CIE) 77 .4byte .Lend_of_CIE - .Lstart_of_CIE # CIE Length 78.Lstart_of_CIE: 79 .4byte 0xffffffff # CIE Identifier Tag 80 .byte 0x1 # CIE Version 81 .ascii "\0" # CIE Augmentation 82 .uleb128 0x1 # CIE Code Alignment Factor 83 .sleb128 -4 # CIE Data Alignment Factor 84 .byte 0x32 # CIE RA Column 85 .byte 0xc # DW_CFA_def_cfa 86 .uleb128 0x9 87 .uleb128 0x0 88 .byte 0xb2 # DW_CFA_offset, column 0x32 89 .uleb128 0x0 90 .align 2 91.Lend_of_CIE: 92 93 # Frame Description Entry (FDE) 94 .4byte .Lend_of_FDE - .Lstart_of_FDE # FDE Length 95.Lstart_of_FDE: 96 .4byte .Lstart_of_debug_frame # FDE CIE offset 97 .4byte _strcmp # FDE initial location 98 .4byte .Lend_of_strcmp - _strcmp # FDE address range 99 .byte 0x4 # DW_CFA_advance_loc4 100 .4byte .Lend_of_prologue - _strcmp 101 .byte 0xe # DW_CFA_def_cfa_offset 102 .uleb128 0x4 103 .byte 0x87 # DW_CFA_offset, column 0x7 104 .uleb128 0x1 105 .align 2 106.Lend_of_FDE: 107