chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3cb47d2
)
math/mpx-mul4-x86-sse2.S: Use `SHUF' instead of hardwired constants.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 5 Nov 2016 20:38:31 +0000
(20:38 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 5 Nov 2016 20:38:31 +0000
(20:38 +0000)
math/mpx-mul4-x86-sse2.S
patch
|
blob
|
blame
|
history
diff --git
a/math/mpx-mul4-x86-sse2.S
b/math/mpx-mul4-x86-sse2.S
index c0e1a788e8d9dd5f4c90e44611ba22bf354c953b..922de33d49649d8acda847056a17b4d92f8c43d4 100644
(file)
--- a/
math/mpx-mul4-x86-sse2.S
+++ b/
math/mpx-mul4-x86-sse2.S
@@
-103,7
+103,7
@@
.ifnes "\d3", "nil"
movdqa \d3, [\s + 16] // (s'_2, s'_3, s''_2, s''_3)
.endif
.ifnes "\d3", "nil"
movdqa \d3, [\s + 16] // (s'_2, s'_3, s''_2, s''_3)
.endif
- pshufd \d0, \d0,
0b11001100
// (r_i, ?, r_i, ?)
+ pshufd \d0, \d0,
SHUF(3, 0, 3, 0)
// (r_i, ?, r_i, ?)
.ifnes "\d1", "nil"
psrldq \d1, 4 // (s'_1, s''_0, s''_1, 0)
.endif
.ifnes "\d1", "nil"
psrldq \d1, 4 // (s'_1, s''_0, s''_1, 0)
.endif
@@
-168,7
+168,7
@@
// carry registers. On completion, XMM3 is clobbered. If CC is
// `nil', then the contribution which would have been added to it is
// left in C.
// carry registers. On completion, XMM3 is clobbered. If CC is
// `nil', then the contribution which would have been added to it is
// left in C.
- pshufd xmm3, \c,
0b10111111
// (?, ?, ?, t = c'' mod B)
+ pshufd xmm3, \c,
SHUF(2, 3, 3, 3)
// (?, ?, ?, t = c'' mod B)
psrldq xmm3, 12 // (t, 0, 0, 0) = (t, 0)
pslldq xmm3, 2 // (t b, 0)
paddq \c, xmm3 // (c' + t b, c'')
psrldq xmm3, 12 // (t, 0, 0, 0) = (t, 0)
pslldq xmm3, 2 // (t b, 0)
paddq \c, xmm3 // (c' + t b, c'')
@@
-206,11
+206,11
@@
punpcklwd \c, \z // (c'_0, c''_0, c'_1, c''_1)
punpckhwd \d, \z // (c'_2, c''_2, c'_3, c''_3)
.endif
punpcklwd \c, \z // (c'_0, c''_0, c'_1, c''_1)
punpckhwd \d, \z // (c'_2, c''_2, c'_3, c''_3)
.endif
- pshufd \a, \a,
0b11011000
// (a'_0, a'_1, a''_0, a''_1)
- pshufd \b, \b,
0b11011000
// (a'_2, a'_3, a''_2, a''_3)
+ pshufd \a, \a,
SHUF(3, 1, 2, 0)
// (a'_0, a'_1, a''_0, a''_1)
+ pshufd \b, \b,
SHUF(3, 1, 2, 0)
// (a'_2, a'_3, a''_2, a''_3)
.ifnes "\c", "nil"
.ifnes "\c", "nil"
- pshufd \c, \c,
0b11011000
// (c'_0, c'_1, c''_0, c''_1)
- pshufd \d, \d,
0b11011000
// (c'_2, c'_3, c''_2, c''_3)
+ pshufd \c, \c,
SHUF(3, 1, 2, 0)
// (c'_0, c'_1, c''_0, c''_1)
+ pshufd \d, \d,
SHUF(3, 1, 2, 0)
// (c'_2, c'_3, c''_2, c''_3)
.endif
.endm
.endif
.endm