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

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

Issue 6329006: X64 Crankshaft: Add addition of tagged and int32 values to Crankshaft on x64.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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/x64/lithium-codegen-x64.cc ('k') | src/x64/stub-cache-x64.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 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 743
744 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, 744 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
745 HArithmeticBinaryOperation* instr) { 745 HArithmeticBinaryOperation* instr) {
746 Abort("Unimplemented: %s", "DoArithmeticD"); 746 Abort("Unimplemented: %s", "DoArithmeticD");
747 return NULL; 747 return NULL;
748 } 748 }
749 749
750 750
751 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, 751 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
752 HArithmeticBinaryOperation* instr) { 752 HArithmeticBinaryOperation* instr) {
753 Abort("Unimplemented: %s", "DoArithmeticT"); 753 ASSERT(op == Token::ADD ||
754 return NULL; 754 op == Token::DIV ||
755 op == Token::MOD ||
756 op == Token::MUL ||
757 op == Token::SUB);
758 HValue* left = instr->left();
759 HValue* right = instr->right();
760 ASSERT(left->representation().IsTagged());
761 ASSERT(right->representation().IsTagged());
762 LOperand* left_operand = UseFixed(left, rdx);
763 LOperand* right_operand = UseFixed(right, rax);
764 LArithmeticT* result = new LArithmeticT(op, left_operand, right_operand);
765 return MarkAsCall(DefineFixed(result, rax), instr);
755 } 766 }
756 767
757 768
758 void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) { 769 void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
759 ASSERT(is_building()); 770 ASSERT(is_building());
760 current_block_ = block; 771 current_block_ = block;
761 next_block_ = next_block; 772 next_block_ = next_block;
762 if (block->IsStartBlock()) { 773 if (block->IsStartBlock()) {
763 block->UpdateEnvironment(graph_->start_environment()); 774 block->UpdateEnvironment(graph_->start_environment());
764 argument_count_ = 0; 775 argument_count_ = 0;
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 } 1076 }
1066 1077
1067 1078
1068 LInstruction* LChunkBuilder::DoSub(HSub* instr) { 1079 LInstruction* LChunkBuilder::DoSub(HSub* instr) {
1069 Abort("Unimplemented: %s", "DoSub"); 1080 Abort("Unimplemented: %s", "DoSub");
1070 return NULL; 1081 return NULL;
1071 } 1082 }
1072 1083
1073 1084
1074 LInstruction* LChunkBuilder::DoAdd(HAdd* instr) { 1085 LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
1075 Abort("Unimplemented: %s", "DoAdd"); 1086 if (instr->representation().IsInteger32()) {
1087 ASSERT(instr->left()->representation().IsInteger32());
1088 ASSERT(instr->right()->representation().IsInteger32());
1089 LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
1090 LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
1091 LAddI* add = new LAddI(left, right);
1092 LInstruction* result = DefineSameAsFirst(add);
1093 if (instr->CheckFlag(HValue::kCanOverflow)) {
1094 result = AssignEnvironment(result);
1095 }
1096 return result;
1097 } else if (instr->representation().IsDouble()) {
1098 Abort("Unimplemented: %s", "DoAdd on Doubles");
1099 } else {
1100 ASSERT(instr->representation().IsTagged());
1101 return DoArithmeticT(Token::ADD, instr);
1102 }
1076 return NULL; 1103 return NULL;
1077 } 1104 }
1078 1105
1079 1106
1080 LInstruction* LChunkBuilder::DoPower(HPower* instr) { 1107 LInstruction* LChunkBuilder::DoPower(HPower* instr) {
1081 Abort("Unimplemented: %s", "DoPower"); 1108 Abort("Unimplemented: %s", "DoPower");
1082 return NULL; 1109 return NULL;
1083 } 1110 }
1084 1111
1085 1112
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 1456
1430 1457
1431 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1458 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1432 Abort("Unimplemented: %s", "DoLeaveInlined"); 1459 Abort("Unimplemented: %s", "DoLeaveInlined");
1433 return NULL; 1460 return NULL;
1434 } 1461 }
1435 1462
1436 } } // namespace v8::internal 1463 } } // namespace v8::internal
1437 1464
1438 #endif // V8_TARGET_ARCH_X64 1465 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698