^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #include <linux/export.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #include <linux/compiler.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) unsigned long long notrace __bswapdi2(unsigned long long u)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) return (((u) & 0xff00000000000000ull) >> 56) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) (((u) & 0x00ff000000000000ull) >> 40) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) (((u) & 0x0000ff0000000000ull) >> 24) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) (((u) & 0x000000ff00000000ull) >> 8) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) (((u) & 0x00000000ff000000ull) << 8) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) (((u) & 0x0000000000ff0000ull) << 24) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) (((u) & 0x000000000000ff00ull) << 40) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) (((u) & 0x00000000000000ffull) << 56);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) EXPORT_SYMBOL(__bswapdi2);