OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3770 __ cvtsi2sd(xmm_scratch, output_reg); | 3770 __ cvtsi2sd(xmm_scratch, output_reg); |
3771 __ ucomisd(input_reg, xmm_scratch); | 3771 __ ucomisd(input_reg, xmm_scratch); |
3772 __ j(equal, &done, Label::kNear); | 3772 __ j(equal, &done, Label::kNear); |
3773 __ sub(output_reg, Immediate(1)); | 3773 __ sub(output_reg, Immediate(1)); |
3774 DeoptimizeIf(overflow, instr->environment()); | 3774 DeoptimizeIf(overflow, instr->environment()); |
3775 | 3775 |
3776 __ bind(&done); | 3776 __ bind(&done); |
3777 } | 3777 } |
3778 } | 3778 } |
3779 | 3779 |
| 3780 |
3780 void LCodeGen::DoMathRound(LMathRound* instr) { | 3781 void LCodeGen::DoMathRound(LMathRound* instr) { |
3781 CpuFeatureScope scope(masm(), SSE2); | 3782 CpuFeatureScope scope(masm(), SSE2); |
3782 Register output_reg = ToRegister(instr->result()); | 3783 Register output_reg = ToRegister(instr->result()); |
3783 XMMRegister input_reg = ToDoubleRegister(instr->value()); | 3784 XMMRegister input_reg = ToDoubleRegister(instr->value()); |
3784 XMMRegister xmm_scratch = xmm0; | 3785 XMMRegister xmm_scratch = xmm0; |
3785 XMMRegister input_temp = ToDoubleRegister(instr->temp()); | 3786 XMMRegister input_temp = ToDoubleRegister(instr->temp()); |
3786 ExternalReference one_half = ExternalReference::address_of_one_half(); | 3787 ExternalReference one_half = ExternalReference::address_of_one_half(); |
3787 ExternalReference minus_one_half = | 3788 ExternalReference minus_one_half = |
3788 ExternalReference::address_of_minus_one_half(); | 3789 ExternalReference::address_of_minus_one_half(); |
3789 | 3790 |
(...skipping 2753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6543 FixedArray::kHeaderSize - kPointerSize)); | 6544 FixedArray::kHeaderSize - kPointerSize)); |
6544 __ bind(&done); | 6545 __ bind(&done); |
6545 } | 6546 } |
6546 | 6547 |
6547 | 6548 |
6548 #undef __ | 6549 #undef __ |
6549 | 6550 |
6550 } } // namespace v8::internal | 6551 } } // namespace v8::internal |
6551 | 6552 |
6552 #endif // V8_TARGET_ARCH_IA32 | 6553 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |