2 # output: pass\nexit 0 (0x0)\n
4 Tests for BPF endianness-conversion instructions in simulator
5 running in LITTLE ENDIAN
7 Both 'be' and 'le' ISAs have both endbe and endle instructions. */
9 .include "testutils.inc"
15 lddw
%r1, 0x12345678deadbeef
17 fail_ne
%r1, 0xefbeadde78563412
19 fail_ne
%r1, 0x12345678deadbeef
21 /* `bitsize` < 64 will truncate */
23 fail_ne
%r1, 0xefbeadde
25 fail_ne
%r1, 0xdeadbeef
32 /* endle on le should be noop (except truncate) */
33 lddw
%r1, 0x12345678deadbeef
35 fail_ne
%r1, 0x12345678deadbeef
38 fail_ne
%r1, 0xdeadbeef