]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Less inefficient gcc tishift helpers (and export their symbols)
authorOlof Johansson <olof@lixom.net>
Tue, 17 Dec 2019 04:06:31 +0000 (20:06 -0800)
committerPaul Walmsley <paul.walmsley@sifive.com>
Sun, 19 Jan 2020 03:13:41 +0000 (19:13 -0800)
commit494298f6c86d5da60d417228d1b3178517a2f559
treefa9276255c794cd150ea01ebf1c5ac0aa1ddccfe
parent5b615b26d723d7be2ed09e3fd597456024bf91a0
riscv: Less inefficient gcc tishift helpers (and export their symbols)

The existing __lshrti3 was really inefficient, and the other two helpers
are also needed to compile some modules.

Add the missing versions, and export all of the symbols like arm64
already does.

This code is based on the assembly generated by libgcc builds.

This fixes a build break triggered by ubsan:

riscv64-unknown-linux-gnu-ld: lib/ubsan.o: in function `.L2':
ubsan.c:(.text.unlikely+0x38): undefined reference to `__ashlti3'
riscv64-unknown-linux-gnu-ld: ubsan.c:(.text.unlikely+0x42): undefined reference to `__ashrti3'

Signed-off-by: Olof Johansson <olof@lixom.net>
[paul.walmsley@sifive.com: use SYM_FUNC_{START,END} instead of
 ENTRY/ENDPROC; note libgcc origin]
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
arch/riscv/include/asm/asm-prototypes.h
arch/riscv/lib/tishift.S