aboutsummaryrefslogtreecommitdiff
path: root/S/str_diffn.S
diff options
context:
space:
mode:
authorKlaatu <[email protected]>2015-05-17 15:33:21 +1200
committerKlaatu <[email protected]>2015-05-17 15:33:21 +1200
commitb0de699679e8f1e39af847ed172d1ba605b4370c (patch)
tree01dac00471d61f727394e508c613b29cff0ceae5 /S/str_diffn.S
bulk upload of source
Diffstat (limited to 'S/str_diffn.S')
-rw-r--r--S/str_diffn.S26
1 files changed, 26 insertions, 0 deletions
diff --git a/S/str_diffn.S b/S/str_diffn.S
new file mode 100644
index 0000000..954d88f
--- /dev/null
+++ b/S/str_diffn.S
@@ -0,0 +1,26 @@
+.globl str_diffn
+.type str_diffn, @function
+str_diffn:
+ pushl %edi
+ pushl %esi
+ movl 12(%esp), %esi
+ movl 16(%esp), %edi
+ movl 20(%esp), %ecx
+.L1:
+ decl %ecx
+ js .L2
+ lodsb
+ scasb
+ jne .L3
+ testb %al,%al
+ jne .L1
+.L2:
+ xorl %eax,%eax
+ jmp .L4
+.L3:
+ sbbl %eax,%eax
+ orb $1,%al
+.L4:
+ popl %esi
+ popl %edi
+ ret