Closed Bug 476019 Opened 15 years ago Closed 15 years ago

Choose immediate-form instructions in X64 backend when possible.

Categories

(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect)

x86_64
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: edwsmith, Assigned: edwsmith)

References

Details

Attachments

(1 file, 2 obsolete files)

existing backend is a simple baseline, this layers in imm-folding instruction selection (#if !PEDANTIC)
Attachment #360565 - Flags: review?(rreitmai)
Attachment #360565 - Flags: review?(danderson)
Blocks: 476923
Comment on attachment 360565 [details] [diff] [review]
Drop the REX prefix when we don't need it

Lines 128/138 look like '-' rather than bitwise not in the preview pane, but I'm sure that's not the case.

Marking + on a cursory basis but I'm really going to have to take some time to look over all this mega bit-twiddling at some point.
Attachment #360565 - Flags: review?(rreitmai) → review+
patch is mostly self explanitory.  There are some cases when we could immediately issue a mov R, imm, instead of doing findRegFor(ins, R), for example when preparing for calls.

In those cases, we don't, because we rematerialize immediates anyway when register pressure is high.  issuing a mov vs waiting until rematerialization is necessary at best, moves the mov closer to where its used, and at worse, injects more instructions since it prevents the constant from being reused via a register.

We do aggressively fold constants into the RHS of binary operations, however.  Often they're 8bit constants and on average this reduces code size and register pressure.
Assignee: nobody → edwsmith
These forms are shorter and otherwise the same as the longer disp32 and rel32 forms, so it's always a win to use them.
Attachment #360565 - Flags: review?(danderson) → review+
Attachment #360626 - Attachment is obsolete: true
Comment on attachment 360626 [details] [diff] [review]
use disp8 addressing and rel8 branch offsets when possible.

belongs on bug 476923
Comment on attachment 360565 [details] [diff] [review]
Drop the REX prefix when we don't need it

pushed http://hg.mozilla.org/tamarin-redux/rev/b807a86c17b1
Attachment #360565 - Attachment is obsolete: true
Attachment #360625 - Flags: review?(rreitmai)
Attachment #360625 - Flags: review?(lhansen)
Attachment #360625 - Flags: review?(gal)
Attachment #360625 - Flags: review?(lhansen) → review+
pushed http://hg.mozilla.org/tamarin-redux/rev/93921209a6c9
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #360625 - Flags: review?(rreitmai) → review+
Attachment #360625 - Flags: review?(gal) → review+
Resolved fixed engineering / work item that has been pushed.  Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: