Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(901)

Unified Diff: runtime/vm/assembler_arm.cc

Issue 59613005: Merge (x & y) == 0 pattern to emit a single test instruction. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_arm.cc
===================================================================
--- runtime/vm/assembler_arm.cc (revision 29964)
+++ runtime/vm/assembler_arm.cc (working copy)
@@ -2442,6 +2442,16 @@
}
+void Assembler::TestImmediate(Register rn, int32_t imm, Condition cond) {
+ ShifterOperand shifter_op;
+ if (ShifterOperand::CanHold(imm, &shifter_op)) {
+ tst(rn, shifter_op, cond);
+ } else {
+ LoadImmediate(IP, imm);
+ tst(rn, ShifterOperand(IP), cond);
+ }
+}
+
void Assembler::IntegerDivide(Register result, Register left, Register right,
DRegister tmpl, DRegister tmpr) {
ASSERT(tmpl != tmpr);

Powered by Google App Engine
This is Rietveld 408576698