OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdarg.h> | 5 #include <stdarg.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #if V8_TARGET_ARCH_ARM | 9 #if V8_TARGET_ARCH_ARM |
10 | 10 |
(...skipping 3139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3150 double divide = 1 << fraction_bits; | 3150 double divide = 1 << fraction_bits; |
3151 set_d_register_from_double(vd, fixed_value / divide); | 3151 set_d_register_from_double(vd, fixed_value / divide); |
3152 } else if (((instr->Opc2Value() >> 1) == 0x6) && | 3152 } else if (((instr->Opc2Value() >> 1) == 0x6) && |
3153 (instr->Opc3Value() & 0x1)) { | 3153 (instr->Opc3Value() & 0x1)) { |
3154 DecodeVCVTBetweenFloatingPointAndInteger(instr); | 3154 DecodeVCVTBetweenFloatingPointAndInteger(instr); |
3155 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && | 3155 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && |
3156 (instr->Opc3Value() & 0x1)) { | 3156 (instr->Opc3Value() & 0x1)) { |
3157 DecodeVCMP(instr); | 3157 DecodeVCMP(instr); |
3158 } else if (((instr->Opc2Value() == 0x1)) && (instr->Opc3Value() == 0x3)) { | 3158 } else if (((instr->Opc2Value() == 0x1)) && (instr->Opc3Value() == 0x3)) { |
3159 // vsqrt | 3159 // vsqrt |
| 3160 lazily_initialize_fast_sqrt(isolate_); |
3160 if (instr->SzValue() == 0x1) { | 3161 if (instr->SzValue() == 0x1) { |
3161 double dm_value = get_double_from_d_register(vm); | 3162 double dm_value = get_double_from_d_register(vm); |
3162 double dd_value = fast_sqrt(dm_value); | 3163 double dd_value = fast_sqrt(dm_value, isolate_); |
3163 dd_value = canonicalizeNaN(dd_value); | 3164 dd_value = canonicalizeNaN(dd_value); |
3164 set_d_register_from_double(vd, dd_value); | 3165 set_d_register_from_double(vd, dd_value); |
3165 } else { | 3166 } else { |
3166 float sm_value = get_float_from_s_register(m); | 3167 float sm_value = get_float_from_s_register(m); |
3167 float sd_value = fast_sqrt(sm_value); | 3168 float sd_value = fast_sqrt(sm_value, isolate_); |
3168 sd_value = canonicalizeNaN(sd_value); | 3169 sd_value = canonicalizeNaN(sd_value); |
3169 set_s_register_from_float(d, sd_value); | 3170 set_s_register_from_float(d, sd_value); |
3170 } | 3171 } |
3171 } else if (instr->Opc3Value() == 0x0) { | 3172 } else if (instr->Opc3Value() == 0x0) { |
3172 // vmov immediate. | 3173 // vmov immediate. |
3173 if (instr->SzValue() == 0x1) { | 3174 if (instr->SzValue() == 0x1) { |
3174 set_d_register_from_double(vd, instr->DoubleImmedVmov()); | 3175 set_d_register_from_double(vd, instr->DoubleImmedVmov()); |
3175 } else { | 3176 } else { |
3176 UNREACHABLE(); // Not used by v8. | 3177 UNREACHABLE(); // Not used by v8. |
3177 } | 3178 } |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4185 set_register(sp, current_sp + sizeof(uintptr_t)); | 4186 set_register(sp, current_sp + sizeof(uintptr_t)); |
4186 return address; | 4187 return address; |
4187 } | 4188 } |
4188 | 4189 |
4189 } // namespace internal | 4190 } // namespace internal |
4190 } // namespace v8 | 4191 } // namespace v8 |
4191 | 4192 |
4192 #endif // USE_SIMULATOR | 4193 #endif // USE_SIMULATOR |
4193 | 4194 |
4194 #endif // V8_TARGET_ARCH_ARM | 4195 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |