WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
150761
Add conditional moves to the MacroAssembler
https://bugs.webkit.org/show_bug.cgi?id=150761
Summary
Add conditional moves to the MacroAssembler
Filip Pizlo
Reported
2015-10-31 16:44:49 PDT
This would allow us to add Select to B3. The FTL uses Select quite a bit, so this is probably a good idea.
Attachments
Patch
(9.61 KB, patch)
2015-11-03 18:02 PST
,
Michael Saboff
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Saboff
Comment 1
2015-11-03 15:00:46 PST
Select is a non-branching instruction of the form x = select(a, b, c) where if a is non-zero then x = b else x = c. This is implemented using conditional moves, a CPU instruction that does not branch, but performs a move dependent on some condition. At the machine code level, a “cmov” is formatted very similarly to a branch, so it’s probably a matter of tweaking our branch formatting code. We probably want the API to be something like: m_jit.moveConditionally(LessThan, gpr1, gpr2, gpr3, gpr4); // move gpr3 to gpr4 if gpr1 is less than gpr2. m_jit.moveConditionallyTest(NonZero, gpr1, gpr2, gpr3, gpr4); // move gpr3 to gpr4 if (gpr1 & gpr2) != 0. m_jit.moveConditionallyDouble(DoubleEqual, fpr1, fpr2, gpr1, gpr2) // move gpr1 to gpr2 if fpr1 == fpr2.
Michael Saboff
Comment 2
2015-11-03 18:02:18 PST
Created
attachment 264761
[details]
Patch
WebKit Commit Bot
Comment 3
2015-11-07 10:11:36 PST
Comment on
attachment 264761
[details]
Patch Clearing flags on attachment: 264761 Committed
r192131
: <
http://trac.webkit.org/changeset/192131
>
WebKit Commit Bot
Comment 4
2015-11-07 10:11:40 PST
All reviewed patches have been landed. Closing bug.
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