Closed Bug 557705 Opened 15 years ago Closed 15 years ago

nanojit: clean up codegen of i386 jumps

Categories

(Core Graveyard :: Nanojit, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

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

References

Details

(Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey, fixed-in-tamarin)

Attachments

(2 files)

Attached patch patchSplinter Review
This patch: - Simplifies printing of jmp targets -- it prints 't' directly rather than computing (in a roundabout fashion) 't - _nIns + _nIns'. - In JMP(), handles correctly a target of 0 (which requires later patching) by design, not just by luck. In JCC() and JMP_long() it asserts that the target is not zero. - Inlines JMP_long_nochk_offset() into its two callers and then removes it. Having that code factored out actually made things more complicated. - Moves three jmp constants to where they're more visible. These changes will help bug 506693. I confirmed that codegen is unchanged for TM on SunSpider.
Attachment #437477 - Flags: review?(edwsmith)
Attachment #437477 - Flags: review?(edwsmith) → review+
Blocks: 506693
TR generates conditional branches for loop edges (back-branches), which requires us to call asm_branch with target == 0, then patch later. This patch loses the assert that t (target) != 0, but explicitly handles the patch case (target == 0) like the way its done in the X64 backend, instead of working by accident.
Attachment #438755 - Flags: review?(nnethercote)
Attachment #438755 - Flags: review?(nnethercote) → review+
Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey → fixed-in-nanojit, fixed-in-tracemonkey, fixed-in-tamarin
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: