Bug 95221 - LLInt should not rely on ordering of global labels
Summary: LLInt should not rely on ordering of global labels
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-28 11:23 PDT by Filip Pizlo
Modified: 2012-08-28 13:45 PDT (History)
7 users (show)

See Also:


Attachments
the patch (3.77 KB, patch)
2012-08-28 11:25 PDT, Filip Pizlo
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2012-08-28 11:23:45 PDT
Some instructions must be distinct in the bytecode for the purpose of subsequent compilation decisions (the loop instructions come to mind) but are identical in the LLInt.  Currently we use this pattern:

_llint_op_loop:
    nop
_llint_op_jmp:
    # stuff

This makes _llint_op_loop distinct from _llint_op_jmp, except that it also assumes that the linker will lay out jmp right after loop.  It will do this on many (all?) platforms, but we should not rely on this, particularly since we're using inline assembly, and so we may be subject to whatever crazy assembly directives the C++ compiler feels like emitting.
Comment 1 Filip Pizlo 2012-08-28 11:25:49 PDT
Created attachment 161021 [details]
the patch
Comment 2 Filip Pizlo 2012-08-28 13:45:05 PDT
Landed in http://trac.webkit.org/changeset/126924