OSDN Git Service

newlib:
[pf3gnuchains/pf3gnuchains3x.git] / newlib / libc / machine / rx / strcmp.S
1         .file   "strcmp.S"
2
3         .section .text
4         
5         .global  _strcmp
6         .type    _strcmp,@function
7 _strcmp:
8         mov     #-1, r3         ; Strictly speaking this is incorrect, but I doubt if anyone will ever know.
9         scmpu                   ; Perform the string comparison
10         bnc     1f              ; If Carry is not set skip over
11         scne.L  r1              ; Set result based on Z flag
12         rts                     ;
13 1:                              ;
14         mov     #-1,r1          ; Carry not set, result should be negative
15         rts                     ;