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

Unified Diff: runtime/vm/assembler_x64.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_x64.cc
===================================================================
--- runtime/vm/assembler_x64.cc (revision 29964)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -1458,6 +1458,17 @@
}
+void Assembler::TestImmediate(Register dst, const Immediate& imm, Register pp) {
+ if (CanLoadImmediateFromPool(imm, pp)) {
+ ASSERT(dst != TMP);
+ LoadImmediate(TMP, imm, pp);
+ testq(dst, TMP);
+ } else {
+ testq(dst, imm);
+ }
+}
+
+
void Assembler::andl(Register dst, Register src) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
Operand operand(src);

Powered by Google App Engine
This is Rietveld 408576698