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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 if (frame_access_state()->has_frame()) { 784 if (frame_access_state()->has_frame()) {
785 __ movq(i.OutputRegister(), Operand(rbp, 0)); 785 __ movq(i.OutputRegister(), Operand(rbp, 0));
786 } else { 786 } else {
787 __ movq(i.OutputRegister(), rbp); 787 __ movq(i.OutputRegister(), rbp);
788 } 788 }
789 break; 789 break;
790 case kArchTruncateDoubleToI: { 790 case kArchTruncateDoubleToI: {
791 auto result = i.OutputRegister(); 791 auto result = i.OutputRegister();
792 auto input = i.InputDoubleRegister(0); 792 auto input = i.InputDoubleRegister(0);
793 auto ool = new (zone()) OutOfLineTruncateDoubleToI(this, result, input); 793 auto ool = new (zone()) OutOfLineTruncateDoubleToI(this, result, input);
794 __ Cvttsd2siq(result, input); 794 __ Cvttsd2si(result, input);
795 __ cmpq(result, Immediate(1)); 795 __ cmpl(result, Immediate(1));
796 __ j(overflow, ool->entry()); 796 __ j(overflow, ool->entry());
797 __ bind(ool->exit()); 797 __ bind(ool->exit());
798 break; 798 break;
799 } 799 }
800 case kArchStoreWithWriteBarrier: { 800 case kArchStoreWithWriteBarrier: {
801 RecordWriteMode mode = 801 RecordWriteMode mode =
802 static_cast<RecordWriteMode>(MiscField::decode(instr->opcode())); 802 static_cast<RecordWriteMode>(MiscField::decode(instr->opcode()));
803 Register object = i.InputRegister(0); 803 Register object = i.InputRegister(0);
804 size_t index = 0; 804 size_t index = 0;
805 Operand operand = i.MemoryOperand(&index); 805 Operand operand = i.MemoryOperand(&index);
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
2260 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2260 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2261 __ Nop(padding_size); 2261 __ Nop(padding_size);
2262 } 2262 }
2263 } 2263 }
2264 2264
2265 #undef __ 2265 #undef __
2266 2266
2267 } // namespace compiler 2267 } // namespace compiler
2268 } // namespace internal 2268 } // namespace internal
2269 } // namespace v8 2269 } // namespace v8
OLDNEW
« 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