| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3364 ASSERT(input->IsDoubleRegister()); | 3364 ASSERT(input->IsDoubleRegister()); |
| 3365 LOperand* result = instr->result(); | 3365 LOperand* result = instr->result(); |
| 3366 ASSERT(result->IsRegister()); | 3366 ASSERT(result->IsRegister()); |
| 3367 | 3367 |
| 3368 DoubleRegister double_input = ToDoubleRegister(input); | 3368 DoubleRegister double_input = ToDoubleRegister(input); |
| 3369 Register result_reg = ToRegister(result); | 3369 Register result_reg = ToRegister(result); |
| 3370 SwVfpRegister single_scratch = double_scratch0().low(); | 3370 SwVfpRegister single_scratch = double_scratch0().low(); |
| 3371 Register scratch1 = scratch0(); | 3371 Register scratch1 = scratch0(); |
| 3372 Register scratch2 = ToRegister(instr->TempAt(0)); | 3372 Register scratch2 = ToRegister(instr->TempAt(0)); |
| 3373 | 3373 |
| 3374 VFPRoundingMode rounding_mode = instr->truncating() ? kRoundToMinusInf | 3374 EmitVFPTruncate(kRoundToZero, |
| 3375 : kRoundToNearest; | |
| 3376 | |
| 3377 EmitVFPTruncate(rounding_mode, | |
| 3378 single_scratch, | 3375 single_scratch, |
| 3379 double_input, | 3376 double_input, |
| 3380 scratch1, | 3377 scratch1, |
| 3381 scratch2); | 3378 scratch2); |
| 3382 // Deoptimize if we had a vfp invalid exception. | 3379 // Deoptimize if we had a vfp invalid exception. |
| 3383 DeoptimizeIf(ne, instr->environment()); | 3380 DeoptimizeIf(ne, instr->environment()); |
| 3384 | 3381 |
| 3385 // Retrieve the result. | 3382 // Retrieve the result. |
| 3386 __ vmov(result_reg, single_scratch); | 3383 __ vmov(result_reg, single_scratch); |
| 3387 | 3384 |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3851 ASSERT(!environment->HasBeenRegistered()); | 3848 ASSERT(!environment->HasBeenRegistered()); |
| 3852 RegisterEnvironmentForDeoptimization(environment); | 3849 RegisterEnvironmentForDeoptimization(environment); |
| 3853 ASSERT(osr_pc_offset_ == -1); | 3850 ASSERT(osr_pc_offset_ == -1); |
| 3854 osr_pc_offset_ = masm()->pc_offset(); | 3851 osr_pc_offset_ = masm()->pc_offset(); |
| 3855 } | 3852 } |
| 3856 | 3853 |
| 3857 | 3854 |
| 3858 #undef __ | 3855 #undef __ |
| 3859 | 3856 |
| 3860 } } // namespace v8::internal | 3857 } } // namespace v8::internal |
| OLD | NEW |