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 3255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3266 __ add(r1, r1, Operand(r1, LSL, 1)); | 3266 __ add(r1, r1, Operand(r1, LSL, 1)); |
3267 __ add(cache_entry, cache_entry, Operand(r1, LSL, 2)); | 3267 __ add(cache_entry, cache_entry, Operand(r1, LSL, 2)); |
3268 // Check if cache matches: Double value is stored in uint32_t[2] array. | 3268 // Check if cache matches: Double value is stored in uint32_t[2] array. |
3269 __ ldm(ia, cache_entry, r4.bit() | r5.bit() | r6.bit()); | 3269 __ ldm(ia, cache_entry, r4.bit() | r5.bit() | r6.bit()); |
3270 __ cmp(r2, r4); | 3270 __ cmp(r2, r4); |
3271 __ b(ne, &calculate); | 3271 __ b(ne, &calculate); |
3272 __ cmp(r3, r5); | 3272 __ cmp(r3, r5); |
3273 __ b(ne, &calculate); | 3273 __ b(ne, &calculate); |
3274 // Cache hit. Load result, cleanup and return. | 3274 // Cache hit. Load result, cleanup and return. |
3275 Counters* counters = masm->isolate()->counters(); | 3275 Counters* counters = masm->isolate()->counters(); |
3276 __ IncrementCounter(counters->transcendental_cache_hit(), 1); | 3276 __ IncrementCounter( |
| 3277 counters->transcendental_cache_hit(), 1, scratch0, scratch1); |
3277 if (tagged) { | 3278 if (tagged) { |
3278 // Pop input value from stack and load result into r0. | 3279 // Pop input value from stack and load result into r0. |
3279 __ pop(); | 3280 __ pop(); |
3280 __ mov(r0, Operand(r6)); | 3281 __ mov(r0, Operand(r6)); |
3281 } else { | 3282 } else { |
3282 // Load result into d2. | 3283 // Load result into d2. |
3283 __ vldr(d2, FieldMemOperand(r6, HeapNumber::kValueOffset)); | 3284 __ vldr(d2, FieldMemOperand(r6, HeapNumber::kValueOffset)); |
3284 } | 3285 } |
3285 __ Ret(); | 3286 __ Ret(); |
3286 } // if (CpuFeatures::IsSupported(VFP3)) | 3287 } // if (CpuFeatures::IsSupported(VFP3)) |
3287 | 3288 |
3288 __ bind(&calculate); | 3289 __ bind(&calculate); |
3289 __ IncrementCounter(counters->transcendental_cache_miss(), 1); | 3290 Counters* counters = masm->isolate()->counters(); |
| 3291 __ IncrementCounter( |
| 3292 counters->transcendental_cache_miss(), 1, scratch0, scratch1); |
3290 if (tagged) { | 3293 if (tagged) { |
3291 __ bind(&invalid_cache); | 3294 __ bind(&invalid_cache); |
3292 ExternalReference runtime_function = | 3295 ExternalReference runtime_function = |
3293 ExternalReference(RuntimeFunction(), masm->isolate()); | 3296 ExternalReference(RuntimeFunction(), masm->isolate()); |
3294 __ TailCallExternalReference(runtime_function, 1, 1); | 3297 __ TailCallExternalReference(runtime_function, 1, 1); |
3295 } else { | 3298 } else { |
3296 if (!CpuFeatures::IsSupported(VFP3)) UNREACHABLE(); | 3299 if (!CpuFeatures::IsSupported(VFP3)) UNREACHABLE(); |
3297 CpuFeatures::Scope scope(VFP3); | 3300 CpuFeatures::Scope scope(VFP3); |
3298 | 3301 |
3299 Label no_update; | 3302 Label no_update; |
(...skipping 3877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7177 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, | 7180 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, |
7178 &slow_elements); | 7181 &slow_elements); |
7179 __ Ret(); | 7182 __ Ret(); |
7180 } | 7183 } |
7181 | 7184 |
7182 #undef __ | 7185 #undef __ |
7183 | 7186 |
7184 } } // namespace v8::internal | 7187 } } // namespace v8::internal |
7185 | 7188 |
7186 #endif // V8_TARGET_ARCH_ARM | 7189 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |