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

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

Issue 6471023: ARM: Add shift operations to the type recording binary operation stub (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 10 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/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 const char* LArithmeticT::Mnemonic() const { 179 const char* LArithmeticT::Mnemonic() const {
180 switch (op()) { 180 switch (op()) {
181 case Token::ADD: return "add-t"; 181 case Token::ADD: return "add-t";
182 case Token::SUB: return "sub-t"; 182 case Token::SUB: return "sub-t";
183 case Token::MUL: return "mul-t"; 183 case Token::MUL: return "mul-t";
184 case Token::MOD: return "mod-t"; 184 case Token::MOD: return "mod-t";
185 case Token::DIV: return "div-t"; 185 case Token::DIV: return "div-t";
186 case Token::BIT_AND: return "bit-and-t"; 186 case Token::BIT_AND: return "bit-and-t";
187 case Token::BIT_OR: return "bit-or-t"; 187 case Token::BIT_OR: return "bit-or-t";
188 case Token::BIT_XOR: return "bit-xor-t"; 188 case Token::BIT_XOR: return "bit-xor-t";
189 case Token::SHL: return "shl-t";
190 case Token::SAR: return "sar-t";
191 case Token::SHR: return "shr-t";
189 default: 192 default:
190 UNREACHABLE(); 193 UNREACHABLE();
191 return NULL; 194 return NULL;
192 } 195 }
193 } 196 }
194 197
195 198
196 void LGoto::PrintDataTo(StringStream* stream) { 199 void LGoto::PrintDataTo(StringStream* stream) {
197 stream->Add("B%d", block_id()); 200 stream->Add("B%d", block_id());
198 } 201 }
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 LOperand* left = UseFixed(instr->left(), r1); 798 LOperand* left = UseFixed(instr->left(), r1);
796 LOperand* right = UseFixed(instr->right(), r0); 799 LOperand* right = UseFixed(instr->right(), r0);
797 LArithmeticT* result = new LArithmeticT(op, left, right); 800 LArithmeticT* result = new LArithmeticT(op, left, right);
798 return MarkAsCall(DefineFixed(result, r0), instr); 801 return MarkAsCall(DefineFixed(result, r0), instr);
799 } 802 }
800 } 803 }
801 804
802 805
803 LInstruction* LChunkBuilder::DoShift(Token::Value op, 806 LInstruction* LChunkBuilder::DoShift(Token::Value op,
804 HBitwiseBinaryOperation* instr) { 807 HBitwiseBinaryOperation* instr) {
808 if (instr->representation().IsTagged()) {
809 ASSERT(instr->left()->representation().IsTagged());
810 ASSERT(instr->right()->representation().IsTagged());
811
812 LOperand* left = UseFixed(instr->left(), r1);
813 LOperand* right = UseFixed(instr->right(), r0);
814 LArithmeticT* result = new LArithmeticT(op, left, right);
815 return MarkAsCall(DefineFixed(result, r0), instr);
816 }
817
805 ASSERT(instr->representation().IsInteger32()); 818 ASSERT(instr->representation().IsInteger32());
806 ASSERT(instr->OperandAt(0)->representation().IsInteger32()); 819 ASSERT(instr->OperandAt(0)->representation().IsInteger32());
807 ASSERT(instr->OperandAt(1)->representation().IsInteger32()); 820 ASSERT(instr->OperandAt(1)->representation().IsInteger32());
808 LOperand* left = UseRegisterAtStart(instr->OperandAt(0)); 821 LOperand* left = UseRegisterAtStart(instr->OperandAt(0));
809 822
810 HValue* right_value = instr->OperandAt(1); 823 HValue* right_value = instr->OperandAt(1);
811 LOperand* right = NULL; 824 LOperand* right = NULL;
812 int constant_value = 0; 825 int constant_value = 0;
813 if (right_value->IsConstant()) { 826 if (right_value->IsConstant()) {
814 HConstant* constant = HConstant::cast(right_value); 827 HConstant* constant = HConstant::cast(right_value);
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1948 1961
1949 1962
1950 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1963 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1951 HEnvironment* outer = current_block_->last_environment()->outer(); 1964 HEnvironment* outer = current_block_->last_environment()->outer();
1952 current_block_->UpdateEnvironment(outer); 1965 current_block_->UpdateEnvironment(outer);
1953 return NULL; 1966 return NULL;
1954 } 1967 }
1955 1968
1956 1969
1957 } } // namespace v8::internal 1970 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698