Bug 1237 - change knuth's algo-D divmod assembly to use new SVP64 features from bug #1183
Summary: change knuth's algo-D divmod assembly to use new SVP64 features from bug #1183
Status: CONFIRMED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: PC Linux
: High enhancement
Assignee: Jacob Lifshay
URL:
Depends on: 1183 1044
Blocks: 937 589
  Show dependency treegraph
 
Reported: 2023-12-19 03:24 GMT by Jacob Lifshay
Modified: 2023-12-19 08:19 GMT (History)
3 users (show)

See Also:
NLnet milestone: NLnet.2023-12-059.expansion
total budget (EUR) for completion of task and all subtasks: 0
budget (EUR) for this task, excluding subtasks' budget: 0
parent task for budget allocation: 1211
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Lifshay 2023-12-19 03:24:20 GMT
as described in https://bugs.libre-soc.org/show_bug.cgi?id=1044#c80

Knuth's Algorithm D needs inputs with the most-significant word being non-zero, so we have to find the number of leading zero words in our fixed-length inputs so we know how many words to tell Algorithm D is in the dynamically-sized inputs (basically, we just make Algorithm D ignore all the high-order zero words and act as if the inputs are really shorter than they are).

so, count-leading-zeros, except we're counting zero words, not bits.
https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/test/bigint/powmod.py;h=7fc794685bebb1f3c2451c64da041a0e81143e29;hb=d3c7a0ddc169877e8daf38a347091c366e85624b#l717
and
https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/test/bigint/powmod.py;h=7fc794685bebb1f3c2451c64da041a0e81143e29;hb=d3c7a0ddc169877e8daf38a347091c366e85624b#l734

* TODO: replace count-leading-zero-words code with dd-ff.
Comment 1 Luke Kenneth Casson Leighton 2023-12-19 08:16:40 GMT
ok so this is part of the dd-ffirstchanges i just actioned and
added to the spec: ddffirst now implies mapreduce mode.
this is *rel* important to make very clear with examples
such as this one.

if it can be actioned within the "Ongoing" grant bug 937
and/or the cryotoprimitives grant bug 589 that would be
much better than leaving it to a future grant.
Comment 2 Jacob Lifshay 2023-12-19 08:19:54 GMT
(In reply to Luke Kenneth Casson Leighton from comment #1)
> if it can be actioned within the "Ongoing" grant bug 937
> and/or the cryotoprimitives grant bug 589 that would be
> much better than leaving it to a future grant.

I think we can toss it into cryptoprimitives, just stuff it under the mul-remap bug since I don't expect it to be big enough to deserve its own budget (1-2 days work).