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

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

Issue 1877133004: [x64] Avoid sign extension in TruncateFloat64ToInt32(TruncationMode::kJavaScript) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Avoid to use the additional movl instruction. Created 4 years, 8 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 | src/x64/macro-assembler-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 30b0f9dce62343a590dd93225800537e24460013..ad58f595f84d264be18cbe34bffdd09f98dcc058 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -791,8 +791,8 @@ void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
auto result = i.OutputRegister();
auto input = i.InputDoubleRegister(0);
auto ool = new (zone()) OutOfLineTruncateDoubleToI(this, result, input);
- __ Cvttsd2siq(result, input);
- __ cmpq(result, Immediate(1));
+ __ Cvttsd2si(result, input);
+ __ cmpl(result, Immediate(1));
__ j(overflow, ool->entry());
__ bind(ool->exit());
break;
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698