Created attachment 437477 [details] [diff] [review] patch 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.
Created attachment 438755 [details] [diff] [review] Loosen code in JCC() to allow for patchable backwards branches 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.
NJ fix: http://hg.mozilla.org/projects/nanojit-central/rev/5f12e1da6b7f TR original: http://hg.mozilla.org/tamarin-redux/rev/7fc928af3c78 TR fix: http://hg.mozilla.org/tamarin-redux/rev/0dc2670f9505