Files
android/arch/arm/lib/bswapsdi2.S
T
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

39 lines
649 B
ArmAsm

/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/linkage.h>
#include <asm/assembler.h>
#if __LINUX_ARM_ARCH__ >= 6
ENTRY(__bswapsi2)
rev r0, r0
bx lr
ENDPROC(__bswapsi2)
ENTRY(__bswapdi2)
rev r3, r0
rev r0, r1
mov r1, r3
bx lr
ENDPROC(__bswapdi2)
#else
ENTRY(__bswapsi2)
eor r3, r0, r0, ror #16
mov r3, r3, lsr #8
bic r3, r3, #0xff00
eor r0, r3, r0, ror #8
ret lr
ENDPROC(__bswapsi2)
ENTRY(__bswapdi2)
mov ip, r1
eor r3, ip, ip, ror #16
eor r1, r0, r0, ror #16
mov r1, r1, lsr #8
mov r3, r3, lsr #8
bic r3, r3, #0xff00
bic r1, r1, #0xff00
eor r1, r1, r0, ror #8
eor r0, r3, ip, ror #8
ret lr
ENDPROC(__bswapdi2)
#endif