repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
SYSENTER/SYSCALL support
[minix.git]
/
common
/
lib
/
libc
/
arch
/
vax
/
gen
/
bswap64.S
blob
b95bb74412d09090a482cb4b5afb005fa36d1eb2
1
/* Written by Anders Magnusson. Public Domain */
2
3
#if defined(LIBC_SCCS) && !defined(lint)
4
.asciz "$NetBSD: bswap64.S,v 1.2 2005/12/24 08:33:32 matt Exp $"
5
#endif /* LIBC_SCCS and not lint */
6
7
#include <machine/asm.h>
8
9
ENTRY(bswap64, 0)
10
movq 4(%ap),%r3
11
rotl $-8,%r3,%r1
12
insv %r1,$16,$8,%r1
13
rotl $8,%r3,%r2
14
movb %r2,%r1
15
rotl $-8,%r4,%r0
16
insv %r0,$16,$8,%r0
17
rotl $8,%r4,%r2
18
movb %r2,%r0
19
ret