Closed Bug 946481 Opened 10 years ago Closed 10 years ago

IonMonkey: xaddl assembler support

Categories

(Core :: JavaScript Engine: JIT, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: sstangl, Assigned: sstangl)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
Adds support for emitting |xaddl| to the common assembler, and adds a safe wrapper in Assembler-x86-shared.cpp.

Safe precursor to Bug 933001.
Attachment #8342674 - Flags: review?(efaustbmo)
Blocks: 933001
Comment on attachment 8342674 [details] [diff] [review]
patch

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

Looks good. r=me.

::: js/src/assembler/assembler/X86Assembler.h
@@ +320,4 @@
>          OP2_MOVSX_GvEw      = 0xBF,
>          OP2_MOVZX_GvEb      = 0xB6,
>          OP2_MOVZX_GvEw      = 0xB7,
> +        OP2_XADD_EvGv       = 0xC1,

This is not the instruction encoding for single byte regs and memory operands. If we ever think we want that, we will have to address it. Since the function is called xaddl(), I'd say we're safe.

@@ +636,5 @@
> +
> +    void xaddl_rm(RegisterID srcdest, int offset, RegisterID base, RegisterID index, int scale)
> +    {
> +        spew("lock xaddl %s, %d(%s,%s,%d)",
> +        nameIReg(4, srcdest), offset, nameIReg(base), nameIReg(index), 1<<scale);

No pretty print?
Attachment #8342674 - Flags: review?(efaustbmo) → review+
Follow-up to fix PRETTY_PRINT_OFFSET misuse.
https://hg.mozilla.org/integration/mozilla-inbound/rev/653645bf66fb
https://hg.mozilla.org/mozilla-central/rev/b2de3b90184a
https://hg.mozilla.org/mozilla-central/rev/653645bf66fb
Assignee: nobody → sstangl
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.