IonMonkey: Add patchable call instruction

RESOLVED FIXED in mozilla21

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

unspecified
mozilla21
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

We need this to implement breakpoints in the baseline compiler.
Posted patch Part 1: ARMSplinter Review
Emits a MOVW, MOVT, BLX/NOP sequence and the BLX/NOP can be toggled. I tested this with some other debugging patches and it works with qemu-arm.
Attachment #703309 - Flags: review?(mrosenberg)
Attachment #703315 - Flags: review?(dvander)
Attachment #703315 - Flags: review?(dvander) → review+
Comment on attachment 703309 [details] [diff] [review]
Part 1: ARM

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

::: js/src/ion/arm/Assembler-arm.cpp
@@ +2497,5 @@
> +    inst = inst->next();
> +    JS_ASSERT(inst->is<InstNOP>() || inst->is<InstBLXReg>());
> +
> +    if (enabled)
> +        *inst = InstBLXReg(ScratchRegister, Always);

You may want to only call updateTop() when the actual instruction has been changed, since it will mostly likely involve making a rather slow syscall.
Attachment #703309 - Flags: review?(mrosenberg) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/c7b78d418a1e
https://hg.mozilla.org/integration/mozilla-inbound/rev/ef3ed8dd4726

(In reply to Marty Rosenberg [:mjrosenb] from comment #3)
> You may want to only call updateTop() when the actual instruction has been
> changed, since it will mostly likely involve making a rather slow syscall.

OK, I changed ToggleCall to be a no-op if it doesn't change anything.
https://hg.mozilla.org/mozilla-central/rev/c7b78d418a1e
https://hg.mozilla.org/mozilla-central/rev/ef3ed8dd4726
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.