Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 10938026: Merged r12086, r12478 into 3.10 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.10
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after
3316 __ bind(&calculate); 3316 __ bind(&calculate);
3317 Counters* counters = masm->isolate()->counters(); 3317 Counters* counters = masm->isolate()->counters();
3318 __ IncrementCounter( 3318 __ IncrementCounter(
3319 counters->transcendental_cache_miss(), 1, scratch0, scratch1); 3319 counters->transcendental_cache_miss(), 1, scratch0, scratch1);
3320 if (tagged) { 3320 if (tagged) {
3321 __ bind(&invalid_cache); 3321 __ bind(&invalid_cache);
3322 ExternalReference runtime_function = 3322 ExternalReference runtime_function =
3323 ExternalReference(RuntimeFunction(), masm->isolate()); 3323 ExternalReference(RuntimeFunction(), masm->isolate());
3324 __ TailCallExternalReference(runtime_function, 1, 1); 3324 __ TailCallExternalReference(runtime_function, 1, 1);
3325 } else { 3325 } else {
3326 if (!CpuFeatures::IsSupported(VFP3)) UNREACHABLE(); 3326 ASSERT(CpuFeatures::IsSupported(VFP3));
3327 CpuFeatures::Scope scope(VFP3); 3327 CpuFeatures::Scope scope(VFP3);
3328 3328
3329 Label no_update; 3329 Label no_update;
3330 Label skip_cache; 3330 Label skip_cache;
3331 3331
3332 // Call C function to calculate the result and update the cache. 3332 // Call C function to calculate the result and update the cache.
3333 // Register r0 holds precalculated cache entry address; preserve 3333 // r0: precalculated cache entry address.
3334 // it on the stack and pop it into register cache_entry after the 3334 // r2 and r3: parts of the double value.
3335 // call. 3335 // Store r0, r2 and r3 on stack for later before calling C function.
3336 __ push(cache_entry); 3336 __ Push(r3, r2, cache_entry);
3337 GenerateCallCFunction(masm, scratch0); 3337 GenerateCallCFunction(masm, scratch0);
3338 __ GetCFunctionDoubleResult(d2); 3338 __ GetCFunctionDoubleResult(d2);
3339 3339
3340 // Try to update the cache. If we cannot allocate a 3340 // Try to update the cache. If we cannot allocate a
3341 // heap number, we return the result without updating. 3341 // heap number, we return the result without updating.
3342 __ pop(cache_entry); 3342 __ Pop(r3, r2, cache_entry);
3343 __ LoadRoot(r5, Heap::kHeapNumberMapRootIndex); 3343 __ LoadRoot(r5, Heap::kHeapNumberMapRootIndex);
3344 __ AllocateHeapNumber(r6, scratch0, scratch1, r5, &no_update); 3344 __ AllocateHeapNumber(r6, scratch0, scratch1, r5, &no_update);
3345 __ vstr(d2, FieldMemOperand(r6, HeapNumber::kValueOffset)); 3345 __ vstr(d2, FieldMemOperand(r6, HeapNumber::kValueOffset));
3346 __ stm(ia, cache_entry, r2.bit() | r3.bit() | r6.bit()); 3346 __ stm(ia, cache_entry, r2.bit() | r3.bit() | r6.bit());
3347 __ Ret(); 3347 __ Ret();
3348 3348
3349 __ bind(&invalid_cache); 3349 __ bind(&invalid_cache);
3350 // The cache is invalid. Call runtime which will recreate the 3350 // The cache is invalid. Call runtime which will recreate the
3351 // cache. 3351 // cache.
3352 __ LoadRoot(r5, Heap::kHeapNumberMapRootIndex); 3352 __ LoadRoot(r5, Heap::kHeapNumberMapRootIndex);
(...skipping 4069 matching lines...) Expand 10 before | Expand all | Expand 10 after
7422 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2, 7422 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r2,
7423 &slow_elements); 7423 &slow_elements);
7424 __ Ret(); 7424 __ Ret();
7425 } 7425 }
7426 7426
7427 #undef __ 7427 #undef __
7428 7428
7429 } } // namespace v8::internal 7429 } } // namespace v8::internal
7430 7430
7431 #endif // V8_TARGET_ARCH_ARM 7431 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698