summaryrefslogtreecommitdiff
path: root/vere/ext/gmp/gen/aarch64-linux/mpn/mul_1.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/aarch64-linux/mpn/mul_1.s
claude is gud
Diffstat (limited to 'vere/ext/gmp/gen/aarch64-linux/mpn/mul_1.s')
-rw-r--r--vere/ext/gmp/gen/aarch64-linux/mpn/mul_1.s142
1 files changed, 142 insertions, 0 deletions
diff --git a/vere/ext/gmp/gen/aarch64-linux/mpn/mul_1.s b/vere/ext/gmp/gen/aarch64-linux/mpn/mul_1.s
new file mode 100644
index 0000000..c8c5fab
--- /dev/null
+++ b/vere/ext/gmp/gen/aarch64-linux/mpn/mul_1.s
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .text
+ .align 3
+ .globl __gmpn_mul_1c
+ .type __gmpn_mul_1c,@function
+__gmpn_mul_1c:
+ adds xzr, xzr, xzr
+ b .Lcom
+ .size __gmpn_mul_1c,.-__gmpn_mul_1c
+
+ .text
+ .align 3
+ .globl __gmpn_mul_1
+ .type __gmpn_mul_1,@function
+__gmpn_mul_1:
+ adds x4, xzr, xzr
+.Lcom: lsr x18, x2, #2
+ tbnz x2, #0, .Lbx1
+
+.Lbx0: mov x11, x4
+ tbz x2, #1, .Lb00
+
+.Lb10: ldp x4, x5, [x1]
+ mul x8, x4, x3
+ umulh x10, x4, x3
+ cbz x18, .L2
+ ldp x6, x7, [x1,#16]!
+ mul x9, x5, x3
+ b .Lmid-8
+
+.L2: mul x9, x5, x3
+ b .L2e
+
+.Lbx1: ldr x7, [x1],#8
+ mul x9, x7, x3
+ umulh x11, x7, x3
+ adds x9, x9, x4
+ str x9, [x0],#8
+ tbnz x2, #1, .Lb10
+
+.Lb01: cbz x18, .L1
+
+.Lb00: ldp x6, x7, [x1]
+ mul x8, x6, x3
+ umulh x10, x6, x3
+ ldp x4, x5, [x1,#16]
+ mul x9, x7, x3
+ adcs x12, x8, x11
+ umulh x11, x7, x3
+ add x0, x0, #16
+ sub x18, x18, #1
+ cbz x18, .Lend
+
+ .align 4
+.Ltop: mul x8, x4, x3
+ ldp x6, x7, [x1,#32]!
+ adcs x13, x9, x10
+ umulh x10, x4, x3
+ mul x9, x5, x3
+ stp x12, x13, [x0,#-16]
+ adcs x12, x8, x11
+ umulh x11, x5, x3
+.Lmid: mul x8, x6, x3
+ ldp x4, x5, [x1,#16]
+ adcs x13, x9, x10
+ umulh x10, x6, x3
+ mul x9, x7, x3
+ stp x12, x13, [x0],#32
+ adcs x12, x8, x11
+ umulh x11, x7, x3
+ sub x18, x18, #1
+ cbnz x18, .Ltop
+
+.Lend: mul x8, x4, x3
+ adcs x13, x9, x10
+ umulh x10, x4, x3
+ mul x9, x5, x3
+ stp x12, x13, [x0,#-16]
+.L2e: adcs x12, x8, x11
+ umulh x11, x5, x3
+ adcs x13, x9, x10
+ stp x12, x13, [x0]
+.L1: adc x0, x11, xzr
+ ret
+ .size __gmpn_mul_1,.-__gmpn_mul_1