WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
150685
B3::LowerToAir::imm() should work for both 32-bit and 64-bit immediates
https://bugs.webkit.org/show_bug.cgi?id=150685
Summary
B3::LowerToAir::imm() should work for both 32-bit and 64-bit immediates
Filip Pizlo
Reported
2015-10-29 12:44:16 PDT
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().
Attachments
the patch
(4.35 KB, patch)
2015-10-29 13:11 PDT
,
Filip Pizlo
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2015-10-29 13:11:01 PDT
Created
attachment 264337
[details]
the patch
Geoffrey Garen
Comment 2
2015-10-29 14:22:32 PDT
Comment on
attachment 264337
[details]
the patch r=me
Filip Pizlo
Comment 3
2015-10-29 16:44:43 PDT
Landed in
http://trac.webkit.org/changeset/191762
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug