Closed
Bug 1271972
Opened 8 years ago
Closed 8 years ago
wasm: Implement i64.{clz,ctz,popcnt,eqz}
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: bbouvier, Assigned: bbouvier)
References
Details
Attachments
(4 files, 2 obsolete files)
3.86 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
7.00 KB,
patch
|
lth
:
review+
|
Details | Diff | Splinter Review |
18.22 KB,
patch
|
sunfish
:
review+
|
Details | Diff | Splinter Review |
24.44 KB,
patch
|
sunfish
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Comment 1•8 years ago
|
||
I have some basic masm-level code pending here, will upload soonish.
Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8751363 -
Flags: review?(sunfish)
Assignee | ||
Comment 3•8 years ago
|
||
For the ability to have int64 temporaries. I've tried making a templated class from which Int64Allocation/Int64Definition would inherit from, but doing so means having to redefine the ctors in the children classes, taking away all the interest of doing the inheritance at all.
Attachment #8751364 -
Flags: review?(jdemooij)
Assignee | ||
Comment 4•8 years ago
|
||
This makes us pass i64.wast from the spec repo.
Attachment #8751365 -
Flags: review?(sunfish)
Assignee | ||
Comment 5•8 years ago
|
||
Based on your ctz/clz patches, this hoists popcnt64 to the macro assembler. (if you want to comment on the code sequence when we don't have the popcnt instruction, i would ask kindly to do so in a review of the previous patch, please :))
Attachment #8751367 -
Flags: review?(lhansen)
Assignee | ||
Comment 6•8 years ago
|
||
Sorry for the spam, rebasing and histediting issues.
Attachment #8751363 -
Attachment is obsolete: true
Attachment #8751363 -
Flags: review?(sunfish)
Attachment #8751372 -
Flags: review?(sunfish)
Assignee | ||
Comment 7•8 years ago
|
||
Sorry for the spam, rebasing and histediting issues.
Attachment #8751365 -
Attachment is obsolete: true
Attachment #8751365 -
Flags: review?(sunfish)
Attachment #8751373 -
Flags: review?(sunfish)
Comment 8•8 years ago
|
||
Comment on attachment 8751367 [details] [diff] [review] 4. Hoist popcnt to the MacroAssembler Review of attachment 8751367 [details] [diff] [review]: ----------------------------------------------------------------- I landed the clz64/ctz64 patches, and I removed knownNotZero in the process. Would it be useful to have an InvalidReg64?
Attachment #8751367 -
Flags: review?(lhansen) → review+
Comment 9•8 years ago
|
||
Comment on attachment 8751364 [details] [diff] [review] 2.i64.infra.patch Review of attachment 8751364 [details] [diff] [review]: ----------------------------------------------------------------- Makes sense. ::: js/src/jit/LIR.h @@ +635,5 @@ > > void dump() const; > }; > > +class LInt64Definition Maybe templatize LInt64Allocation (LInt64Value<T> or something), then we can add: using LInt64Allocation = LInt64Value<LAllocation>; using LInt64Definition = LInt64Value<LDefinition>;
Attachment #8751364 -
Flags: review?(jdemooij) → review+
Comment 10•8 years ago
|
||
Comment on attachment 8751372 [details] [diff] [review] 1.eqz.patch Review of attachment 8751372 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/asmjs/Wasm.cpp @@ +277,5 @@ > case Expr::Else: > return f.iter().readElse(nullptr, nullptr); > case Expr::End: > return f.iter().readEnd(nullptr, nullptr, nullptr); > + case Expr::I32Eqz: The i64 form of eqz uses readConversion rather than readUnary because it needs a different type for the operand and result. It'd make sense to me to make the i32 form be a Conversion too, just to preserve what symmetry there is between i32 and i64, but we can go either way.
Attachment #8751372 -
Flags: review?(sunfish) → review+
Comment 11•8 years ago
|
||
Comment on attachment 8751373 [details] [diff] [review] 3.unary.i64.patch Review of attachment 8751373 [details] [diff] [review]: ----------------------------------------------------------------- Cool! Yay for the optimized path when the popcnt instruction is present. lzcnt and tzcnt are less critical, so we can do them in the future. :-).
Attachment #8751373 -
Flags: review?(sunfish) → review+
Comment 12•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b6de61e1364 https://hg.mozilla.org/integration/mozilla-inbound/rev/906763ccdf9a https://hg.mozilla.org/integration/mozilla-inbound/rev/4daee0696926 https://hg.mozilla.org/integration/mozilla-inbound/rev/8178f7c2581b
Comment 14•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6b6de61e1364 https://hg.mozilla.org/mozilla-central/rev/906763ccdf9a https://hg.mozilla.org/mozilla-central/rev/4daee0696926 https://hg.mozilla.org/mozilla-central/rev/8178f7c2581b https://hg.mozilla.org/mozilla-central/rev/e126886f6df8
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•