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

Side by Side Diff: src/compiler/x87/code-generator-x87.cc

Issue 1847493002: [X87] [TurboFan] Fix Float32ToFloat64 code generation bug. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | no next file » | 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 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 __ pop(input_reg); 1288 __ pop(input_reg);
1289 } else { 1289 } else {
1290 __ fild_s(i.InputOperand(0)); 1290 __ fild_s(i.InputOperand(0));
1291 } 1291 }
1292 break; 1292 break;
1293 } 1293 }
1294 case kX87Float32ToFloat64: { 1294 case kX87Float32ToFloat64: {
1295 InstructionOperand* input = instr->InputAt(0); 1295 InstructionOperand* input = instr->InputAt(0);
1296 if (input->IsDoubleRegister()) { 1296 if (input->IsDoubleRegister()) {
1297 __ sub(esp, Immediate(kDoubleSize)); 1297 __ sub(esp, Immediate(kDoubleSize));
1298 __ fstp_d(MemOperand(esp, 0)); 1298 __ fstp_s(MemOperand(esp, 0));
1299 __ fld_d(MemOperand(esp, 0)); 1299 __ fld_s(MemOperand(esp, 0));
1300 __ add(esp, Immediate(kDoubleSize)); 1300 __ add(esp, Immediate(kDoubleSize));
1301 } else { 1301 } else {
1302 DCHECK(input->IsDoubleStackSlot()); 1302 DCHECK(input->IsDoubleStackSlot());
1303 if (FLAG_debug_code && FLAG_enable_slow_asserts) { 1303 if (FLAG_debug_code && FLAG_enable_slow_asserts) {
1304 __ VerifyX87StackDepth(1); 1304 __ VerifyX87StackDepth(1);
1305 } 1305 }
1306 __ fstp(0); 1306 __ fstp(0);
1307 __ fld_s(i.InputOperand(0)); 1307 __ fld_s(i.InputOperand(0));
1308 } 1308 }
1309 break; 1309 break;
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2404 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2405 __ Nop(padding_size); 2405 __ Nop(padding_size);
2406 } 2406 }
2407 } 2407 }
2408 2408
2409 #undef __ 2409 #undef __
2410 2410
2411 } // namespace compiler 2411 } // namespace compiler
2412 } // namespace internal 2412 } // namespace internal
2413 } // namespace v8 2413 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698