Commit Graph

8 Commits

Author SHA1 Message Date
Xiang Xiao 32d0c2ce9d libc: Add sys/endian.h to improve the compatiblity with bionic libc
and move the definition from endian.h to sys/endian.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-15 12:26:15 -03:00
anjiahao 64ebdb0339 include/endian:add openbsd style macro
bemtoh htobem lemtoh htolem

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-11-05 20:37:39 +08:00
anjiahao 21934122d5 include:endian.h add openbsd style
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-09-05 10:39:36 -03:00
Nimish Telang 903a186304 Use builtins for byteswapping
Make use of XCHG/BSWAP on x86, REV16 and REV on ARMv6-m and above,
and whatever other optimized instructions on other platforms.

Defines extra CONFIG variables, and removes the unused functions for
endian-swapping. Fixes some oversights in using the macros.
2022-06-29 11:32:59 +08:00
Jiuzhu Dong ccaea473f3 endian.h: add prefix for __LITTLE/__BIG_ENDIAN, __BYTE_ODRER
Change-Id: If072b69e37a89ccd6dc62e1d485b15703da029ac
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-20 07:47:07 -07:00
Alin Jerpelea 9b9be7e1f0 include: Author: Gregory Nutt: update licenses to Apache 2.0
Update files from Gregory Nutt to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
anchao c68f44dc44 Fix typographical error in endian.h and resource.h 2018-11-09 09:05:48 -06:00
Gregory Nutt ed4aae0fe0 include/endian.h and libs/libc/endian: Add support for endian.h. 2018-08-19 07:44:04 -06:00