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

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

Issue 136613003: Demystified floating point ABI function names. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/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 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 __ vmov(double_result, 1.0, scratch); 1344 __ vmov(double_result, 1.0, scratch);
1345 __ vsqrt(double_scratch, double_scratch); 1345 __ vsqrt(double_scratch, double_scratch);
1346 __ vdiv(double_result, double_result, double_scratch); 1346 __ vdiv(double_result, double_result, double_scratch);
1347 __ jmp(&done); 1347 __ jmp(&done);
1348 } 1348 }
1349 1349
1350 __ push(lr); 1350 __ push(lr);
1351 { 1351 {
1352 AllowExternalCallThatCantCauseGC scope(masm); 1352 AllowExternalCallThatCantCauseGC scope(masm);
1353 __ PrepareCallCFunction(0, 2, scratch); 1353 __ PrepareCallCFunction(0, 2, scratch);
1354 __ SetCallCDoubleArguments(double_base, double_exponent); 1354 __ MovToFloatParameters(double_base, double_exponent);
1355 __ CallCFunction( 1355 __ CallCFunction(
1356 ExternalReference::power_double_double_function(masm->isolate()), 1356 ExternalReference::power_double_double_function(masm->isolate()),
1357 0, 2); 1357 0, 2);
1358 } 1358 }
1359 __ pop(lr); 1359 __ pop(lr);
1360 __ GetCFunctionDoubleResult(double_result); 1360 __ MovFromFloatResult(double_result);
1361 __ jmp(&done); 1361 __ jmp(&done);
1362 1362
1363 __ bind(&int_exponent_convert); 1363 __ bind(&int_exponent_convert);
1364 __ vcvt_u32_f64(single_scratch, double_exponent); 1364 __ vcvt_u32_f64(single_scratch, double_exponent);
1365 __ vmov(scratch, single_scratch); 1365 __ vmov(scratch, single_scratch);
1366 } 1366 }
1367 1367
1368 // Calculate power with integer exponent. 1368 // Calculate power with integer exponent.
1369 __ bind(&int_exponent); 1369 __ bind(&int_exponent);
1370 1370
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 __ vstr(double_result, 1418 __ vstr(double_result,
1419 FieldMemOperand(heapnumber, HeapNumber::kValueOffset)); 1419 FieldMemOperand(heapnumber, HeapNumber::kValueOffset));
1420 ASSERT(heapnumber.is(r0)); 1420 ASSERT(heapnumber.is(r0));
1421 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2); 1421 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2);
1422 __ Ret(2); 1422 __ Ret(2);
1423 } else { 1423 } else {
1424 __ push(lr); 1424 __ push(lr);
1425 { 1425 {
1426 AllowExternalCallThatCantCauseGC scope(masm); 1426 AllowExternalCallThatCantCauseGC scope(masm);
1427 __ PrepareCallCFunction(0, 2, scratch); 1427 __ PrepareCallCFunction(0, 2, scratch);
1428 __ SetCallCDoubleArguments(double_base, double_exponent); 1428 __ MovToFloatParameters(double_base, double_exponent);
1429 __ CallCFunction( 1429 __ CallCFunction(
1430 ExternalReference::power_double_double_function(masm->isolate()), 1430 ExternalReference::power_double_double_function(masm->isolate()),
1431 0, 2); 1431 0, 2);
1432 } 1432 }
1433 __ pop(lr); 1433 __ pop(lr);
1434 __ GetCFunctionDoubleResult(double_result); 1434 __ MovFromFloatResult(double_result);
1435 1435
1436 __ bind(&done); 1436 __ bind(&done);
1437 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2); 1437 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2);
1438 __ Ret(); 1438 __ Ret();
1439 } 1439 }
1440 } 1440 }
1441 1441
1442 1442
1443 bool CEntryStub::NeedsImmovableCode() { 1443 bool CEntryStub::NeedsImmovableCode() {
1444 return true; 1444 return true;
(...skipping 4400 matching lines...) Expand 10 before | Expand all | Expand 10 after
5845 __ bind(&fast_elements_case); 5845 __ bind(&fast_elements_case);
5846 GenerateCase(masm, FAST_ELEMENTS); 5846 GenerateCase(masm, FAST_ELEMENTS);
5847 } 5847 }
5848 5848
5849 5849
5850 #undef __ 5850 #undef __
5851 5851
5852 } } // namespace v8::internal 5852 } } // namespace v8::internal
5853 5853
5854 #endif // V8_TARGET_ARCH_ARM 5854 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698