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/aarch64-macos/mpn/lshift.s |
claude is gud
Diffstat (limited to 'vere/ext/gmp/gen/aarch64-macos/mpn/lshift.s')
-rw-r--r-- | vere/ext/gmp/gen/aarch64-macos/mpn/lshift.s | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/vere/ext/gmp/gen/aarch64-macos/mpn/lshift.s b/vere/ext/gmp/gen/aarch64-macos/mpn/lshift.s new file mode 100644 index 0000000..14e5a71 --- /dev/null +++ b/vere/ext/gmp/gen/aarch64-macos/mpn/lshift.s @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .text + .align 3 + .globl ___gmpn_lshift + +___gmpn_lshift: + add x16, x0, x2, lsl #3 + add x1, x1, x2, lsl #3 + sub x8, xzr, x3 + lsr x17, x2, #2 + tbz x2, #0, Lbx0 + +Lbx1: ldr x4, [x1,#-8] + tbnz x2, #1, Lb11 + +Lb01: lsr x0, x4, x8 + lsl x2, x4, x3 + cbnz x17, Lgt1 + str x2, [x16,#-8] + ret +Lgt1: ldp x4, x5, [x1,#-24] + sub x1, x1, #8 + add x16, x16, #16 + b Llo2 + +Lb11: lsr x0, x4, x8 + lsl x2, x4, x3 + ldp x6, x7, [x1,#-24]! + b Llo3 + +Lbx0: ldp x4, x5, [x1,#-16] + tbz x2, #1, Lb00 + +Lb10: lsr x0, x5, x8 + lsl x13, x5, x3 + lsr x10, x4, x8 + lsl x2, x4, x3 + cbnz x17, Lgt2 + orr x10, x10, x13 + stp x2, x10, [x16,#-16] + ret +Lgt2: ldp x4, x5, [x1,#-32] + orr x10, x10, x13 + str x10, [x16,#-8] + sub x1, x1, #16 + add x16, x16, #8 + b Llo2 + +Lb00: lsr x0, x5, x8 + lsl x13, x5, x3 + lsr x10, x4, x8 + lsl x2, x4, x3 + ldp x6, x7, [x1,#-32]! + orr x10, x10, x13 + str x10, [x16,#-8]! + b Llo0 + + .align 4 +Ltop: ldp x4, x5, [x1,#-16] + orr x10, x10, x13 + orr x11, x12, x2 + stp x10, x11, [x16,#-16] + lsl x2, x6, x3 +Llo2: lsr x10, x4, x8 + lsl x13, x5, x3 + lsr x12, x5, x8 + ldp x6, x7, [x1,#-32]! + orr x10, x10, x13 + orr x11, x12, x2 + stp x10, x11, [x16,#-32]! + lsl x2, x4, x3 +Llo0: sub x17, x17, #1 +Llo3: lsr x10, x6, x8 + lsl x13, x7, x3 + lsr x12, x7, x8 + cbnz x17, Ltop + +Lend: orr x10, x10, x13 + orr x11, x12, x2 + lsl x2, x6, x3 + stp x10, x11, [x16,#-16] + str x2, [x16,#-24] + ret + |