Closed Bug 516903 Opened 16 years ago Closed 16 years ago

nanojit: fix printing of cmov, cmovq

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
status1.9.2 --- beta1-fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

When cmov/cmovq is debug printed, the condition is not shown. This patch fixes it, treating cmov conditions like guard conditions. The output now looks like this: eq20 = eq and14, 0 # codegen'd with the guard/cmov cmov4 = cmov eq20 ? and13 : and11 test esi,esi eax(ld16) ecx(and13) edx(and11) ebx(ld14) esi(and14) edi(sp) mov esi,-24(ebp) eax(ld16) ecx(and13) edx(and11) ebx(ld14) edi(sp) <= restore add4 cmovne ecx,edx eax(ld16) edx(and11) ebx(ld14) esi(add4) e di(sp) Previously the eq20 definition wasn't shown. It's possible the condition's definition will be printed twice as a result of this change, but that's (a) hard to avoid, (b) how it works for guards already, and (c) it makes a certain kind of sense because it reflects the way the code generation works. Eg. in the above example, if eq20 is used elsewhere, it will be regenerated via a "test esi,esi" instruction... I added a comment to asm_cmp() explaining this as it is non-obvious.
Attached patch patchSplinter Review
Attachment #400956 - Flags: review?(edwsmith)
Attachment #400956 - Attachment is patch: true
Attachment #400956 - Attachment mime type: application/octet-stream → text/plain
Blocks: 516909
Attachment #400956 - Flags: review?(edwsmith) → review+
Whiteboard: fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: