diff options
Diffstat (limited to 'newlib/libc/machine/h8300/strcmp.S')
-rw-r--r-- | newlib/libc/machine/h8300/strcmp.S | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/newlib/libc/machine/h8300/strcmp.S b/newlib/libc/machine/h8300/strcmp.S index 2ee31f05c..c5d709405 100644 --- a/newlib/libc/machine/h8300/strcmp.S +++ b/newlib/libc/machine/h8300/strcmp.S @@ -2,6 +2,22 @@ #include "defines.h" +#if defined (__H8300SX__) + .global _strcmp +_strcmp: + mov.l er0,er2 +loop: + mov.b @er2+,r0l + beq eos + sub.b @er1+,r0l + beq loop + exts.l #2,er0 + rts +eos: + sub.b @er1,r0l + exts.l #2,er0 + rts +#else .section .text .align 2 .global _strcmp @@ -41,3 +57,4 @@ _strcmp: #endif rts .end +#endif |