mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 09:25:45 +07:00
abb77f3d96
For a while now it's been possible to use EXPORT_SYMBOL() in assembly files, which allows us to place exports immediately after assembly functions, as we do for C functions. As a step towards removing arm64ksyms.c, let's move the tishift exports to the assembly file the functions are defined in. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
75 lines
1012 B
ArmAsm
75 lines
1012 B
ArmAsm
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
|
|
*
|
|
* Copyright (C) 2017-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
|
*/
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
#include <asm/assembler.h>
|
|
|
|
ENTRY(__ashlti3)
|
|
cbz x2, 1f
|
|
mov x3, #64
|
|
sub x3, x3, x2
|
|
cmp x3, #0
|
|
b.le 2f
|
|
lsl x1, x1, x2
|
|
lsr x3, x0, x3
|
|
lsl x2, x0, x2
|
|
orr x1, x1, x3
|
|
mov x0, x2
|
|
1:
|
|
ret
|
|
2:
|
|
neg w1, w3
|
|
mov x2, #0
|
|
lsl x1, x0, x1
|
|
mov x0, x2
|
|
ret
|
|
ENDPROC(__ashlti3)
|
|
EXPORT_SYMBOL(__ashlti3)
|
|
|
|
ENTRY(__ashrti3)
|
|
cbz x2, 1f
|
|
mov x3, #64
|
|
sub x3, x3, x2
|
|
cmp x3, #0
|
|
b.le 2f
|
|
lsr x0, x0, x2
|
|
lsl x3, x1, x3
|
|
asr x2, x1, x2
|
|
orr x0, x0, x3
|
|
mov x1, x2
|
|
1:
|
|
ret
|
|
2:
|
|
neg w0, w3
|
|
asr x2, x1, #63
|
|
asr x0, x1, x0
|
|
mov x1, x2
|
|
ret
|
|
ENDPROC(__ashrti3)
|
|
EXPORT_SYMBOL(__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)
|
|
EXPORT_SYMBOL(__lshrti3)
|