Closed Bug 1515704 Opened Last year Closed Last year

ARM64: Implement CodeGenerator::visitPowHalfD

Categories

(Core :: JavaScript Engine: JIT, enhancement)

ARM64
Unspecified
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: nbp, Assigned: nbp)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Attachment #9032749 - Flags: review?(sstangl)
Comment on attachment 9032749 [details] [diff] [review]
ARM64: Generate code for LPowHalfD.

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

Thanks! Looks good. My griping about the naming doesn't need to be fixed here.

::: js/src/jit/arm64/CodeGenerator-arm64.cpp
@@ +750,5 @@
> +  ScratchDoubleScope scratch(masm);
> +
> +  Label done, sqrt;
> +
> +  if (!ins->mir()->operandIsNeverNegativeInfinity()) {

Not your fault, but I did grumble somewhat at "if not is never."

Really should be operandCanbeNegativeInfinity(). Same with the other ones.

@@ +770,5 @@
> +  }
> +
> +  if (!ins->mir()->operandIsNeverNegativeZero()) {
> +    // Math.pow(-0, 0.5) == 0 == Math.pow(0, 0.5). Adding 0 converts any -0 to
> +    // 0.

Might as well put "Adding..." on its own line. (Codegenerator-x86-shared.cpp also, while we're at it!)
Attachment #9032749 - Flags: review?(sstangl) → review+
(In reply to Sean Stangl [:sstangl] from comment #2)
> ::: js/src/jit/arm64/CodeGenerator-arm64.cpp
> @@ +750,5 @@
> > +  ScratchDoubleScope scratch(masm);
> > +
> > +  Label done, sqrt;
> > +
> > +  if (!ins->mir()->operandIsNeverNegativeInfinity()) {
> 
> Not your fault, but I did grumble somewhat at "if not is never."
> 
> Really should be operandCanbeNegativeInfinity(). Same with the other ones.

I opened Bug 1516512 to get to track this.

> @@ +770,5 @@
> > +  }
> > +
> > +  if (!ins->mir()->operandIsNeverNegativeZero()) {
> > +    // Math.pow(-0, 0.5) == 0 == Math.pow(0, 0.5). Adding 0 converts any -0 to
> > +    // 0.
> 
> Might as well put "Adding..." on its own line. (Codegenerator-x86-shared.cpp
> also, while we're at it!)

I suspect this is a side effect of clang-format. I will add an empty comment line to prevent it.
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/89834b056ca0
ARM64: Generate code for LPowHalfD. r=sstangl
https://hg.mozilla.org/mozilla-central/rev/89834b056ca0
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.