mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Sync with sys/i386/include/endian.h: use the single instruction 'bswap'.
This commit is contained in:
parent
bd2e7b7478
commit
62f696fcfa
2 changed files with 8 additions and 0 deletions
|
|
@ -46,7 +46,11 @@ __FBSDID("$FreeBSD$");
|
|||
.set CNAME(htonl),CNAME(__htonl)
|
||||
ENTRY(__htonl)
|
||||
movl 4(%esp),%eax
|
||||
#ifdef I386_CPU
|
||||
xchgb %al,%ah
|
||||
roll $16,%eax
|
||||
xchgb %al,%ah
|
||||
#else
|
||||
bswap %eax
|
||||
#endif
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -46,7 +46,11 @@ __FBSDID("$FreeBSD$");
|
|||
.set CNAME(ntohl),CNAME(__ntohl)
|
||||
ENTRY(__ntohl)
|
||||
movl 4(%esp),%eax
|
||||
#ifdef I386_CPU
|
||||
xchgb %al,%ah
|
||||
roll $16,%eax
|
||||
xchgb %al,%ah
|
||||
#else
|
||||
bswap %eax
|
||||
#endif
|
||||
ret
|
||||
|
|
|
|||
Loading…
Reference in a new issue