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

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

Issue 212763008: Clean up runtime functions for Maths. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/full-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 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 // double_exponent may not containe the exponent value if the input was a 1421 // double_exponent may not containe the exponent value if the input was a
1422 // smi. We set it with exponent value before bailing out. 1422 // smi. We set it with exponent value before bailing out.
1423 __ vmov(single_scratch, exponent); 1423 __ vmov(single_scratch, exponent);
1424 __ vcvt_f64_s32(double_exponent, single_scratch); 1424 __ vcvt_f64_s32(double_exponent, single_scratch);
1425 1425
1426 // Returning or bailing out. 1426 // Returning or bailing out.
1427 Counters* counters = masm->isolate()->counters(); 1427 Counters* counters = masm->isolate()->counters();
1428 if (exponent_type_ == ON_STACK) { 1428 if (exponent_type_ == ON_STACK) {
1429 // The arguments are still on the stack. 1429 // The arguments are still on the stack.
1430 __ bind(&call_runtime); 1430 __ bind(&call_runtime);
1431 __ TailCallRuntime(Runtime::kMath_pow_cfunction, 2, 1); 1431 __ TailCallRuntime(Runtime::kHiddenMathPow, 2, 1);
1432 1432
1433 // The stub is called from non-optimized code, which expects the result 1433 // The stub is called from non-optimized code, which expects the result
1434 // as heap number in exponent. 1434 // as heap number in exponent.
1435 __ bind(&done); 1435 __ bind(&done);
1436 __ AllocateHeapNumber( 1436 __ AllocateHeapNumber(
1437 heapnumber, scratch, scratch2, heapnumbermap, &call_runtime); 1437 heapnumber, scratch, scratch2, heapnumbermap, &call_runtime);
1438 __ vstr(double_result, 1438 __ vstr(double_result,
1439 FieldMemOperand(heapnumber, HeapNumber::kValueOffset)); 1439 FieldMemOperand(heapnumber, HeapNumber::kValueOffset));
1440 ASSERT(heapnumber.is(r0)); 1440 ASSERT(heapnumber.is(r0));
1441 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2); 1441 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2);
(...skipping 4017 matching lines...) Expand 10 before | Expand all | Expand 10 after
5459 MemOperand(fp, 6 * kPointerSize), 5459 MemOperand(fp, 6 * kPointerSize),
5460 NULL); 5460 NULL);
5461 } 5461 }
5462 5462
5463 5463
5464 #undef __ 5464 #undef __
5465 5465
5466 } } // namespace v8::internal 5466 } } // namespace v8::internal
5467 5467
5468 #endif // V8_TARGET_ARCH_ARM 5468 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698