libutil: add O_NOCTTY back to old pty open code
[minix.git] / lib / libc / arch / m68k / string / swab.S
blob91fea3fee3926a855006ddaae3d21aa6ae5018d1
1 /*      $NetBSD: swab.S,v 1.7 1999/10/25 23:48:16 thorpej Exp $ */
3 #include <machine/asm.h>
5 ENTRY(swab)
6         movl    %sp@(4),%a0             | source
7         movl    %sp@(8),%a1             | destination
8         movl    %sp@(12),%d0            | count
9         lsrl    #1,%d0                  | count is in bytes; we need words
10         jeq     swdone
12 swloop:
13         movw    %a0@+,%d1
14         rorw    #8,%d1
15         movw    %d1,%a1@+
16         subql   #1,%d0
17         jne     swloop
19 swdone:
20         rts