summaryrefslogtreecommitdiff
path: root/vere/ext/gmp/gen/x86_64-windows/mpn/mode1o.s
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-10-05 21:56:51 +0700
committerpolwex <polwex@sortug.com>2025-10-05 21:56:51 +0700
commitfcedfddf00b3f994e4f4e40332ac7fc192c63244 (patch)
tree51d38e62c7bdfcc5f9a5e9435fe820c93cfc9a3d /vere/ext/gmp/gen/x86_64-windows/mpn/mode1o.s
claude is gud
Diffstat (limited to 'vere/ext/gmp/gen/x86_64-windows/mpn/mode1o.s')
-rw-r--r--vere/ext/gmp/gen/x86_64-windows/mpn/mode1o.s207
1 files changed, 207 insertions, 0 deletions
diff --git a/vere/ext/gmp/gen/x86_64-windows/mpn/mode1o.s b/vere/ext/gmp/gen/x86_64-windows/mpn/mode1o.s
new file mode 100644
index 0000000..3cc7720
--- /dev/null
+++ b/vere/ext/gmp/gen/x86_64-windows/mpn/mode1o.s
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .text
+ .align 32, 0x90
+ .globl __gmpn_modexact_1_odd
+
+ .def __gmpn_modexact_1_odd
+ .scl 2
+ .type 32
+ .endef
+__gmpn_modexact_1_odd:
+
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ mov %r8, %rdx
+
+ mov $0, %ecx
+ jmp Lent
+
+ .globl __gmpn_modexact_1c_odd
+
+ .def __gmpn_modexact_1c_odd
+ .scl 2
+ .type 32
+ .endef
+__gmpn_modexact_1c_odd:
+
+ push %rdi
+ push %rsi
+ mov %rcx, %rdi
+ mov %rdx, %rsi
+ mov %r8, %rdx
+ mov %r9, %rcx
+
+Lent:
+
+
+
+
+
+ mov %rdx, %r8
+ shr %edx
+
+
+ lea __gmp_binvert_limb_table(%rip), %r9
+
+
+ and $127, %edx
+ mov %rcx, %r10
+
+ movzbl (%r9,%rdx), %edx
+
+ mov (%rdi), %rax
+ lea (%rdi,%rsi,8), %r11
+ mov %r8, %rdi
+
+ lea (%rdx,%rdx), %ecx
+ imul %edx, %edx
+
+ neg %rsi
+
+ imul %edi, %edx
+
+ sub %edx, %ecx
+
+ lea (%rcx,%rcx), %edx
+ imul %ecx, %ecx
+
+ imul %edi, %ecx
+
+ sub %ecx, %edx
+ xor %ecx, %ecx
+
+ lea (%rdx,%rdx), %r9
+ imul %rdx, %rdx
+
+ imul %r8, %rdx
+
+ sub %rdx, %r9
+ mov %r10, %rdx
+
+
+
+ inc %rsi
+ jz Lone
+
+
+ .align 16, 0x90
+Ltop:
+
+
+
+
+
+
+
+
+
+ sub %rdx, %rax
+
+ adc $0, %rcx
+ imul %r9, %rax
+
+ mul %r8
+
+ mov (%r11,%rsi,8), %rax
+ sub %rcx, %rax
+ setc %cl
+
+ inc %rsi
+ jnz Ltop
+
+
+Lone:
+ sub %rdx, %rax
+
+ adc $0, %rcx
+ imul %r9, %rax
+
+ mul %r8
+
+ lea (%rcx,%rdx), %rax
+ pop %rsi
+ pop %rdi
+ ret
+
+
+