1dbf4ed89SMax Filippov/* SPDX-License-Identifier: GPL-2.0-or-later WITH GCC-exception-2.0 */ 2dbf4ed89SMax Filippov#include <linux/linkage.h> 3dbf4ed89SMax Filippov#include <asm/asmmacro.h> 4dbf4ed89SMax Filippov#include <asm/core.h> 5dbf4ed89SMax Filippov 6dbf4ed89SMax Filippov#ifdef __XTENSA_EB__ 7dbf4ed89SMax Filippov#define uh a2 8dbf4ed89SMax Filippov#define ul a3 9dbf4ed89SMax Filippov#else 10dbf4ed89SMax Filippov#define uh a3 11dbf4ed89SMax Filippov#define ul a2 12dbf4ed89SMax Filippov#endif /* __XTENSA_EB__ */ 13dbf4ed89SMax Filippov 14dbf4ed89SMax FilippovENTRY(__ashrdi3) 15dbf4ed89SMax Filippov 16dbf4ed89SMax Filippov abi_entry_default 17dbf4ed89SMax Filippov ssr a4 18dbf4ed89SMax Filippov bgei a4, 32, .Lhigh_only 19dbf4ed89SMax Filippov src ul, uh, ul 20dbf4ed89SMax Filippov sra uh, uh 21dbf4ed89SMax Filippov abi_ret_default 22dbf4ed89SMax Filippov 23dbf4ed89SMax Filippov.Lhigh_only: 24dbf4ed89SMax Filippov sra ul, uh 25dbf4ed89SMax Filippov srai uh, uh, 31 26dbf4ed89SMax Filippov abi_ret_default 27dbf4ed89SMax Filippov 28dbf4ed89SMax FilippovENDPROC(__ashrdi3) 29*338d9150SMax FilippovEXPORT_SYMBOL(__ashrdi3) 30