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/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 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 __ add(esp, Immediate(kDoubleSize)); | 1405 __ add(esp, Immediate(kDoubleSize)); |
1406 } | 1406 } |
1407 break; | 1407 break; |
1408 } | 1408 } |
1409 case kX87Float64ToUint32: { | 1409 case kX87Float64ToUint32: { |
1410 __ push_imm32(-2147483648); | 1410 __ push_imm32(-2147483648); |
1411 if (!instr->InputAt(0)->IsDoubleRegister()) { | 1411 if (!instr->InputAt(0)->IsDoubleRegister()) { |
1412 __ fld_d(i.InputOperand(0)); | 1412 __ fld_d(i.InputOperand(0)); |
1413 } | 1413 } |
1414 __ fild_s(Operand(esp, 0)); | 1414 __ fild_s(Operand(esp, 0)); |
1415 __ fadd(1); | 1415 __ fld(1); |
1416 __ fstp(0); | 1416 __ faddp(); |
1417 __ TruncateX87TOSToI(i.OutputRegister(0)); | 1417 __ TruncateX87TOSToI(i.OutputRegister(0)); |
1418 __ add(esp, Immediate(kInt32Size)); | 1418 __ add(esp, Immediate(kInt32Size)); |
1419 __ add(i.OutputRegister(), Immediate(0x80000000)); | 1419 __ add(i.OutputRegister(), Immediate(0x80000000)); |
| 1420 __ fstp(0); |
1420 if (!instr->InputAt(0)->IsDoubleRegister()) { | 1421 if (!instr->InputAt(0)->IsDoubleRegister()) { |
1421 __ fstp(0); | 1422 __ fstp(0); |
1422 } | 1423 } |
1423 break; | 1424 break; |
1424 } | 1425 } |
1425 case kX87Float64ExtractHighWord32: { | 1426 case kX87Float64ExtractHighWord32: { |
1426 if (instr->InputAt(0)->IsDoubleRegister()) { | 1427 if (instr->InputAt(0)->IsDoubleRegister()) { |
1427 __ sub(esp, Immediate(kDoubleSize)); | 1428 __ sub(esp, Immediate(kDoubleSize)); |
1428 __ fst_d(MemOperand(esp, 0)); | 1429 __ fst_d(MemOperand(esp, 0)); |
1429 __ mov(i.OutputRegister(), MemOperand(esp, kDoubleSize / 2)); | 1430 __ mov(i.OutputRegister(), MemOperand(esp, kDoubleSize / 2)); |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2427 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2428 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2428 __ Nop(padding_size); | 2429 __ Nop(padding_size); |
2429 } | 2430 } |
2430 } | 2431 } |
2431 | 2432 |
2432 #undef __ | 2433 #undef __ |
2433 | 2434 |
2434 } // namespace compiler | 2435 } // namespace compiler |
2435 } // namespace internal | 2436 } // namespace internal |
2436 } // namespace v8 | 2437 } // namespace v8 |
OLD | NEW |