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

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

Issue 728103007: [x64] Recognize MOVSXBL. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | src/compiler/x64/instruction-selector-x64.cc » ('j') | 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 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:
« no previous file with comments | « no previous file | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698