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_llshr(uint64_t val, uint shift) 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#include <linux/linkage.h> 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci .text 118c2ecf20Sopenharmony_ciENTRY(__c6xabi_llshr) 128c2ecf20Sopenharmony_ci mv .l1x B4,A1 138c2ecf20Sopenharmony_ci [!A1] b .s2 B3 ; return if zero shift count 148c2ecf20Sopenharmony_ci mvk .s1 32,A0 158c2ecf20Sopenharmony_ci sub .d1 A0,A1,A0 168c2ecf20Sopenharmony_ci cmplt .l1 0,A0,A2 178c2ecf20Sopenharmony_ci [A2] shl .s1 A5,A0,A0 188c2ecf20Sopenharmony_ci nop 198c2ecf20Sopenharmony_ci [!A2] neg .l1 A0,A4 208c2ecf20Sopenharmony_ci|| [A2] shru .s1 A4,A1,A4 218c2ecf20Sopenharmony_ci [!A2] shr .s1 A5,A4,A4 228c2ecf20Sopenharmony_ci|| [A2] or .d1 A4,A0,A4 238c2ecf20Sopenharmony_ci [!A2] shr .s1 A5,0x1f,A5 248c2ecf20Sopenharmony_ci [A2] shr .s1 A5,A1,A5 258c2ecf20Sopenharmony_ci bnop .s2 B3,5 268c2ecf20Sopenharmony_ciENDPROC(__c6xabi_llshr) 27