--- zzzz-none-000/linux-3.10.107/arch/h8300/lib/memcpy.S 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/h8300/lib/memcpy.S 2021-02-04 17:41:59.000000000 +0000 @@ -2,22 +2,21 @@ #include -#if defined(__H8300H__) +#if defined(CONFIG_CPU_H8300H) .h8300h #endif -#if defined(__H8300S__) +#if defined(CONFIG_CPU_H8S) .h8300s #endif - .text -.global SYMBOL_NAME(memcpy) +.global memcpy ;;; void *memcpy(void *to, void *from, size_t n) -SYMBOL_NAME_LABEL(memcpy) +memcpy: mov.l er2,er2 bne 1f - rts -1: + rts +1: ;; address check bld #0,r0l bxor #0,r1l @@ -33,26 +32,26 @@ adds #1,er0 dec.l #1,er2 beq 3f -1: +1: ;; n < sizeof(unsigned long) check sub.l er4,er4 adds #4,er4 ; loop count check value cmp.l er4,er2 blo 2f ;; unsigned long copy -1: +1: mov.l @er1,er3 mov.l er3,@er0 adds #4,er0 adds #4,er1 subs #4,er2 cmp.l er4,er2 - bcc 1b + bcc 1b ;; rest -2: +2: mov.l er2,er2 beq 3f -1: +1: mov.b @er1,r3l mov.b r3l,@er0 adds #1,er1 @@ -65,7 +64,7 @@ rts ;; odd <- even / even <- odd -4: +4: mov.l er4,er3 mov.l er2,er4 mov.l er5,er2 @@ -82,3 +81,5 @@ mov.l er2,er5 mov.l er3,er4 rts + + .end