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

Unified Diff: src/arm/code-stubs-arm.cc

Issue 10695205: Fix transcendental cache on ARM in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2234.js » ('j') | test/mjsunit/regress/regress-2234.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index 169a032fb030c242448f4d491174348cc892a5ad..d402694e40431dd62eda4c9b3f2650a1841d4f00 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -3410,16 +3410,16 @@ void TranscendentalCacheStub::Generate(MacroAssembler* masm) {
Label skip_cache;
// Call C function to calculate the result and update the cache.
- // Register r0 holds precalculated cache entry address; preserve
- // it on the stack and pop it into register cache_entry after the
- // call.
- __ push(cache_entry);
+ // r0: precalculated cache entry address.
+ // r2 and r3: parts of the double value.
+ // Store r0, r2 and r3 on stack for later before calling C function.
+ __ stm(db_w, sp, cache_entry.bit() | r2.bit() | r3.bit());
Jakob Kummerow 2012/07/16 09:24:09 Let's use "__ Push(cache_entry, r2, r3)" instead.
GenerateCallCFunction(masm, scratch0);
__ GetCFunctionDoubleResult(d2);
// Try to update the cache. If we cannot allocate a
// heap number, we return the result without updating.
- __ pop(cache_entry);
+ __ ldm(ia_w, sp, cache_entry.bit() | r2.bit() | r3.bit());
Jakob Kummerow 2012/07/16 09:24:09 ...and __ Pop(...) here.
__ LoadRoot(r5, Heap::kHeapNumberMapRootIndex);
__ AllocateHeapNumber(r6, scratch0, scratch1, r5, &no_update);
__ vstr(d2, FieldMemOperand(r6, HeapNumber::kValueOffset));
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2234.js » ('j') | test/mjsunit/regress/regress-2234.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698