| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 __ fnstsw_ax(); | 290 __ fnstsw_ax(); |
| 291 __ sahf(); | 291 __ sahf(); |
| 292 __ j(parity_even, &mod_loop); | 292 __ j(parity_even, &mod_loop); |
| 293 // Move output to stack and clean up. | 293 // Move output to stack and clean up. |
| 294 __ fstp(1); | 294 __ fstp(1); |
| 295 __ fstp_d(Operand(esp, 0)); | 295 __ fstp_d(Operand(esp, 0)); |
| 296 __ movsd(i.OutputDoubleRegister(), Operand(esp, 0)); | 296 __ movsd(i.OutputDoubleRegister(), Operand(esp, 0)); |
| 297 __ add(esp, Immediate(kDoubleSize)); | 297 __ add(esp, Immediate(kDoubleSize)); |
| 298 break; | 298 break; |
| 299 } | 299 } |
| 300 case kSSEFloat32ToFloat64: |
| 301 // TODO(turbofan): IA32 SSE conversions should take an operand. |
| 302 __ cvtss2sd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 303 break; |
| 304 case kSSEFloat64ToFloat32: |
| 305 // TODO(turbofan): IA32 SSE conversions should take an operand. |
| 306 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 307 break; |
| 300 case kSSEFloat64ToInt32: | 308 case kSSEFloat64ToInt32: |
| 301 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); | 309 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); |
| 302 break; | 310 break; |
| 303 case kSSEFloat64ToUint32: { | 311 case kSSEFloat64ToUint32: { |
| 304 XMMRegister scratch = xmm0; | 312 XMMRegister scratch = xmm0; |
| 305 __ Move(scratch, -2147483648.0); | 313 __ Move(scratch, -2147483648.0); |
| 306 __ addsd(scratch, i.InputOperand(0)); | 314 __ addsd(scratch, i.InputOperand(0)); |
| 307 __ cvttsd2si(i.OutputRegister(), scratch); | 315 __ cvttsd2si(i.OutputRegister(), scratch); |
| 308 __ add(i.OutputRegister(), Immediate(0x80000000)); | 316 __ add(i.OutputRegister(), Immediate(0x80000000)); |
| 309 break; | 317 break; |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 } | 952 } |
| 945 | 953 |
| 946 | 954 |
| 947 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | 955 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } |
| 948 | 956 |
| 949 #undef __ | 957 #undef __ |
| 950 | 958 |
| 951 } // namespace compiler | 959 } // namespace compiler |
| 952 } // namespace internal | 960 } // namespace internal |
| 953 } // namespace v8 | 961 } // namespace v8 |
| OLD | NEW |