diff options
author | polwex <polwex@sortug.com> | 2025-10-05 21:56:51 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-10-05 21:56:51 +0700 |
commit | fcedfddf00b3f994e4f4e40332ac7fc192c63244 (patch) | |
tree | 51d38e62c7bdfcc5f9a5e9435fe820c93cfc9a3d /vere/ext/gmp/gen/x86_64-linux/mpn/xor_n.s |
claude is gud
Diffstat (limited to 'vere/ext/gmp/gen/x86_64-linux/mpn/xor_n.s')
-rw-r--r-- | vere/ext/gmp/gen/x86_64-linux/mpn/xor_n.s | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/vere/ext/gmp/gen/x86_64-linux/mpn/xor_n.s b/vere/ext/gmp/gen/x86_64-linux/mpn/xor_n.s new file mode 100644 index 0000000..8ef14d0 --- /dev/null +++ b/vere/ext/gmp/gen/x86_64-linux/mpn/xor_n.s @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .text + .align 32, 0x90 + .globl __gmpn_xor_n + .type __gmpn_xor_n,@function + +__gmpn_xor_n: + + + mov (%rdx), %r8 + mov %ecx, %eax + lea (%rdx,%rcx,8), %rdx + lea (%rsi,%rcx,8), %rsi + lea (%rdi,%rcx,8), %rdi + neg %rcx + and $3, %eax + je .Lb00 + cmp $2, %eax + jc .Lb01 + je .Lb10 + +.Lb11: xor (%rsi,%rcx,8), %r8 + mov %r8, (%rdi,%rcx,8) + dec %rcx + jmp .Le11 +.Lb10: add $-2, %rcx + jmp .Le10 +.Lb01: xor (%rsi,%rcx,8), %r8 + mov %r8, (%rdi,%rcx,8) + inc %rcx + jz .Lret + +.Ltop: mov (%rdx,%rcx,8), %r8 +.Lb00: mov 8(%rdx,%rcx,8), %r9 + xor (%rsi,%rcx,8), %r8 + xor 8(%rsi,%rcx,8), %r9 + nop + mov %r8, (%rdi,%rcx,8) + mov %r9, 8(%rdi,%rcx,8) +.Le11: mov 16(%rdx,%rcx,8), %r8 +.Le10: mov 24(%rdx,%rcx,8), %r9 + xor 16(%rsi,%rcx,8), %r8 + xor 24(%rsi,%rcx,8), %r9 + mov %r8, 16(%rdi,%rcx,8) + mov %r9, 24(%rdi,%rcx,8) + add $4, %rcx + jnc .Ltop + +.Lret: + ret + .size __gmpn_xor_n,.-__gmpn_xor_n + + + + + |