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