--- zzzz-none-000/linux-3.10.107/arch/h8300/lib/memset.S 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/h8300/lib/memset.S 2021-02-04 17:41:59.000000000 +0000 @@ -2,21 +2,22 @@ #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(memset) +.global memset +.global clear_user ;;void *memset(*ptr, int c, size_t count) ;; ptr = er0 ;; c = er1(r1l) ;; count = er2 -SYMBOL_NAME_LABEL(memset) +memset: btst #0,r0l beq 2f @@ -33,11 +34,11 @@ cmp.l #4,er2 blo 4f ;; count>=4 -> count/4 -#if defined(__H8300H__) +#if defined(CONFIG_CPU_H8300H) shlr.l er2 shlr.l er2 #endif -#if defined(__H8300S__) +#if defined(CONFIG_CPU_H8S) shlr.l #2,er2 #endif ;; byte -> long @@ -59,3 +60,10 @@ bne 5b 6: rts + +clear_user: + mov.l er1, er2 + sub.l er1, er1 + bra memset + + .end