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

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

Issue 10960027: Merged r12132 into 3.11 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.11
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/version.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 3435 matching lines...) Expand 10 before | Expand all | Expand 10 after
3446 Counters* counters = masm->isolate()->counters(); 3446 Counters* counters = masm->isolate()->counters();
3447 __ IncrementCounter( 3447 __ IncrementCounter(
3448 counters->transcendental_cache_miss(), 1, scratch0, scratch1); 3448 counters->transcendental_cache_miss(), 1, scratch0, scratch1);
3449 if (tagged) { 3449 if (tagged) {
3450 __ bind(&invalid_cache); 3450 __ bind(&invalid_cache);
3451 __ TailCallExternalReference(ExternalReference(RuntimeFunction(), 3451 __ TailCallExternalReference(ExternalReference(RuntimeFunction(),
3452 masm->isolate()), 3452 masm->isolate()),
3453 1, 3453 1,
3454 1); 3454 1);
3455 } else { 3455 } else {
3456 if (!CpuFeatures::IsSupported(FPU)) UNREACHABLE(); 3456 ASSERT(CpuFeatures::IsSupported(FPU));
3457 CpuFeatures::Scope scope(FPU); 3457 CpuFeatures::Scope scope(FPU);
3458 3458
3459 Label no_update; 3459 Label no_update;
3460 Label skip_cache; 3460 Label skip_cache;
3461 3461
3462 // Call C function to calculate the result and update the cache. 3462 // Call C function to calculate the result and update the cache.
3463 // Register a0 holds precalculated cache entry address; preserve 3463 // a0: precalculated cache entry address.
3464 // it on the stack and pop it into register cache_entry after the 3464 // a2 and a3: parts of the double value.
3465 // call. 3465 // Store a0, a2 and a3 on stack for later before calling C function.
3466 __ Push(cache_entry, a2, a3); 3466 __ Push(a3, a2, cache_entry);
3467 GenerateCallCFunction(masm, scratch0); 3467 GenerateCallCFunction(masm, scratch0);
3468 __ GetCFunctionDoubleResult(f4); 3468 __ GetCFunctionDoubleResult(f4);
3469 3469
3470 // Try to update the cache. If we cannot allocate a 3470 // Try to update the cache. If we cannot allocate a
3471 // heap number, we return the result without updating. 3471 // heap number, we return the result without updating.
3472 __ Pop(cache_entry, a2, a3); 3472 __ Pop(a3, a2, cache_entry);
3473 __ LoadRoot(t1, Heap::kHeapNumberMapRootIndex); 3473 __ LoadRoot(t1, Heap::kHeapNumberMapRootIndex);
3474 __ AllocateHeapNumber(t2, scratch0, scratch1, t1, &no_update); 3474 __ AllocateHeapNumber(t2, scratch0, scratch1, t1, &no_update);
3475 __ sdc1(f4, FieldMemOperand(t2, HeapNumber::kValueOffset)); 3475 __ sdc1(f4, FieldMemOperand(t2, HeapNumber::kValueOffset));
3476 3476
3477 __ sw(a2, MemOperand(cache_entry, 0 * kPointerSize)); 3477 __ sw(a2, MemOperand(cache_entry, 0 * kPointerSize));
3478 __ sw(a3, MemOperand(cache_entry, 1 * kPointerSize)); 3478 __ sw(a3, MemOperand(cache_entry, 1 * kPointerSize));
3479 __ sw(t2, MemOperand(cache_entry, 2 * kPointerSize)); 3479 __ sw(t2, MemOperand(cache_entry, 2 * kPointerSize));
3480 3480
3481 __ Ret(USE_DELAY_SLOT); 3481 __ Ret(USE_DELAY_SLOT);
3482 __ mov(v0, cache_entry); 3482 __ mov(v0, cache_entry);
(...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after
7682 __ Ret(USE_DELAY_SLOT); 7682 __ Ret(USE_DELAY_SLOT);
7683 __ mov(v0, a0); 7683 __ mov(v0, a0);
7684 } 7684 }
7685 7685
7686 7686
7687 #undef __ 7687 #undef __
7688 7688
7689 } } // namespace v8::internal 7689 } } // namespace v8::internal
7690 7690
7691 #endif // V8_TARGET_ARCH_MIPS 7691 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698