|
|
1.1 ! root 1: /* @(#)bcopy.s 4.4 9/25/83 */ ! 2: /* bcopy(from, to, size) */ ! 3: ! 4: #include "DEFS.h" ! 5: ! 6: .globl _bcopy ! 7: _bcopy: ! 8: .word 0x0040 ! 9: #ifdef PROF ! 10: .data; 1:; .long 0; .text; moval 1b,r0; jsb mcount ! 11: #endif PROF ! 12: movl 4(ap),r1 ! 13: movl 8(ap),r3 ! 14: movl 12(ap),r6 ! 15: cmpl r1,r3 ! 16: bgtr 2f # normal forward case ! 17: blss 3f # overlapping, must do backwards ! 18: ret # equal, nothing to do ! 19: 1: ! 20: subl2 r0,r6 ! 21: movc3 r0,(r1),(r3) ! 22: 2: ! 23: movzwl $65535,r0 ! 24: cmpl r6,r0 ! 25: jgtr 1b ! 26: movc3 r6,(r1),(r3) ! 27: ret ! 28: 3: ! 29: addl2 r6,r1 ! 30: addl2 r6,r3 ! 31: movzwl $65535,r0 ! 32: jbr 5f ! 33: 4: ! 34: subl2 r0,r6 ! 35: subl2 r0,r1 ! 36: subl2 r0,r3 ! 37: movc3 r0,(r1),(r3) ! 38: movzwl $65535,r0 ! 39: subl2 r0,r1 ! 40: subl2 r0,r3 ! 41: 5: ! 42: cmpl r6,r0 ! 43: jgtr 4b ! 44: subl2 r6,r1 ! 45: subl2 r6,r3 ! 46: movc3 r6,(r1),(r3) ! 47: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.