summaryrefslogtreecommitdiff
path: root/arch/x64/linux/memory/equal.S
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2021-03-12 08:48:35 +0100
committerEugen Wissner <belka@caraus.de>2021-03-12 08:48:35 +0100
commit0fcc83d00eb9d0699167bf105d522e7d23a44d32 (patch)
tree5cb0c97b04ec54cfba823e6c89dac99fbd5dcfdf /arch/x64/linux/memory/equal.S
parentf27f62b80abf8b237d5c4bf57427fd50aa17e2b0 (diff)
downloadtanya-0fcc83d00eb9d0699167bf105d522e7d23a44d32.tar.gz
Remove the sys package
Diffstat (limited to 'arch/x64/linux/memory/equal.S')
-rw-r--r--arch/x64/linux/memory/equal.S59
1 files changed, 0 insertions, 59 deletions
diff --git a/arch/x64/linux/memory/equal.S b/arch/x64/linux/memory/equal.S
deleted file mode 100644
index 37a906a..0000000
--- a/arch/x64/linux/memory/equal.S
+++ /dev/null
@@ -1,59 +0,0 @@
- .text
-
-/*
- * equalMemory.
- *
- * rdi - r1 length
- * rsi - r1 data.
- * rdx - r2 length.
- * rcx - r2 data.
- */
- .globl _D5tanya6memory2op11equalMemoryFNaNbNixAvxQdZb
- .type _D5tanya6memory2op11equalMemoryFNaNbNixAvxQdZb, @function
-_D5tanya6memory2op11equalMemoryFNaNbNixAvxQdZb:
- // Compare the lengths
- cmp %rdx, %rdi
- jne not_equal
-
- mov %rcx, %rdi
-
- // Check if we're aligned
- cmp $0x08, %rdx
- jc aligned_1
- test $0x07, %edi
- jz aligned_8
-
- naligned:
- cmpsb
- jne not_equal
-
- dec %rdx
- test $0x07, %edi
- jnz naligned
-
- aligned_8:
- mov %rdx, %rcx
- shr $0x03, %rcx
-
- repe cmpsq
- jne not_equal
-
- and $0x07, %edx
- jz equal
-
- aligned_1: // Compare the remaining bytes
- mov %rdx, %rcx
- cmp $0x0, %rcx
-
- repe cmpsb
- jne not_equal
-
- equal:
- mov $0x01, %rax // Return 1
- jmp end
-
- not_equal:
- xor %rax, %rax // Return 0
-
- end:
- ret