summaryrefslogtreecommitdiffstats
path: root/arch/riscv/lib/tishift.S
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2018-10-30 23:47:08 -0700
committerPalmer Dabbelt <palmer@sifive.com>2018-12-21 08:17:02 -0800
commita266cdba17b36497da47055f31454995c5e50f43 (patch)
treee90ccb8ce1bc557b251d6436377701db30a8da4c /arch/riscv/lib/tishift.S
parent358f3fff5271629f26261dadff73a9f8484aee12 (diff)
downloadlinux-stable-a266cdba17b36497da47055f31454995c5e50f43.tar.gz
linux-stable-a266cdba17b36497da47055f31454995c5e50f43.tar.bz2
linux-stable-a266cdba17b36497da47055f31454995c5e50f43.zip
RISC-V: lib: minor asm cleanup
Fix tab/space conversion and use ENTRY/ENDPROC macros. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'arch/riscv/lib/tishift.S')
-rw-r--r--arch/riscv/lib/tishift.S59
1 files changed, 31 insertions, 28 deletions
diff --git a/arch/riscv/lib/tishift.S b/arch/riscv/lib/tishift.S
index 69abb1277234..237bc9fd0763 100644
--- a/arch/riscv/lib/tishift.S
+++ b/arch/riscv/lib/tishift.S
@@ -10,33 +10,36 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
- .globl __lshrti3
-__lshrti3:
- beqz a2, .L1
- li a5,64
- sub a5,a5,a2
- addi sp,sp,-16
- sext.w a4,a5
- blez a5, .L2
- sext.w a2,a2
- sll a4,a1,a4
- srl a0,a0,a2
- srl a1,a1,a2
- or a0,a0,a4
- sd a1,8(sp)
- sd a0,0(sp)
- ld a0,0(sp)
- ld a1,8(sp)
- addi sp,sp,16
- ret
+
+#include <linux/linkage.h>
+
+ENTRY(__lshrti3)
+ beqz a2, .L1
+ li a5,64
+ sub a5,a5,a2
+ addi sp,sp,-16
+ sext.w a4,a5
+ blez a5, .L2
+ sext.w a2,a2
+ sll a4,a1,a4
+ srl a0,a0,a2
+ srl a1,a1,a2
+ or a0,a0,a4
+ sd a1,8(sp)
+ sd a0,0(sp)
+ ld a0,0(sp)
+ ld a1,8(sp)
+ addi sp,sp,16
+ ret
.L1:
- ret
+ ret
.L2:
- negw a4,a4
- srl a1,a1,a4
- sd a1,0(sp)
- sd zero,8(sp)
- ld a0,0(sp)
- ld a1,8(sp)
- addi sp,sp,16
- ret
+ negw a4,a4
+ srl a1,a1,a4
+ sd a1,0(sp)
+ sd zero,8(sp)
+ ld a0,0(sp)
+ ld a1,8(sp)
+ addi sp,sp,16
+ ret
+ENDPROC(__lshrti3)