riscv: byteorder: add test for big-endian
authorBen Dooks <ben.dooks@codethink.co.uk>
Fri, 13 Jun 2025 16:12:58 +0000 (17:12 +0100)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 3 Jul 2025 10:10:50 +0000 (18:10 +0800)
commit364627596c7142d837912acea0d785ecdfeab676
treecd542c8b3565add7ec84d013f255db3cdcb5e891
parent7bd65e89addd62999bd26e8c4b78b1658bba6a5c
riscv: byteorder: add test for big-endian

Test for big-endian either via __RISCVEB__ which migth be
rather old, or check the BYTE_ORDER if the compiler defines
it (which should be any modern gcc like v12)

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
arch/riscv/include/asm/byteorder.h