Closed Bug 1108825 Opened 8 years ago Closed 8 years ago
Monkey: SIMD .int32x4 .mul
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+
Something's wrong, backed out for SM(e) failures and probably future jit-test failures like https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=dd24124194d5 https://hg.mozilla.org/integration/mozilla-inbound/rev/56d19efedf4f
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
All green, we should be good to go. https://hg.mozilla.org/integration/mozilla-inbound/rev/354a878fcc9f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.