math/mpx-mul4-*.S: Output expanded Montgomery factor in a sensible order.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 5 Nov 2019 11:13:03 +0000 (11:13 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 9 May 2020 19:57:33 +0000 (20:57 +0100)
commit0b38b8b77ca6eef0006b1051f86df440fe5ab8dd
tree789a1acb73b3c4ac5c07e34f0ab1b4cf2ac2b9ef
parent59aa39f8a0065d8bc3b2a353706f41f0dd20be12
math/mpx-mul4-*.S: Output expanded Montgomery factor in a sensible order.

The current order is (y'_0, y'_1; y''_0, y''_1), (y'_2, y'_3; y''_2,
y''_3), but while this makes sense in the context of SSE2, it's not
really very satisfactory as a common currency.  (In particular, if we
want to resolve the expanded factor into a value then we'll have to do
it by steam because the limb placements are irregular.)

Instead, fix the ordering in the test stubs so that the pieces come out
as (y'_0, y''_0; y'_1, y''_1), (y'_2, y''_2; y'_3, y''_3), which is
generally much better to work with outside of SSE2.

Of course, this only affects testing, not the actual code, so
performance is unchanged.
math/mpx-mul4-amd64-sse2.S
math/mpx-mul4-x86-sse2.S
math/t/mpx-mul4