Closed Bug 1059733 Opened 10 years ago Closed 10 years ago

OdinMonkey - SIMD: add support for bitwise ops

Categories

(Core :: JavaScript Engine: JIT, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: bbouvier, Assigned: bbouvier)

References

Details

Attachments

(1 file, 1 obsolete file)

This is high priority for the Mandelbrot demo.
Attached patch Patch + tests (obsolete) — Splinter Review
Attachment #8480528 - Flags: review?(luke)
Comment on attachment 8480528 [details] [diff] [review]
Patch + tests

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

Nice

::: js/src/asmjs/AsmJSValidate.cpp
@@ +4644,5 @@
> +                MSimdBinaryArith::Operation op, MDefinition **def, Type *type)
> +{
> +    JS_ASSERT_IF(simdType == AsmJSSimdType_int32x4,
> +                 op != MSimdBinaryArith::Mul && op != MSimdBinaryArith::Div);
> +    return CheckBinarySimd<MSimdBinaryArith>(f, call, simdType, op, def, type);

Instead of all this, could we just pass the 'global' all the way through and switch at the end of CheckBinarySimd?
Attachment #8480528 - Flags: review?(luke) → review+
(In reply to Benjamin Bouvier [:bbouvier] from comment #0)
> This is high priority for the Mandelbrot demo.

I'm not actually sure this is true. The only bitwise op used in the mandelbrot demo is i4_and, but it is being used on a bool, to change the set {-1,0} into {1,0} to be passed into i4_add.
so
count = i4_add(count, i4_and(mi4, ones_i4))
can just be i4_sub(count, mi4)
and no bitops are needed. (it'll probably also run a couple of cycles faster)
Attached patch bug1059733.patchSplinter Review
Attachment #8480528 - Attachment is obsolete: true
Attachment #8481315 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/1eb94f3ebf22
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: