Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
uzp2 \res\().4s, \inl\().4s, \inh\().4s
.endm

.macro load_polys p0, p1, p2, p3, ptr, idx
.if \idx == 0
.macro load_polys_inc p0, p1, p2, p3, ptr
ldr \p1, [\ptr, #1*16]
ldr \p2, [\ptr, #2*16]
ldr \p3, [\ptr, #3*16]
ldr \p0, [\ptr], #4*16
.else
.endm

.macro load_polys p0, p1, p2, p3, ptr, idx
ldr \p0, [\ptr, #(1024*\idx-4*16)]
ldr \p1, [\ptr, #(1024*\idx-3*16)]
ldr \p2, [\ptr, #(1024*\idx-2*16)]
ldr \p3, [\ptr, #(1024*\idx-1*16)]
.endif
.endm

.macro pmull dl, dh, a, b
Expand Down Expand Up @@ -104,8 +104,8 @@ MLD_ASM_FN_SYMBOL(polyvecl_pointwise_acc_montgomery_l4_asm)
mov count, #(MLDSA_N / 4)

l4_loop_start:
load_polys q_a_0, q_a_1, q_a_2, q_a_3, a_ptr, 0
load_polys q_b_0, q_b_1, q_b_2, q_b_3, b_ptr, 0
load_polys_inc q_a_0, q_a_1, q_a_2, q_a_3, a_ptr
load_polys_inc q_b_0, q_b_1, q_b_2, q_b_3, b_ptr
// Bounds: |a_{i}| < q, |b_{i}| < 9q

pmull c_0_lo, c_0_hi, a_0, b_0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
uzp2 \res\().4s, \inl\().4s, \inh\().4s
.endm

.macro load_polys p0, p1, p2, p3, ptr, idx
.if \idx == 0
.macro load_polys_inc p0, p1, p2, p3, ptr
ldr \p1, [\ptr, #1*16]
ldr \p2, [\ptr, #2*16]
ldr \p3, [\ptr, #3*16]
ldr \p0, [\ptr], #4*16
.else
.endm

.macro load_polys p0, p1, p2, p3, ptr, idx
ldr \p0, [\ptr, #(1024*\idx-4*16)]
ldr \p1, [\ptr, #(1024*\idx-3*16)]
ldr \p2, [\ptr, #(1024*\idx-2*16)]
ldr \p3, [\ptr, #(1024*\idx-1*16)]
.endif
.endm

.macro pmull dl, dh, a, b
Expand Down Expand Up @@ -104,8 +104,8 @@ MLD_ASM_FN_SYMBOL(polyvecl_pointwise_acc_montgomery_l5_asm)
mov count, #(MLDSA_N / 4)

l5_loop_start:
load_polys q_a_0, q_a_1, q_a_2, q_a_3, a_ptr, 0
load_polys q_b_0, q_b_1, q_b_2, q_b_3, b_ptr, 0
load_polys_inc q_a_0, q_a_1, q_a_2, q_a_3, a_ptr
load_polys_inc q_b_0, q_b_1, q_b_2, q_b_3, b_ptr
// Bounds: |a_{i}| < q, |b_{i}| < 9q

pmull c_0_lo, c_0_hi, a_0, b_0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@
uzp2 \res\().4s, \inl\().4s, \inh\().4s
.endm

.macro load_polys p0, p1, p2, p3, ptr, idx
.if \idx == 0
.macro load_polys_inc p0, p1, p2, p3, ptr
ldr \p1, [\ptr, #1*16]
ldr \p2, [\ptr, #2*16]
ldr \p3, [\ptr, #3*16]
ldr \p0, [\ptr], #4*16
.else
.endm

.macro load_polys p0, p1, p2, p3, ptr, idx
ldr \p0, [\ptr, #(1024*\idx-4*16)]
ldr \p1, [\ptr, #(1024*\idx-3*16)]
ldr \p2, [\ptr, #(1024*\idx-2*16)]
ldr \p3, [\ptr, #(1024*\idx-1*16)]
.endif
.endm

.macro pmull dl, dh, a, b
Expand Down Expand Up @@ -104,8 +104,8 @@ MLD_ASM_FN_SYMBOL(polyvecl_pointwise_acc_montgomery_l7_asm)
mov count, #(MLDSA_N / 4)

l7_loop_start:
load_polys q_a_0, q_a_1, q_a_2, q_a_3, a_ptr, 0
load_polys q_b_0, q_b_1, q_b_2, q_b_3, b_ptr, 0
load_polys_inc q_a_0, q_a_1, q_a_2, q_a_3, a_ptr
load_polys_inc q_b_0, q_b_1, q_b_2, q_b_3, b_ptr
// Bounds: |a_{i}| < q, |b_{i}| < 9q

pmull c_0_lo, c_0_hi, a_0, b_0
Expand Down
6 changes: 3 additions & 3 deletions dev/aarch64_opt/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ intt.S: ../../aarch64_clean/src/intt.S
slothy-cli $(TARGET_ISA) $(TARGET_MICROARCH) $(TMPFILE) -o $@ -l intt_layer1234_start $(SLOTHY_FLAGS_SPLIT) -c split_heuristic_factor=2.5 $(RESERVE_X_ONLY_FLAG)

mld_polyvecl_pointwise_acc_montgomery_l4.S: ../../aarch64_clean/src/mld_polyvecl_pointwise_acc_montgomery_l4.S
cp $< $@
slothy-cli $(TARGET_ISA) $(TARGET_MICROARCH) $< -o $@ -l l4_loop_start $(SLOTHY_FLAGS) $(RESERVE_ALL_FLAG)

mld_polyvecl_pointwise_acc_montgomery_l5.S: ../../aarch64_clean/src/mld_polyvecl_pointwise_acc_montgomery_l5.S
cp $< $@
slothy-cli $(TARGET_ISA) $(TARGET_MICROARCH) $< -o $@ -l l5_loop_start $(SLOTHY_FLAGS) $(RESERVE_ALL_FLAG)

mld_polyvecl_pointwise_acc_montgomery_l7.S: ../../aarch64_clean/src/mld_polyvecl_pointwise_acc_montgomery_l7.S
cp $< $@
slothy-cli $(TARGET_ISA) $(TARGET_MICROARCH) $< -o $@ -l l7_loop_start $(SLOTHY_FLAGS_SPLIT) -c split_heuristic_factor=1.5 $(RESERVE_ALL_FLAG)

pointwise_montgomery.S: ../../aarch64_clean/src/pointwise_montgomery.S
cp $< $@
Expand Down
650 changes: 589 additions & 61 deletions dev/aarch64_opt/src/mld_polyvecl_pointwise_acc_montgomery_l4.S

Large diffs are not rendered by default.

756 changes: 685 additions & 71 deletions dev/aarch64_opt/src/mld_polyvecl_pointwise_acc_montgomery_l5.S

Large diffs are not rendered by default.

518 changes: 427 additions & 91 deletions dev/aarch64_opt/src/mld_polyvecl_pointwise_acc_montgomery_l7.S

Large diffs are not rendered by default.

Loading
Loading