AArch64 can use `rev,rev16,rev32,rev64` opcodes for SwapEndian
x32/x64 have assembly SwapEndian methods and I think the same can be done in aarch64 easily. The following seems to work, but I've never written assembly before so I would rather leave it to someone else with more knowledge.
function SwapEndianASM(const AValue: UInt32): UInt32; assembler; nostackframe;
asm
rev32 x0,x0
end;
Thanks