mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
db5ede6f5e
Commite1b5bb6d12
("consolidate cond_syscall and SYSCALL_ALIAS declarations") broke the h8300 build because it removed the duplicate SYMBOL_NAME() macro from arch/h8300/include/asm/linkage.h, and all the h8300 asm files include <asm/linkage.h> instead of <linux/linkage.h>: arch/h8300/kernel/entry.S: Assembler messages: arch/h8300/kernel/entry.S:158: Error: junk at end of line, first unrecognized character is `(' ... arch/h8300/kernel/syscalls.S: Assembler messages: arch/h8300/kernel/syscalls.S:6: Error: junk at end of line, first unrecognized character is `(' ... arch/h8300/lib/abs.S: Assembler messages: arch/h8300/lib/abs.S:12: Error: junk at end of line, first unrecognized character is `(' ... arch/h8300/lib/memcpy.S: Assembler messages: arch/h8300/lib/memcpy.S:13: Error: junk at end of line, first unrecognized character is `(' ... arch/h8300/lib/memset.S: Assembler messages: arch/h8300/lib/memset.S:13: Error: junk at end of line, first unrecognized character is `(' ... Commit126de6b20b
("linkage.h: fix build breakage due to symbol prefix handling") broke it even more, by removing SYMBOL_NAME() and replacing it by __SYMBOL_NAME(). Commitf8ce1faf55
("Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linuxkernel/git/rusty/linux") also removed __SYMBOL_NAME(), hidden in a merge conflict resolution. Hence, replace the use of SYMBOL_NAME() and SYMBOL_NAME_LABEL() in h8300 assembler sources by hardcoding the underscore symbol prefix, like other architectures (blackfin/metag) do. This allows to kill SYMBOL_NAME_LABEL(). Now <asm/linkage.h> becomes empty, and h8300 can be switched to asm-generic/linkage.h. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
62 lines
718 B
ArmAsm
62 lines
718 B
ArmAsm
/* memset.S */
|
|
|
|
#include <asm/linkage.h>
|
|
|
|
#if defined(__H8300H__)
|
|
.h8300h
|
|
#endif
|
|
#if defined(__H8300S__)
|
|
.h8300s
|
|
#endif
|
|
.text
|
|
|
|
.global _memset
|
|
|
|
;;void *memset(*ptr, int c, size_t count)
|
|
;; ptr = er0
|
|
;; c = er1(r1l)
|
|
;; count = er2
|
|
_memset:
|
|
btst #0,r0l
|
|
beq 2f
|
|
|
|
;; odd address
|
|
1:
|
|
mov.b r1l,@er0
|
|
adds #1,er0
|
|
dec.l #1,er2
|
|
beq 6f
|
|
|
|
;; even address
|
|
2:
|
|
mov.l er2,er3
|
|
cmp.l #4,er2
|
|
blo 4f
|
|
;; count>=4 -> count/4
|
|
#if defined(__H8300H__)
|
|
shlr.l er2
|
|
shlr.l er2
|
|
#endif
|
|
#if defined(__H8300S__)
|
|
shlr.l #2,er2
|
|
#endif
|
|
;; byte -> long
|
|
mov.b r1l,r1h
|
|
mov.w r1,e1
|
|
3:
|
|
mov.l er1,@er0
|
|
adds #4,er0
|
|
dec.l #1,er2
|
|
bne 3b
|
|
4:
|
|
;; count % 4
|
|
and.b #3,r3l
|
|
beq 6f
|
|
5:
|
|
mov.b r1l,@er0
|
|
adds #1,er0
|
|
dec.b r3l
|
|
bne 5b
|
|
6:
|
|
rts
|