xref: /linux/arch/xtensa/lib/bswapdi2.S (revision f5db8841ebe59dbdf07fda797c88ccb51e0c893d)
1/* SPDX-License-Identifier: GPL-2.0-or-later WITH GCC-exception-2.0 */
2#include <linux/linkage.h>
3#include <asm/asmmacro.h>
4#include <asm/core.h>
5
6ENTRY(__bswapdi2)
7
8	abi_entry_default
9	ssai	8
10	srli	a4, a2, 16
11	src	a4, a4, a2
12	src	a4, a4, a4
13	src	a4, a2, a4
14	srli	a2, a3, 16
15	src	a2, a2, a3
16	src	a2, a2, a2
17	src	a2, a3, a2
18	mov	a3, a4
19	abi_ret_default
20
21ENDPROC(__bswapdi2)
22EXPORT_SYMBOL(__bswapdi2)
23