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

Unified Diff: src/compiler/x64/code-generator-x64.cc

Issue 939923003: Revert of [x64] Generate test reg,reg instead of cmp reg,0. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
index 8966fff01c60fe73d9737410bfa604a17aa138e4..973bbd1ef06bb794d153701c380eeae63b2c4057 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -209,27 +209,6 @@
} \
} while (0)
-
-#define ASSEMBLE_CMP(cmp_instr, test_instr) \
- do { \
- if (HasImmediateInput(instr, 1)) { \
- if (instr->InputAt(0)->IsRegister()) { \
- if (i.InputInt32(1) == 0) { \
- __ test_instr(i.InputRegister(0), i.InputRegister(0)); \
- } else { \
- __ cmp_instr(i.InputRegister(0), i.InputImmediate(1)); \
- } \
- } else { \
- __ cmp_instr(i.InputOperand(0), i.InputImmediate(1)); \
- } \
- } else { \
- if (instr->InputAt(1)->IsRegister()) { \
- __ cmp_instr(i.InputRegister(0), i.InputRegister(1)); \
- } else { \
- __ cmp_instr(i.InputRegister(0), i.InputOperand(1)); \
- } \
- } \
- } while (0)
#define ASSEMBLE_MULT(asm_instr) \
do { \
@@ -609,10 +588,10 @@
ASSEMBLE_BINOP(andq);
break;
case kX64Cmp32:
- ASSEMBLE_CMP(cmpl, testl);
+ ASSEMBLE_BINOP(cmpl);
break;
case kX64Cmp:
- ASSEMBLE_CMP(cmpq, testq);
+ ASSEMBLE_BINOP(cmpq);
break;
case kX64Test32:
ASSEMBLE_BINOP(testl);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698