Closed Bug 1108825 Opened 5 years ago Closed 5 years ago

OdinMonkey: SIMD.int32x4.mul

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: sunfish, Assigned: bbouvier)

References

Details

Attachments

(1 file)

The ecmascript_simd spec includes mul on integer types.

SSE4.1 has PMULLD. On x86 processors which lack SSE4.1, one can shuffle the input values, do two pmuludq instructions, and then shuffle the results to pack the 4 low halves of the result values back into an int32x4 for the output.
Finally got it. Sorry the patch is way bigger than expected, but a big part of
it is only code motion. The int32x4.mul needs temporaries if we don't have
SSE4.1, and this condition on lowering makes lowering platform dependent, thus
ReorderCommutative needs to be visible from within the platform-specific
Lowerings, hence the code motion.

I've also added the FPUREG case to movdqa (in Assembler-x86-shared), as it
really doesn't make sense not to be able to copy an Operand to a Register
directly (without looking at the Operand kind).
Attachment #8533810 - Flags: review?(sunfish)
Assignee: nobody → benj
Status: NEW → ASSIGNED
Comment on attachment 8533810 [details] [diff] [review]
Implement SIMD.int32x4.mul in Odin

Review of attachment 8533810 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!
Attachment #8533810 - Flags: review?(sunfish) → review+
Duh, rebasing conflict with bhackett's patches to make lowering non fallible.

Get in the tree, or die try-ing: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ff8c8871c36c
https://hg.mozilla.org/mozilla-central/rev/354a878fcc9f
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Depends on: 1111306
You need to log in before you can comment on or make changes to this bug.