Closed Bug 1023404 Opened 10 years ago Closed 6 years ago

[meta] SIMD backend: implement SIMD operations for x86/x64

Categories

(Core :: JavaScript Engine: JIT, defect, P5)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: bbouvier, Assigned: bbouvier)

References

Details

(Keywords: meta)

Attachments

(2 files, 1 obsolete file)

This bug should serve as a meta-bug for referencing all patches implementing SIMD operations. As discussed with involved people, instructions should be grouped whenever possible, when they have similar semantics: - with{X,Y,Z,W} - same thing for withFlag - add / sub / mul / div can be grouped as they all are binary arithmetic instructions - equal / greaterThan / lessThan / notEqual - min / max - shiftLeft, shiftRight, shiftRightLogical - and, or, not, xor - lane accessors and shuffle We should be careful and write some assertions that we are in a supported platform (in this case, x86 and x64). I will add a few blocking bugs as well as referencing others.
Attached patch Helpers for SIMD types (deleted) — Splinter Review
Just splitted up the patch from bug 1021716, as it had nothing to do there.
Attachment #8437780 - Flags: review?(sunfish)
Depends on: 1021716
Attachment #8437780 - Flags: review?(sunfish) → review+
Depends on: 1025100
Depends on: 1025127
Depends on: 1025475
Depends on: 1043337
Depends on: 1044256
Attached patch SimdDataSize (obsolete) (deleted) — Splinter Review
There are a few places in the code where we need to memcpy / memcmp SIMD values. Let's introduce a variable that holds the current size of SIMD datum to be used in these cases. Also adds a few names for iongraph.
Attachment #8463350 - Flags: review?(sunfish)
Attached patch Helpers for SIMD types (deleted) — Splinter Review
Carrying forward r+ from sunfish. Diff: - renames "arity" into "length" - SIMD => Simd
Attachment #8463352 - Flags: review+
Comment on attachment 8463350 [details] [diff] [review] SimdDataSize Review of attachment 8463350 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit/shared/Assembler-shared.h @@ +28,5 @@ > > +static const uint32_t SimdDataSize = 4 * sizeof(int32_t); > +static_assert(SimdDataSize >= 4 * sizeof(int32_t), "SIMD data should be able to contain int32x4"); > +static_assert(SimdDataSize >= 4 * sizeof(float), "SIMD data should be able to contain float32x4"); > +static_assert(SimdDataSize >= 2 * sizeof(double), "SIMD data should be able to contain float64x2"); Would it make sense to name this Simd128DataSize? Then these could be == rather than >= and we wouldn't have to worry about unused bytes for memcmp.
Attachment #8463350 - Flags: review?(sunfish) → review+
Comment on attachment 8463350 [details] [diff] [review] SimdDataSize Moved to bug 1019831 for consistency and dependency requirements.
Attachment #8463350 - Attachment is obsolete: true
Depends on: 1050312
Depends on: 1051860
Depends on: 1059529
Depends on: 1059749
Depends on: 1060437
Depends on: 1060789
Depends on: 1069956
Depends on: 1084319
Depends on: 1084404
No longer depends on: 1084319
Priority: -- → P5
This one bug was open to implement the codegen for all the SIMD operators proposed by SIMD.js on x86. We can consider it done, and this should be a sufficient starting point for the wasm SIMD implementation; codegen methods will remain in the x86-shared MacroAssembler files.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Assignee: nobody → bbouvier
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: