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

Side by Side Diff: src/mips/code-stubs-mips.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 | « src/arm/macro-assembler-arm.cc ('k') | src/mips/codegen-mips.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 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 __ Move(double_result, 1); 1418 __ Move(double_result, 1);
1419 __ sqrt_d(double_scratch, double_scratch); 1419 __ sqrt_d(double_scratch, double_scratch);
1420 __ div_d(double_result, double_result, double_scratch); 1420 __ div_d(double_result, double_result, double_scratch);
1421 __ jmp(&done); 1421 __ jmp(&done);
1422 } 1422 }
1423 1423
1424 __ push(ra); 1424 __ push(ra);
1425 { 1425 {
1426 AllowExternalCallThatCantCauseGC scope(masm); 1426 AllowExternalCallThatCantCauseGC scope(masm);
1427 __ PrepareCallCFunction(0, 2, scratch2); 1427 __ PrepareCallCFunction(0, 2, scratch2);
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(ra); 1433 __ pop(ra);
1434 __ GetCFunctionDoubleResult(double_result); 1434 __ MovFromFloatResult(double_result);
1435 __ jmp(&done); 1435 __ jmp(&done);
1436 1436
1437 __ bind(&int_exponent_convert); 1437 __ bind(&int_exponent_convert);
1438 } 1438 }
1439 1439
1440 // Calculate power with integer exponent. 1440 // Calculate power with integer exponent.
1441 __ bind(&int_exponent); 1441 __ bind(&int_exponent);
1442 1442
1443 // Get two copies of exponent in the registers scratch and exponent. 1443 // Get two copies of exponent in the registers scratch and exponent.
1444 if (exponent_type_ == INTEGER) { 1444 if (exponent_type_ == INTEGER) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 __ sdc1(double_result, 1502 __ sdc1(double_result,
1503 FieldMemOperand(heapnumber, HeapNumber::kValueOffset)); 1503 FieldMemOperand(heapnumber, HeapNumber::kValueOffset));
1504 ASSERT(heapnumber.is(v0)); 1504 ASSERT(heapnumber.is(v0));
1505 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2); 1505 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2);
1506 __ DropAndRet(2); 1506 __ DropAndRet(2);
1507 } else { 1507 } else {
1508 __ push(ra); 1508 __ push(ra);
1509 { 1509 {
1510 AllowExternalCallThatCantCauseGC scope(masm); 1510 AllowExternalCallThatCantCauseGC scope(masm);
1511 __ PrepareCallCFunction(0, 2, scratch); 1511 __ PrepareCallCFunction(0, 2, scratch);
1512 __ SetCallCDoubleArguments(double_base, double_exponent); 1512 __ MovToFloatParameters(double_base, double_exponent);
1513 __ CallCFunction( 1513 __ CallCFunction(
1514 ExternalReference::power_double_double_function(masm->isolate()), 1514 ExternalReference::power_double_double_function(masm->isolate()),
1515 0, 2); 1515 0, 2);
1516 } 1516 }
1517 __ pop(ra); 1517 __ pop(ra);
1518 __ GetCFunctionDoubleResult(double_result); 1518 __ MovFromFloatResult(double_result);
1519 1519
1520 __ bind(&done); 1520 __ bind(&done);
1521 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2); 1521 __ IncrementCounter(counters->math_pow(), 1, scratch, scratch2);
1522 __ Ret(); 1522 __ Ret();
1523 } 1523 }
1524 } 1524 }
1525 1525
1526 1526
1527 bool CEntryStub::NeedsImmovableCode() { 1527 bool CEntryStub::NeedsImmovableCode() {
1528 return true; 1528 return true;
(...skipping 4494 matching lines...) Expand 10 before | Expand all | Expand 10 after
6023 __ bind(&fast_elements_case); 6023 __ bind(&fast_elements_case);
6024 GenerateCase(masm, FAST_ELEMENTS); 6024 GenerateCase(masm, FAST_ELEMENTS);
6025 } 6025 }
6026 6026
6027 6027
6028 #undef __ 6028 #undef __
6029 6029
6030 } } // namespace v8::internal 6030 } } // namespace v8::internal
6031 6031
6032 #endif // V8_TARGET_ARCH_MIPS 6032 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698