]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libc/68020/memcmp.s
vt: but not too fast :-)
[plan9front.git] / sys / src / libc / 68020 / memcmp.s
1         TEXT    memcmp(SB),$0
2         MOVL    n+8(FP),R0
3         BEQ     ret
4         MOVL    s1+0(FP),A2
5         MOVL    s2+4(FP),A1
6
7 l1:     CMPB    (A1)+,(A2)+
8         BNE     neq
9         SUBL    $1,R0
10         BNE     l1
11         RTS
12
13 neq:    BCS     gtr
14         MOVL    $-1,R0
15         RTS
16
17 gtr:    MOVL    $1,R0
18 ret:    RTS