Closed Bug 1229802 Opened 9 years ago Closed 9 years ago

Simplify MacroAssemblerARMCompat::decBranchPtr.

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox45 --- affected
firefox46 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

derived from bug 1229057 comment #30. https://dxr.mozilla.org/mozilla-central/rev/470f4f8c2b2d6f82e56e161a4b05262c85f55b59/js/src/jit/arm/MacroAssembler-arm.h#985 > void decBranchPtr(Condition cond, Register lhs, Imm32 imm, Label* label) { > subPtr(imm, lhs); > branch32(cond, lhs, Imm32(0), label); > } branch32 calls ma_cmp with SetCC, but ma_sub called in subPtr can also called with SetCC. We could replace them with ma_sub(..., SetCC) + j() or something note that bug 1229057 will move the definition of decBranchPtr to MacroAssembler-arm-inl.h
See Also: → 1229057
Changed to almost same code as branchSub32. Green on try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=302d5fb58843
Assignee: nobody → arai.unmht
Attachment #8700396 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8700396 [details] [diff] [review] Simplify MacroAssemblerARMCompat::decBranchPtr. Review of attachment 8700396 [details] [diff] [review]: ----------------------------------------------------------------- Good catch! ::: js/src/jit/arm/MacroAssembler-arm.h @@ +972,5 @@ > branch32(cond, lhs, imm, label); > } > + void decBranchPtr(Condition cond, Register lhs, Imm32 imm, Label* label) { > + ma_sub(imm, lhs, SetCC); > + j(cond, label); nit: "j" is a x86-ism, prefer "as_b" instead.
Attachment #8700396 - Flags: review?(nicolas.b.pierron) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: