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 2c8783322ef2dbc7e2f60d7d576db378cb8c09b2..bde1aee5fb50a94621f6d9f7ef3917513560bb08 100644 |
--- a/src/compiler/x64/code-generator-x64.cc |
+++ b/src/compiler/x64/code-generator-x64.cc |
@@ -184,13 +184,21 @@ static bool HasImmediateInput(Instruction* instr, int index) { |
} while (0) |
-#define ASSEMBLE_SHIFT(asm_instr, width) \ |
- do { \ |
- if (HasImmediateInput(instr, 1)) { \ |
- __ asm_instr(i.OutputRegister(), Immediate(i.InputInt##width(1))); \ |
- } else { \ |
- __ asm_instr##_cl(i.OutputRegister()); \ |
- } \ |
+#define ASSEMBLE_SHIFT(asm_instr, width) \ |
+ do { \ |
+ if (HasImmediateInput(instr, 1)) { \ |
+ if (instr->Output()->IsRegister()) { \ |
+ __ asm_instr(i.OutputRegister(), Immediate(i.InputInt##width(1))); \ |
+ } else { \ |
+ __ asm_instr(i.OutputOperand(), Immediate(i.InputInt##width(1))); \ |
+ } \ |
+ } else { \ |
+ if (instr->Output()->IsRegister()) { \ |
+ __ asm_instr##_cl(i.OutputRegister()); \ |
+ } else { \ |
+ __ asm_instr##_cl(i.OutputOperand()); \ |
+ } \ |
+ } \ |
} while (0) |