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
Remove building with NOCRYPTO option
[minix.git]
/
lib
/
libc
/
arch
/
m68k
/
string
/
swab.S
blob
abb33a69f49187ec0f0669c44d9cc60699164087
1
/* $NetBSD: swab.S,v 1.11 2014/03/18 18:20:37 riastradh Exp $ */
2
3
#include <machine/asm.h>
4
5
ENTRY(swab)
6
movl 4(%sp),%a0 | source
7
movl 8(%sp),%a1 | destination
8
movl 12(%sp),%d0 | count
9
lsrl #1,%d0 | count is in bytes; we need words
10
jeq swdone
11
12
swloop:
13
#ifdef __mcoldfire__
14
movb (%a0)+,1(%a1)
15
movb (%a0)+,(%a1)
16
addql #2,%a1
17
#else
18
movw (%a0)+,%d1
19
rorw #8,%d1
20
movw %d1,(%a1)+
21
#endif
22
subql #1,%d0
23
jne swloop
24
25
swdone:
26
rts
27
END(swab)