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-macos/mpn/mode1o.s |
claude is gud
Diffstat (limited to 'vere/ext/gmp/gen/x86_64-macos/mpn/mode1o.s')
-rw-r--r-- | vere/ext/gmp/gen/x86_64-macos/mpn/mode1o.s | 189 |
1 files changed, 189 insertions, 0 deletions
diff --git a/vere/ext/gmp/gen/x86_64-macos/mpn/mode1o.s b/vere/ext/gmp/gen/x86_64-macos/mpn/mode1o.s new file mode 100644 index 0000000..c715f7c --- /dev/null +++ b/vere/ext/gmp/gen/x86_64-macos/mpn/mode1o.s @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .text + .align 5, 0x90 + .globl ___gmpn_modexact_1_odd + + +___gmpn_modexact_1_odd: + + + mov $0, %ecx + + + .globl ___gmpn_modexact_1c_odd + + +___gmpn_modexact_1c_odd: + + +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 4, 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 + + ret + + + |