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 8a61d371bffed90e013b224aa674927407e9b63a..e1eb92f12bb09436d57d519a771e40ffabacad46 100644 |
--- a/src/compiler/x64/code-generator-x64.cc |
+++ b/src/compiler/x64/code-generator-x64.cc |
@@ -483,7 +483,13 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) { |
__ cvtqsi2sd(i.OutputDoubleRegister(), kScratchRegister); |
break; |
case kX64Movsxbl: |
- __ movsxbl(i.OutputRegister(), i.MemoryOperand()); |
+ if (instr->addressing_mode() != kMode_None) { |
+ __ movsxbl(i.OutputRegister(), i.MemoryOperand()); |
+ } else if (instr->InputAt(0)->IsRegister()) { |
+ __ movsxbl(i.OutputRegister(), i.InputRegister(0)); |
+ } else { |
+ __ movsxbl(i.OutputRegister(), i.InputOperand(0)); |
+ } |
__ AssertZeroExtended(i.OutputRegister()); |
break; |
case kX64Movzxbl: |