aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/machine/mips/strlen.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/machine/mips/strlen.c')
-rw-r--r--newlib/libc/machine/mips/strlen.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/newlib/libc/machine/mips/strlen.c b/newlib/libc/machine/mips/strlen.c
index a87bddd..65cbaf3 100644
--- a/newlib/libc/machine/mips/strlen.c
+++ b/newlib/libc/machine/mips/strlen.c
@@ -33,27 +33,21 @@ strlen (const char *str)
}
#elif defined(__mips64)
__asm__("" /* 64-bit MIPS targets */
- " .set noreorder\n"
- " .set nomacro\n"
" .globl strlen\n"
" .ent strlen\n"
"strlen:\n"
" daddiu $2,$4,1\n"
"\n"
"1: lbu $3,0($4)\n"
- " bnez $3,1b\n"
" daddiu $4,$4,1\n"
+ " bnez $3,1b\n"
"\n"
- " jr $31\n"
" dsubu $2,$4,$2\n"
- " .end strlen\n"
- " .set macro\n"
- " .set reorder\n");
+ " jr $31\n"
+ " .end strlen\n");
#else
__asm__("" /* 32-bit MIPS targets */
- " .set noreorder\n"
- " .set nomacro\n"
" .globl strlen\n"
" .ent strlen\n"
"strlen:\n"
@@ -63,12 +57,10 @@ __asm__("" /* 32-bit MIPS targets */
#if defined(_R3000)
" nop \n"
#endif
- " bnez $3,1b\n"
" addiu $4,$4,1\n"
+ " bnez $3,1b\n"
"\n"
- " jr $31\n"
" subu $2,$4,$2\n"
- " .end strlen\n"
- " .set macro\n"
- " .set reorder\n");
+ " jr $31\n"
+ " .end strlen\n");
#endif