diff options
Diffstat (limited to 'newlib/libc/machine/rx/strncmp.S')
-rw-r--r-- | newlib/libc/machine/rx/strncmp.S | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/newlib/libc/machine/rx/strncmp.S b/newlib/libc/machine/rx/strncmp.S new file mode 100644 index 000000000..929e9cb0a --- /dev/null +++ b/newlib/libc/machine/rx/strncmp.S @@ -0,0 +1,13 @@ + .file "strncmp.S" + + .section .text + .global _strncmp + .type _strncmp,@function +_strncmp: + scmpu ; Perform the string comparison + bnc 1f ; If Carry is not set skip over + scne.L r1 ; Set result based on Z flag + rts ; +1: ; + mov #-1,r1 ; Carry not set, result should be negative + rts ; |