diff options
author | stas <stas@FreeBSD.org> | 2009-06-21 13:15:56 +0000 |
---|---|---|
committer | stas <stas@FreeBSD.org> | 2009-06-21 13:15:56 +0000 |
commit | b91bec2bd9b4fd4d1c040ca5254dc4b95c6c9ee1 (patch) | |
tree | b6704a7bb7e39328a6c39a13798602228aa50e7e /lib/libc/arm/string | |
parent | 703ba97704d0c8c6362459f85fae9852377e796b (diff) | |
download | FreeBSD-src-b91bec2bd9b4fd4d1c040ca5254dc4b95c6c9ee1.zip FreeBSD-src-b91bec2bd9b4fd4d1c040ca5254dc4b95c6c9ee1.tar.gz |
- Eliminate extra subcs instruction. I have not noticed before that we
always perform substraction now, so no instruction could be rordered
to eliminate the conditional substraction.
Diffstat (limited to 'lib/libc/arm/string')
-rw-r--r-- | lib/libc/arm/string/strncmp.S | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/arm/string/strncmp.S b/lib/libc/arm/string/strncmp.S index 5beff41..fce0159 100644 --- a/lib/libc/arm/string/strncmp.S +++ b/lib/libc/arm/string/strncmp.S @@ -40,10 +40,9 @@ ENTRY(strncmp) /* ip == last src address to compare */ adds ip, r0, r2 - sub ip, ip, #1 /* Use last possible address on overflow. */ movcs ip, #0 - subcs ip, ip, #1 + sub ip, ip, #1 1: ldrb r2, [r0], #1 ldrb r3, [r1], #1 |