Closed Bug 1586662 Opened 5 years ago Closed 4 years ago

MacroAssembler::move64 doesn't use xor instruction for zeroing register

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox71 --- wontfix
firefox87 --- fixed

People

(Reporter: anba, Assigned: jandem)

References

Details

Attachments

(1 file)

x64 emits (for example):

[Codegen] movl       $0x0, %edx

x86 emits (for example):

[Codegen] movl       $0x0, %eax
[Codegen] movl       $0x0, %ebp

when calling masm.move64(Imm64(0), dest);.

Be aware that xor changes the flags, and thus may not be usable in all situations.

Priority: -- → P3

In theory xor could unexpectedly affect flags, but looking at the callers we don't
depend on flags being unaffected and this matches move32.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Blocks: 1688913
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d306abe67e3f
Use mov instead of movq for move64 to benefit from xor optimization. r=iain
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: