Closed Bug 814179 Opened 11 years ago Closed 11 years ago

BaselineCompiler: Fix bitwise ops on arm

Categories

(Core :: JavaScript Engine, defect)

ARM
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: evilpie, Assigned: dougc)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #811314 +++

Something is going wrong on arm. And we are missing an optimization for JSOP_URSH.
OS: Linux → All
Hardware: x86_64 → ARM
Assignee: general → dtc-moz
Comment on attachment 739558 [details] [diff] [review]
Optimize BC ARM JSOP_URSH for a double type result.

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

Excellent, thanks! I will fix the nits, push this to Try and then land this today or tomorrow (or let me know if you have commit access and I will let you do it).

::: js/src/ion/arm/BaselineIC-arm.cpp
@@ +182,5 @@
> +            Label toUint;
> +            masm.j(Assembler::LessThan, &toUint);
> +
> +            // Move result and box for return.
> +            masm.tagValue(JSVAL_TYPE_INT32, scratchReg, R0);

Nit: this can be

masm.mov(scratchReg, R0.payloadReg());

because R0.typeReg() should still hold the int32 type tag from the LHS. On x86 we need the tagValue because the rhs operand *must* be in ecx (= R0.typeReg()) there, so we clobber it and use tagValue to restore it afterwards.

@@ +189,5 @@
> +            masm.bind(&toUint);
> +            masm.convertUInt32ToDouble(scratchReg, ScratchFloatReg);
> +            masm.boxDouble(ScratchFloatReg, R0);
> +        }
> +        else {

Nit: } else {
Attachment #739558 - Flags: review?(jdemooij) → review+
https://hg.mozilla.org/mozilla-central/rev/068fa0fc9064
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.