diff options
author | Andreas Schwab <schwab@redhat.com> | 2009-07-27 10:51:39 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2009-07-27 10:51:39 +0200 |
commit | e1a51361e3ac137c56adc6083d095c68e9471795 (patch) | |
tree | bfec41199e84a74265d8e77b0e8444b06bc9ff00 /sysdeps/x86_64/rtld-strcmp.S | |
parent | 9285e82ab3a0d1bdaa63fc740165d6a300ad0cc5 (diff) | |
parent | 16d2ea4c821502948d193a152c8b151f5497a0d3 (diff) |
Merge commit 'origin/master' into fedora/master
Diffstat (limited to 'sysdeps/x86_64/rtld-strcmp.S')
-rw-r--r-- | sysdeps/x86_64/rtld-strcmp.S | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sysdeps/x86_64/rtld-strcmp.S b/sysdeps/x86_64/rtld-strcmp.S new file mode 100644 index 0000000000..a25535c161 --- /dev/null +++ b/sysdeps/x86_64/rtld-strcmp.S @@ -0,0 +1,28 @@ +#include <sysdep.h> +#include "asm-syntax.h" +#include "bp-sym.h" +#include "bp-asm.h" + +#ifndef LABEL +#define LABEL(l) L(l) +#endif + + .text +ENTRY (BP_SYM (STRCMP)) +/* Simple version since we can't use SSE registers in ld.so. */ +L(oop): movb (%rdi), %al + cmpb (%rsi), %al + jne L(neq) + incq %rdi + incq %rsi + testb %al, %al + jnz L(oop) + + xorl %eax, %eax + ret + +L(neq): movl $1, %eax + movl $-1, %ecx + cmovbl %ecx, %eax + ret +END (BP_SYM (STRCMP)) |