mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
arm64: Implement __lshrti3 library function
Commit fb8722735f ("arm64: support __int128 on gcc 5+") added support
for the __int128 data type, but this breaks the build in some configurations
where GCC ends up emitting calls to the __lshrti3 helper in libgcc, which
results in a link error:
kernel/sched/fair.o: In function `__calc_delta':
fair.c:(.text+0xca0): undefined reference to `__lshrti3'
kernel/time/timekeeping.o: In function `timekeeping_resume':
timekeeping.c:(.text+0x3f60): undefined reference to `__lshrti3'
make: *** [vmlinux] Error 1
Fix the build by providing an implementation of __lshrti3, like we do
already for __ashlti3 and __ashrti3.
Reported-by: Arnd Bergmann <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
This commit is contained in:
parent
fb8722735f
commit
9bfe7553fa
1 changed files with 21 additions and 0 deletions
|
|
@ -57,3 +57,24 @@ ENTRY(__ashrti3)
|
|||
mov x1, x2
|
||||
ret
|
||||
ENDPROC(__ashrti3)
|
||||
|
||||
ENTRY(__lshrti3)
|
||||
cbz x2, 1f
|
||||
mov x3, #64
|
||||
sub x3, x3, x2
|
||||
cmp x3, #0
|
||||
b.le 2f
|
||||
lsr x0, x0, x2
|
||||
lsl x3, x1, x3
|
||||
lsr x2, x1, x2
|
||||
orr x0, x0, x3
|
||||
mov x1, x2
|
||||
1:
|
||||
ret
|
||||
2:
|
||||
neg w0, w3
|
||||
mov x2, #0
|
||||
lsr x0, x1, x0
|
||||
mov x1, x2
|
||||
ret
|
||||
ENDPROC(__lshrti3)
|
||||
|
|
|
|||
Loading…
Reference in a new issue