Closed Bug 1144005 Opened 9 years ago Closed 9 years ago

IonMonkey: MIPS: Fix encode break instruction

Categories

(Core :: JavaScript Engine: JIT, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: hev, Assigned: hev)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150305221847

Steps to reproduce:

Breaks between 0 and kMaxWatchpointCode are treated as simple watchpoints, the simulator will run through them and print the registers. In fact, the simulator stoped at break 1. because break instruction encoding error.

break instruction define:
31-26    25-6    5-0
special  code    break
000000           001101

The right code of break shift is 6, isn't RTShift(16).
Attachment #8578442 - Flags: review?(branislav.rankov)
Comment on attachment 8578442 [details] [diff] [review]
IonMonkey-MIPS-Fix-encode-break-instruction.patch

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

::: js/src/jit/mips/Assembler-mips.cpp
@@ +1462,4 @@
>  Assembler::as_break(uint32_t code)
>  {
>      MOZ_ASSERT(code <= MAX_BREAK_CODE);
> +    writeInst(op_special | code << 6 | ff_break);

NIT: Use constant FunctionBits instead of 6.

You can also add a new constant for this. But FunctionBits is also correct choice.

::: js/src/jit/mips/Simulator-mips.cpp
@@ +42,4 @@
>  namespace js {
>  namespace jit {
>  
> +static const Instr kCallRedirInstr = op_special | MAX_BREAK_CODE << 6 | ff_break;

NIT: Same as above.
Attachment #8578442 - Flags: review?(branislav.rankov) → review+
Replace previous patch and review+.
Attachment #8579736 - Flags: review+
Attachment #8578442 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c95b819aba41
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: