mirror of
https://github.com/apache/nuttx.git
synced 2025-12-07 10:03:38 +08:00
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.
This commit is contained in:
committed by
Xiang Xiao
parent
7e6d93da4d
commit
903a186304
@@ -168,7 +168,7 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo)
|
||||
*/
|
||||
|
||||
loadinfo->relocstart = NTOHL(loadinfo->header.h_relocstart);
|
||||
loadinfo->reloccount = ntohs(loadinfo->header.h_reloccount);
|
||||
loadinfo->reloccount = NTOHS(loadinfo->header.h_reloccount);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user