[Webkit-unassigned] [Bug 150685] New: B3::LowerToAir::imm() should work for both 32-bit and 64-bit immediates

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 29 12:44:16 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=150685

            Bug ID: 150685
           Summary: B3::LowerToAir::imm() should work for both 32-bit and
                    64-bit immediates
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: fpizlo at apple.com

In B3, a constant must match the type of its use. In Air, immediates don't have type, they only have representation. A 32-bit immediate (i.e. Arg::imm) can be used either for 32-bit operations or for 64-bit operations. The only difference from a Arg::imm64 is that it requires fewer bits.

In the B3->Air lowering, we have a lot of code that is effectively polymorphic over integer type.  That code should still be able to use Arg::imm, and it should work even for 64-bit immediates - so long as they are representable as 32-bit immediates.  Therefore, the imm() helper should happily accept either Const32Value or Const64Value.

We already sort of had this with immAnyType(), but it just turns out that anyone using immAnyType() should really be using imm().

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151029/b00ed108/attachment.html>


More information about the webkit-unassigned mailing list