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

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

Issue 431473004: TF: Add ConvertFloat64ToUint32 and ConvertUint32ToFloat64 machine operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // Move output to stack and clean up. 308 // Move output to stack and clean up.
309 __ fstp(1); 309 __ fstp(1);
310 __ fstp_d(Operand(esp, 0)); 310 __ fstp_d(Operand(esp, 0));
311 __ movsd(i.OutputDoubleRegister(), Operand(esp, 0)); 311 __ movsd(i.OutputDoubleRegister(), Operand(esp, 0));
312 __ add(esp, Immediate(kDoubleSize)); 312 __ add(esp, Immediate(kDoubleSize));
313 break; 313 break;
314 } 314 }
315 case kSSEFloat64ToInt32: 315 case kSSEFloat64ToInt32:
316 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); 316 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0));
317 break; 317 break;
318 case kSSEFloat64ToUint32: {
319 XMMRegister scratch = xmm0;
320 __ Move(scratch, -2147483648.0);
321 // TODO(turbofan): IA32 SSE subsd() should take an operand.
322 __ addsd(scratch, i.InputDoubleRegister(0));
323 __ cvttsd2si(i.OutputRegister(), scratch);
324 __ add(i.OutputRegister(), Immediate(0x80000000));
325 break;
326 }
318 case kSSEInt32ToFloat64: 327 case kSSEInt32ToFloat64:
319 __ cvtsi2sd(i.OutputDoubleRegister(), i.InputOperand(0)); 328 __ cvtsi2sd(i.OutputDoubleRegister(), i.InputOperand(0));
320 break; 329 break;
330 case kSSEUint32ToFloat64:
331 // TODO(turbofan): IA32 SSE LoadUint32() should take an operand.
332 __ LoadUint32(i.OutputDoubleRegister(), i.InputRegister(0));
333 break;
321 case kSSELoad: 334 case kSSELoad:
322 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); 335 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand());
323 break; 336 break;
324 case kSSEStore: { 337 case kSSEStore: {
325 int index = 0; 338 int index = 0;
326 Operand operand = i.MemoryOperand(&index); 339 Operand operand = i.MemoryOperand(&index);
327 __ movsd(operand, i.InputDoubleRegister(index)); 340 __ movsd(operand, i.InputDoubleRegister(index));
328 break; 341 break;
329 } 342 }
330 case kIA32LoadWord8: 343 case kIA32LoadWord8:
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 return false; 933 return false;
921 } 934 }
922 return *(code->instruction_start() + start_pc) == 935 return *(code->instruction_start() + start_pc) ==
923 v8::internal::Assembler::kNopByte; 936 v8::internal::Assembler::kNopByte;
924 } 937 }
925 938
926 #endif // DEBUG 939 #endif // DEBUG
927 } 940 }
928 } 941 }
929 } // namespace v8::internal::compiler 942 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698