Sync with sys/i386/include/endian.h: use the single instruction 'bswap'.
This commit is contained in:
parent
bd2e7b7478
commit
62f696fcfa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136669
@ -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 New Issue
Block a user