gen_swap
u8 gen_swap(u8 *buf, u8 rd, u8 size, u8 endian, bool force, bool do_zext);
*len = gen_swap(buf, rd, size, endian, force, do_zext);