blob: f89b66aecd9812dd4023a7f24f50327025b4c631 [file] [log] [blame]
Neels Hofmeyr6862cd32020-09-13 23:56:21 +02001--- 16 be
2osmo_store16be_ext(0x2211, &buf[0], 2) = 22 11 00 00
3osmo_load16be_ext(&buf[0], 2) = 0x2211
4osmo_store16be_ext(0x2211, &buf[1], 2) = 00 22 11 00
5osmo_load16be_ext(&buf[1], 2) = 0x2211
6osmo_store16be_ext(0x2211, &buf[0], 1) = 11 00
7osmo_load16be_ext(&buf[0], 1) = 0x1100
8--- 16 le
9osmo_store16le_ext(0x2211, &buf[0], 2) = 11 22 00 00
10osmo_load16le_ext(&buf[0], 2) = 0x2211
11osmo_store16le_ext(0x2211, &buf[1], 2) = 00 11 22 00
12osmo_load16le_ext(&buf[1], 2) = 0x2211
13osmo_store16le_ext(0x2211, &buf[0], 1) = 11 00
14osmo_load16le_ext(&buf[0], 1) = 0x11
15--- 32 be
16osmo_store32be_ext(0x44332211, &buf[0], 4) = 44 33 22 11 00 00 00 00
17osmo_load32be_ext(&buf[0], 4) = 0x44332211
18osmo_store32be_ext(0x44332211, &buf[1], 4) = 00 44 33 22 11 00 00 00
19osmo_load32be_ext(&buf[1], 4) = 0x44332211
20osmo_store32be_ext(0x44332211, &buf[2], 4) = 00 00 44 33 22 11 00 00
21osmo_load32be_ext(&buf[2], 4) = 0x44332211
22osmo_store32be_ext(0x44332211, &buf[3], 4) = 00 00 00 44 33 22 11 00
23osmo_load32be_ext(&buf[3], 4) = 0x44332211
24osmo_store32be_ext(0x44332211, &buf[0], 3) = 33 22 11 00 00 00
25osmo_load32be_ext(&buf[0], 3) = 0x33221100
26osmo_store32be_ext(0x44332211, &buf[1], 3) = 00 33 22 11 00 00
27osmo_load32be_ext(&buf[1], 3) = 0x33221100
28osmo_store32be_ext(0x44332211, &buf[2], 3) = 00 00 33 22 11 00
29osmo_load32be_ext(&buf[2], 3) = 0x33221100
30osmo_store32be_ext(0x44332211, &buf[0], 2) = 22 11 00 00
31osmo_load32be_ext(&buf[0], 2) = 0x22110000
32osmo_store32be_ext(0x44332211, &buf[1], 2) = 00 22 11 00
33osmo_load32be_ext(&buf[1], 2) = 0x22110000
34osmo_store32be_ext(0x44332211, &buf[0], 1) = 11 00
35osmo_load32be_ext(&buf[0], 1) = 0x11000000
36--- 32 le
37osmo_store32le_ext(0x44332211, &buf[0], 4) = 11 22 33 44 00 00 00 00
38osmo_load32le_ext(&buf[0], 4) = 0x44332211
39osmo_store32le_ext(0x44332211, &buf[1], 4) = 00 11 22 33 44 00 00 00
40osmo_load32le_ext(&buf[1], 4) = 0x44332211
41osmo_store32le_ext(0x44332211, &buf[2], 4) = 00 00 11 22 33 44 00 00
42osmo_load32le_ext(&buf[2], 4) = 0x44332211
43osmo_store32le_ext(0x44332211, &buf[3], 4) = 00 00 00 11 22 33 44 00
44osmo_load32le_ext(&buf[3], 4) = 0x44332211
45osmo_store32le_ext(0x44332211, &buf[0], 3) = 11 22 33 00 00 00
46osmo_load32le_ext(&buf[0], 3) = 0x332211
47osmo_store32le_ext(0x44332211, &buf[1], 3) = 00 11 22 33 00 00
48osmo_load32le_ext(&buf[1], 3) = 0x332211
49osmo_store32le_ext(0x44332211, &buf[2], 3) = 00 00 11 22 33 00
50osmo_load32le_ext(&buf[2], 3) = 0x332211
51osmo_store32le_ext(0x44332211, &buf[0], 2) = 11 22 00 00
52osmo_load32le_ext(&buf[0], 2) = 0x2211
53osmo_store32le_ext(0x44332211, &buf[1], 2) = 00 11 22 00
54osmo_load32le_ext(&buf[1], 2) = 0x2211
55osmo_store32le_ext(0x44332211, &buf[0], 1) = 11 00
56osmo_load32le_ext(&buf[0], 1) = 0x11
57--- 64 be
58osmo_store64be_ext(0x8877665544332211, &buf[0], 8) = 88 77 66 55 44 33 22 11 00 00 00 00 00 00 00 00
59osmo_load64be_ext(&buf[0], 8) = 0x8877665544332211
60osmo_store64be_ext(0x8877665544332211, &buf[1], 8) = 00 88 77 66 55 44 33 22 11 00 00 00 00 00 00 00
61osmo_load64be_ext(&buf[1], 8) = 0x8877665544332211
62osmo_store64be_ext(0x8877665544332211, &buf[2], 8) = 00 00 88 77 66 55 44 33 22 11 00 00 00 00 00 00
63osmo_load64be_ext(&buf[2], 8) = 0x8877665544332211
64osmo_store64be_ext(0x8877665544332211, &buf[3], 8) = 00 00 00 88 77 66 55 44 33 22 11 00 00 00 00 00
65osmo_load64be_ext(&buf[3], 8) = 0x8877665544332211
66osmo_store64be_ext(0x8877665544332211, &buf[4], 8) = 00 00 00 00 88 77 66 55 44 33 22 11 00 00 00 00
67osmo_load64be_ext(&buf[4], 8) = 0x8877665544332211
68osmo_store64be_ext(0x8877665544332211, &buf[5], 8) = 00 00 00 00 00 88 77 66 55 44 33 22 11 00 00 00
69osmo_load64be_ext(&buf[5], 8) = 0x8877665544332211
70osmo_store64be_ext(0x8877665544332211, &buf[6], 8) = 00 00 00 00 00 00 88 77 66 55 44 33 22 11 00 00
71osmo_load64be_ext(&buf[6], 8) = 0x8877665544332211
72osmo_store64be_ext(0x8877665544332211, &buf[7], 8) = 00 00 00 00 00 00 00 88 77 66 55 44 33 22 11 00
73osmo_load64be_ext(&buf[7], 8) = 0x8877665544332211
74osmo_store64be_ext(0x8877665544332211, &buf[0], 7) = 77 66 55 44 33 22 11 00 00 00 00 00 00 00
75osmo_load64be_ext(&buf[0], 7) = 0x7766554433221100
76osmo_store64be_ext(0x8877665544332211, &buf[1], 7) = 00 77 66 55 44 33 22 11 00 00 00 00 00 00
77osmo_load64be_ext(&buf[1], 7) = 0x7766554433221100
78osmo_store64be_ext(0x8877665544332211, &buf[2], 7) = 00 00 77 66 55 44 33 22 11 00 00 00 00 00
79osmo_load64be_ext(&buf[2], 7) = 0x7766554433221100
80osmo_store64be_ext(0x8877665544332211, &buf[3], 7) = 00 00 00 77 66 55 44 33 22 11 00 00 00 00
81osmo_load64be_ext(&buf[3], 7) = 0x7766554433221100
82osmo_store64be_ext(0x8877665544332211, &buf[4], 7) = 00 00 00 00 77 66 55 44 33 22 11 00 00 00
83osmo_load64be_ext(&buf[4], 7) = 0x7766554433221100
84osmo_store64be_ext(0x8877665544332211, &buf[5], 7) = 00 00 00 00 00 77 66 55 44 33 22 11 00 00
85osmo_load64be_ext(&buf[5], 7) = 0x7766554433221100
86osmo_store64be_ext(0x8877665544332211, &buf[6], 7) = 00 00 00 00 00 00 77 66 55 44 33 22 11 00
87osmo_load64be_ext(&buf[6], 7) = 0x7766554433221100
88osmo_store64be_ext(0x8877665544332211, &buf[0], 6) = 66 55 44 33 22 11 00 00 00 00 00 00
89osmo_load64be_ext(&buf[0], 6) = 0x6655443322110000
90osmo_store64be_ext(0x8877665544332211, &buf[1], 6) = 00 66 55 44 33 22 11 00 00 00 00 00
91osmo_load64be_ext(&buf[1], 6) = 0x6655443322110000
92osmo_store64be_ext(0x8877665544332211, &buf[2], 6) = 00 00 66 55 44 33 22 11 00 00 00 00
93osmo_load64be_ext(&buf[2], 6) = 0x6655443322110000
94osmo_store64be_ext(0x8877665544332211, &buf[3], 6) = 00 00 00 66 55 44 33 22 11 00 00 00
95osmo_load64be_ext(&buf[3], 6) = 0x6655443322110000
96osmo_store64be_ext(0x8877665544332211, &buf[4], 6) = 00 00 00 00 66 55 44 33 22 11 00 00
97osmo_load64be_ext(&buf[4], 6) = 0x6655443322110000
98osmo_store64be_ext(0x8877665544332211, &buf[5], 6) = 00 00 00 00 00 66 55 44 33 22 11 00
99osmo_load64be_ext(&buf[5], 6) = 0x6655443322110000
100osmo_store64be_ext(0x8877665544332211, &buf[0], 5) = 55 44 33 22 11 00 00 00 00 00
101osmo_load64be_ext(&buf[0], 5) = 0x5544332211000000
102osmo_store64be_ext(0x8877665544332211, &buf[1], 5) = 00 55 44 33 22 11 00 00 00 00
103osmo_load64be_ext(&buf[1], 5) = 0x5544332211000000
104osmo_store64be_ext(0x8877665544332211, &buf[2], 5) = 00 00 55 44 33 22 11 00 00 00
105osmo_load64be_ext(&buf[2], 5) = 0x5544332211000000
106osmo_store64be_ext(0x8877665544332211, &buf[3], 5) = 00 00 00 55 44 33 22 11 00 00
107osmo_load64be_ext(&buf[3], 5) = 0x5544332211000000
108osmo_store64be_ext(0x8877665544332211, &buf[4], 5) = 00 00 00 00 55 44 33 22 11 00
109osmo_load64be_ext(&buf[4], 5) = 0x5544332211000000
110osmo_store64be_ext(0x8877665544332211, &buf[0], 4) = 44 33 22 11 00 00 00 00
111osmo_load64be_ext(&buf[0], 4) = 0x4433221100000000
112osmo_store64be_ext(0x8877665544332211, &buf[1], 4) = 00 44 33 22 11 00 00 00
113osmo_load64be_ext(&buf[1], 4) = 0x4433221100000000
114osmo_store64be_ext(0x8877665544332211, &buf[2], 4) = 00 00 44 33 22 11 00 00
115osmo_load64be_ext(&buf[2], 4) = 0x4433221100000000
116osmo_store64be_ext(0x8877665544332211, &buf[3], 4) = 00 00 00 44 33 22 11 00
117osmo_load64be_ext(&buf[3], 4) = 0x4433221100000000
118osmo_store64be_ext(0x8877665544332211, &buf[0], 3) = 33 22 11 00 00 00
119osmo_load64be_ext(&buf[0], 3) = 0x3322110000000000
120osmo_store64be_ext(0x8877665544332211, &buf[1], 3) = 00 33 22 11 00 00
121osmo_load64be_ext(&buf[1], 3) = 0x3322110000000000
122osmo_store64be_ext(0x8877665544332211, &buf[2], 3) = 00 00 33 22 11 00
123osmo_load64be_ext(&buf[2], 3) = 0x3322110000000000
124osmo_store64be_ext(0x8877665544332211, &buf[0], 2) = 22 11 00 00
125osmo_load64be_ext(&buf[0], 2) = 0x2211000000000000
126osmo_store64be_ext(0x8877665544332211, &buf[1], 2) = 00 22 11 00
127osmo_load64be_ext(&buf[1], 2) = 0x2211000000000000
128osmo_store64be_ext(0x8877665544332211, &buf[0], 1) = 11 00
129osmo_load64be_ext(&buf[0], 1) = 0x1100000000000000
130--- 64 le
131osmo_store64le_ext(0x8877665544332211, &buf[0], 8) = 11 22 33 44 55 66 77 88 00 00 00 00 00 00 00 00
132osmo_load64le_ext(&buf[0], 8) = 0x8877665544332211
133osmo_store64le_ext(0x8877665544332211, &buf[1], 8) = 00 11 22 33 44 55 66 77 88 00 00 00 00 00 00 00
134osmo_load64le_ext(&buf[1], 8) = 0x8877665544332211
135osmo_store64le_ext(0x8877665544332211, &buf[2], 8) = 00 00 11 22 33 44 55 66 77 88 00 00 00 00 00 00
136osmo_load64le_ext(&buf[2], 8) = 0x8877665544332211
137osmo_store64le_ext(0x8877665544332211, &buf[3], 8) = 00 00 00 11 22 33 44 55 66 77 88 00 00 00 00 00
138osmo_load64le_ext(&buf[3], 8) = 0x8877665544332211
139osmo_store64le_ext(0x8877665544332211, &buf[4], 8) = 00 00 00 00 11 22 33 44 55 66 77 88 00 00 00 00
140osmo_load64le_ext(&buf[4], 8) = 0x8877665544332211
141osmo_store64le_ext(0x8877665544332211, &buf[5], 8) = 00 00 00 00 00 11 22 33 44 55 66 77 88 00 00 00
142osmo_load64le_ext(&buf[5], 8) = 0x8877665544332211
143osmo_store64le_ext(0x8877665544332211, &buf[6], 8) = 00 00 00 00 00 00 11 22 33 44 55 66 77 88 00 00
144osmo_load64le_ext(&buf[6], 8) = 0x8877665544332211
145osmo_store64le_ext(0x8877665544332211, &buf[7], 8) = 00 00 00 00 00 00 00 11 22 33 44 55 66 77 88 00
146osmo_load64le_ext(&buf[7], 8) = 0x8877665544332211
147osmo_store64le_ext(0x8877665544332211, &buf[0], 7) = 11 22 33 44 55 66 77 00 00 00 00 00 00 00
148osmo_load64le_ext(&buf[0], 7) = 0x77665544332211
149osmo_store64le_ext(0x8877665544332211, &buf[1], 7) = 00 11 22 33 44 55 66 77 00 00 00 00 00 00
150osmo_load64le_ext(&buf[1], 7) = 0x77665544332211
151osmo_store64le_ext(0x8877665544332211, &buf[2], 7) = 00 00 11 22 33 44 55 66 77 00 00 00 00 00
152osmo_load64le_ext(&buf[2], 7) = 0x77665544332211
153osmo_store64le_ext(0x8877665544332211, &buf[3], 7) = 00 00 00 11 22 33 44 55 66 77 00 00 00 00
154osmo_load64le_ext(&buf[3], 7) = 0x77665544332211
155osmo_store64le_ext(0x8877665544332211, &buf[4], 7) = 00 00 00 00 11 22 33 44 55 66 77 00 00 00
156osmo_load64le_ext(&buf[4], 7) = 0x77665544332211
157osmo_store64le_ext(0x8877665544332211, &buf[5], 7) = 00 00 00 00 00 11 22 33 44 55 66 77 00 00
158osmo_load64le_ext(&buf[5], 7) = 0x77665544332211
159osmo_store64le_ext(0x8877665544332211, &buf[6], 7) = 00 00 00 00 00 00 11 22 33 44 55 66 77 00
160osmo_load64le_ext(&buf[6], 7) = 0x77665544332211
161osmo_store64le_ext(0x8877665544332211, &buf[0], 6) = 11 22 33 44 55 66 00 00 00 00 00 00
162osmo_load64le_ext(&buf[0], 6) = 0x665544332211
163osmo_store64le_ext(0x8877665544332211, &buf[1], 6) = 00 11 22 33 44 55 66 00 00 00 00 00
164osmo_load64le_ext(&buf[1], 6) = 0x665544332211
165osmo_store64le_ext(0x8877665544332211, &buf[2], 6) = 00 00 11 22 33 44 55 66 00 00 00 00
166osmo_load64le_ext(&buf[2], 6) = 0x665544332211
167osmo_store64le_ext(0x8877665544332211, &buf[3], 6) = 00 00 00 11 22 33 44 55 66 00 00 00
168osmo_load64le_ext(&buf[3], 6) = 0x665544332211
169osmo_store64le_ext(0x8877665544332211, &buf[4], 6) = 00 00 00 00 11 22 33 44 55 66 00 00
170osmo_load64le_ext(&buf[4], 6) = 0x665544332211
171osmo_store64le_ext(0x8877665544332211, &buf[5], 6) = 00 00 00 00 00 11 22 33 44 55 66 00
172osmo_load64le_ext(&buf[5], 6) = 0x665544332211
173osmo_store64le_ext(0x8877665544332211, &buf[0], 5) = 11 22 33 44 55 00 00 00 00 00
174osmo_load64le_ext(&buf[0], 5) = 0x5544332211
175osmo_store64le_ext(0x8877665544332211, &buf[1], 5) = 00 11 22 33 44 55 00 00 00 00
176osmo_load64le_ext(&buf[1], 5) = 0x5544332211
177osmo_store64le_ext(0x8877665544332211, &buf[2], 5) = 00 00 11 22 33 44 55 00 00 00
178osmo_load64le_ext(&buf[2], 5) = 0x5544332211
179osmo_store64le_ext(0x8877665544332211, &buf[3], 5) = 00 00 00 11 22 33 44 55 00 00
180osmo_load64le_ext(&buf[3], 5) = 0x5544332211
181osmo_store64le_ext(0x8877665544332211, &buf[4], 5) = 00 00 00 00 11 22 33 44 55 00
182osmo_load64le_ext(&buf[4], 5) = 0x5544332211
183osmo_store64le_ext(0x8877665544332211, &buf[0], 4) = 11 22 33 44 00 00 00 00
184osmo_load64le_ext(&buf[0], 4) = 0x44332211
185osmo_store64le_ext(0x8877665544332211, &buf[1], 4) = 00 11 22 33 44 00 00 00
186osmo_load64le_ext(&buf[1], 4) = 0x44332211
187osmo_store64le_ext(0x8877665544332211, &buf[2], 4) = 00 00 11 22 33 44 00 00
188osmo_load64le_ext(&buf[2], 4) = 0x44332211
189osmo_store64le_ext(0x8877665544332211, &buf[3], 4) = 00 00 00 11 22 33 44 00
190osmo_load64le_ext(&buf[3], 4) = 0x44332211
191osmo_store64le_ext(0x8877665544332211, &buf[0], 3) = 11 22 33 00 00 00
192osmo_load64le_ext(&buf[0], 3) = 0x332211
193osmo_store64le_ext(0x8877665544332211, &buf[1], 3) = 00 11 22 33 00 00
194osmo_load64le_ext(&buf[1], 3) = 0x332211
195osmo_store64le_ext(0x8877665544332211, &buf[2], 3) = 00 00 11 22 33 00
196osmo_load64le_ext(&buf[2], 3) = 0x332211
197osmo_store64le_ext(0x8877665544332211, &buf[0], 2) = 11 22 00 00
198osmo_load64le_ext(&buf[0], 2) = 0x2211
199osmo_store64le_ext(0x8877665544332211, &buf[1], 2) = 00 11 22 00
200osmo_load64le_ext(&buf[1], 2) = 0x2211
201osmo_store64le_ext(0x8877665544332211, &buf[0], 1) = 11 00
202osmo_load64le_ext(&buf[0], 1) = 0x11
203--- store/load 0x112233 as 24bit big-endian
20411 22 33 00
2050x11223300
206--- store/load 0x112233 as 24bit little-endian
20733 22 11 00
2080x112233