xref: /titanic_51/usr/src/lib/libc/amd64/gen/endian.c (revision 3b4b8bda7949c2c1bf610c9f0413accc9d26119a)
1*3b4b8bdaSRobert Mustacchi /*
2*3b4b8bdaSRobert Mustacchi  * This file and its contents are supplied under the terms of the
3*3b4b8bdaSRobert Mustacchi  * Common Development and Distribution License ("CDDL"), version 1.0.
4*3b4b8bdaSRobert Mustacchi  * You may only use this file in accordance with the terms of version
5*3b4b8bdaSRobert Mustacchi  * 1.0 of the CDDL.
6*3b4b8bdaSRobert Mustacchi  *
7*3b4b8bdaSRobert Mustacchi  * A full copy of the text of the CDDL should have accompanied this
8*3b4b8bdaSRobert Mustacchi  * source.  A copy of the CDDL is also available via the Internet at
9*3b4b8bdaSRobert Mustacchi  * http://www.illumos.org/license/CDDL.
10*3b4b8bdaSRobert Mustacchi  */
11*3b4b8bdaSRobert Mustacchi 
12*3b4b8bdaSRobert Mustacchi /*
13*3b4b8bdaSRobert Mustacchi  * Copyright (c) 2015, Joyent, Inc.
14*3b4b8bdaSRobert Mustacchi  */
15*3b4b8bdaSRobert Mustacchi 
16*3b4b8bdaSRobert Mustacchi /*
17*3b4b8bdaSRobert Mustacchi  * General, no-op functions for endian(3C). The rest are in byteorder.s.
18*3b4b8bdaSRobert Mustacchi  */
19*3b4b8bdaSRobert Mustacchi 
20*3b4b8bdaSRobert Mustacchi #include <endian.h>
21*3b4b8bdaSRobert Mustacchi 
22*3b4b8bdaSRobert Mustacchi uint16_t
23*3b4b8bdaSRobert Mustacchi htole16(uint16_t in)
24*3b4b8bdaSRobert Mustacchi {
25*3b4b8bdaSRobert Mustacchi 	return (in);
26*3b4b8bdaSRobert Mustacchi }
27*3b4b8bdaSRobert Mustacchi 
28*3b4b8bdaSRobert Mustacchi uint32_t
29*3b4b8bdaSRobert Mustacchi htole32(uint32_t in)
30*3b4b8bdaSRobert Mustacchi {
31*3b4b8bdaSRobert Mustacchi 	return (in);
32*3b4b8bdaSRobert Mustacchi }
33*3b4b8bdaSRobert Mustacchi 
34*3b4b8bdaSRobert Mustacchi uint64_t
35*3b4b8bdaSRobert Mustacchi htole64(uint64_t in)
36*3b4b8bdaSRobert Mustacchi {
37*3b4b8bdaSRobert Mustacchi 	return (in);
38*3b4b8bdaSRobert Mustacchi }
39*3b4b8bdaSRobert Mustacchi 
40*3b4b8bdaSRobert Mustacchi uint16_t
41*3b4b8bdaSRobert Mustacchi letoh16(uint16_t in)
42*3b4b8bdaSRobert Mustacchi {
43*3b4b8bdaSRobert Mustacchi 	return (in);
44*3b4b8bdaSRobert Mustacchi }
45*3b4b8bdaSRobert Mustacchi 
46*3b4b8bdaSRobert Mustacchi uint16_t
47*3b4b8bdaSRobert Mustacchi le16toh(uint16_t in)
48*3b4b8bdaSRobert Mustacchi {
49*3b4b8bdaSRobert Mustacchi 	return (in);
50*3b4b8bdaSRobert Mustacchi }
51*3b4b8bdaSRobert Mustacchi 
52*3b4b8bdaSRobert Mustacchi uint32_t
53*3b4b8bdaSRobert Mustacchi letoh32(uint32_t in)
54*3b4b8bdaSRobert Mustacchi {
55*3b4b8bdaSRobert Mustacchi 	return (in);
56*3b4b8bdaSRobert Mustacchi }
57*3b4b8bdaSRobert Mustacchi 
58*3b4b8bdaSRobert Mustacchi uint32_t
59*3b4b8bdaSRobert Mustacchi le32toh(uint32_t in)
60*3b4b8bdaSRobert Mustacchi {
61*3b4b8bdaSRobert Mustacchi 	return (in);
62*3b4b8bdaSRobert Mustacchi }
63*3b4b8bdaSRobert Mustacchi 
64*3b4b8bdaSRobert Mustacchi uint64_t
65*3b4b8bdaSRobert Mustacchi letoh64(uint64_t in)
66*3b4b8bdaSRobert Mustacchi {
67*3b4b8bdaSRobert Mustacchi 	return (in);
68*3b4b8bdaSRobert Mustacchi }
69*3b4b8bdaSRobert Mustacchi 
70*3b4b8bdaSRobert Mustacchi uint64_t
71*3b4b8bdaSRobert Mustacchi le64toh(uint64_t in)
72*3b4b8bdaSRobert Mustacchi {
73*3b4b8bdaSRobert Mustacchi 	return (in);
74*3b4b8bdaSRobert Mustacchi }
75