Use the "bswap" instruction to shrink the size of byte-swapping code, and provide the in-place variants __bswap_{16,32,64}s. "bswap" is available only on 486 and later processors. (We already assume the presence of "cpuid" and "rdtsc", which are available only on Pentium and later processors.) Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
1 |
|
1 |
|
2 |
|
2 |
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
3 |
|
11 |
|
4 |
|
12 |
|
5 |
|
13 |
|
6 |
|
14 |
|
7 |
|
15 |
|
8 |
|
16 |
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
17 |
|
13 |
|
18 |
|
14 |
|
19 |
|
15 |
|
20 |
|
16 |
|
21 |
|
17 |
|
22 |
|
18 |
|
23 |
|
19 |
|
24 |
|
20 |
|
25 |
|
21 |
|
26 |
|
22 |
|
27 |
|
23 |
|
28 |
|
24 |
|
29 |
|
25 |
|
30 |
|
26 |
|
31 |
|
27 |
|
32 |
|
28 |
|
33 |
|
29 |
|
34 |
|
30 |
|
35 |
|
31 |
|
36 |
|
32 |
|
37 |
|
33 |
|
38 |
|
34 |
|
39 |
|
35 |
|
40 |
|
36 |
|
41 |
|
37 |
|
42 |
|
38 |
|
43 |
|
39 |
|
44 |
|
40 |
|
45 |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
41 |
|
65 |
|
42 |
|
66 |
|
43 |
|
67 |
|