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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 6592038: X64 Crankshaft: Add DoPower to lithium compiler on x64 platform. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 return DoArithmeticD(Token::ADD, instr); 1429 return DoArithmeticD(Token::ADD, instr);
1430 } else { 1430 } else {
1431 ASSERT(instr->representation().IsTagged()); 1431 ASSERT(instr->representation().IsTagged());
1432 return DoArithmeticT(Token::ADD, instr); 1432 return DoArithmeticT(Token::ADD, instr);
1433 } 1433 }
1434 return NULL; 1434 return NULL;
1435 } 1435 }
1436 1436
1437 1437
1438 LInstruction* LChunkBuilder::DoPower(HPower* instr) { 1438 LInstruction* LChunkBuilder::DoPower(HPower* instr) {
1439 Abort("Unimplemented: %s", "DoPower"); 1439 ASSERT(instr->representation().IsDouble());
1440 return NULL; 1440 // We call a C function for double power. It can't trigger a GC.
1441 // We need to use fixed result register for the call.
1442 Representation exponent_type = instr->right()->representation();
1443 ASSERT(instr->left()->representation().IsDouble());
1444 LOperand* left = UseFixedDouble(instr->left(), xmm2);
1445 LOperand* right = exponent_type.IsDouble() ?
1446 UseFixedDouble(instr->right(), xmm1) :
1447 #ifdef _WIN64
1448 UseFixed(instr->right(), rdx);
1449 #else
1450 UseFixed(instr->right(), rdi);
1451 #endif
1452 LPower* result = new LPower(left, right);
1453 return MarkAsCall(DefineFixedDouble(result, xmm1), instr,
1454 CAN_DEOPTIMIZE_EAGERLY);
1441 } 1455 }
1442 1456
1443 1457
1444 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) { 1458 LInstruction* LChunkBuilder::DoCompare(HCompare* instr) {
1445 Token::Value op = instr->token(); 1459 Token::Value op = instr->token();
1446 Representation r = instr->GetInputRepresentation(); 1460 Representation r = instr->GetInputRepresentation();
1447 if (r.IsInteger32()) { 1461 if (r.IsInteger32()) {
1448 ASSERT(instr->left()->representation().IsInteger32()); 1462 ASSERT(instr->left()->representation().IsInteger32());
1449 ASSERT(instr->right()->representation().IsInteger32()); 1463 ASSERT(instr->right()->representation().IsInteger32());
1450 LOperand* left = UseRegisterAtStart(instr->left()); 1464 LOperand* left = UseRegisterAtStart(instr->left());
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 2035
2022 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2036 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2023 HEnvironment* outer = current_block_->last_environment()->outer(); 2037 HEnvironment* outer = current_block_->last_environment()->outer();
2024 current_block_->UpdateEnvironment(outer); 2038 current_block_->UpdateEnvironment(outer);
2025 return NULL; 2039 return NULL;
2026 } 2040 }
2027 2041
2028 } } // namespace v8::internal 2042 } } // namespace v8::internal
2029 2043
2030 #endif // V8_TARGET_ARCH_X64 2044 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698