| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |