xref: /kernel/linux/linux-5.10/arch/c6x/lib/llshl.S
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/arch/c6x/lib/
18c2ecf20Sopenharmony_ci;; SPDX-License-Identifier: GPL-2.0-or-later
28c2ecf20Sopenharmony_ci;;  Copyright (C) 2010 Texas Instruments Incorporated
38c2ecf20Sopenharmony_ci;;  Contributed by Mark Salter <msalter@redhat.com>.
48c2ecf20Sopenharmony_ci;;
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci;;  uint64_t __c6xabi_llshl(uint64_t val, uint shift)
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#include <linux/linkage.h>
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci	.text
118c2ecf20Sopenharmony_ciENTRY(__c6xabi_llshl)
128c2ecf20Sopenharmony_ci	 mv	.l1x	B4,A1
138c2ecf20Sopenharmony_ci   [!A1] b	.s2	B3		; just return if zero shift
148c2ecf20Sopenharmony_ci	 mvk	.s1	32,A0
158c2ecf20Sopenharmony_ci	 sub	.d1	A0,A1,A0
168c2ecf20Sopenharmony_ci	 cmplt	.l1	0,A0,A2
178c2ecf20Sopenharmony_ci   [A2]	 shru	.s1	A4,A0,A0
188c2ecf20Sopenharmony_ci   [!A2] neg	.l1	A0,A5
198c2ecf20Sopenharmony_ci|| [A2]  shl	.s1	A5,A1,A5
208c2ecf20Sopenharmony_ci   [!A2] shl	.s1	A4,A5,A5
218c2ecf20Sopenharmony_ci|| [A2]  or	.d1	A5,A0,A5
228c2ecf20Sopenharmony_ci|| [!A2] mvk	.l1	0,A4
238c2ecf20Sopenharmony_ci   [A2]	 shl	.s1	A4,A1,A4
248c2ecf20Sopenharmony_ci	 bnop	.s2	B3,5
258c2ecf20Sopenharmony_ciENDPROC(__c6xabi_llshl)
26

Indexes created Thu Nov 07 10:32:03 CST 2024