Update for AMD64 (repocopied from i386/net). We can depend on having

the bswap instruction (yay!).  Update for register parameter passing
instead of i386 style stack based param passing.
This commit is contained in:
Peter Wemm 2003-04-30 18:07:23 +00:00
parent 4dbb9c65d7
commit 8d8a622e6b
4 changed files with 6 additions and 10 deletions

View file

@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$");
.weak CNAME(htonl)
.set CNAME(htonl),CNAME(__htonl)
ENTRY(__htonl)
movl 4(%esp),%eax
xchgb %al,%ah
roll $16,%eax
xchgb %al,%ah
movl %edi,%eax
bswap %eax
ret

View file

@ -45,6 +45,6 @@ __FBSDID("$FreeBSD$");
.weak CNAME(htons)
.set CNAME(htons),CNAME(__htons)
ENTRY(__htons)
movzwl 4(%esp),%eax
movl %edi,%eax
xchgb %al,%ah
ret

View file

@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$");
.weak CNAME(ntohl)
.set CNAME(ntohl),CNAME(__ntohl)
ENTRY(__ntohl)
movl 4(%esp),%eax
xchgb %al,%ah
roll $16,%eax
xchgb %al,%ah
movl %edi,%eax
bswap %eax
ret

View file

@ -47,6 +47,6 @@ __FBSDID("$FreeBSD$");
.weak CNAME(ntohs)
.set CNAME(ntohs),CNAME(__ntohs)
ENTRY(__ntohs)
movzwl 4(%esp),%eax
movl %edi,%eax
xchgb %al,%ah
ret