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

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

Issue 11033005: Add rotate-right instruction to hydrogen and use it instead of bitwise operations (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 8 years, 1 month 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/ia32/lithium-codegen-ia32.cc ('k') | src/token.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 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 const char* LArithmeticT::Mnemonic() const { 172 const char* LArithmeticT::Mnemonic() const {
173 switch (op()) { 173 switch (op()) {
174 case Token::ADD: return "add-t"; 174 case Token::ADD: return "add-t";
175 case Token::SUB: return "sub-t"; 175 case Token::SUB: return "sub-t";
176 case Token::MUL: return "mul-t"; 176 case Token::MUL: return "mul-t";
177 case Token::MOD: return "mod-t"; 177 case Token::MOD: return "mod-t";
178 case Token::DIV: return "div-t"; 178 case Token::DIV: return "div-t";
179 case Token::BIT_AND: return "bit-and-t"; 179 case Token::BIT_AND: return "bit-and-t";
180 case Token::BIT_OR: return "bit-or-t"; 180 case Token::BIT_OR: return "bit-or-t";
181 case Token::BIT_XOR: return "bit-xor-t"; 181 case Token::BIT_XOR: return "bit-xor-t";
182 case Token::ROR: return "ror-t";
182 case Token::SHL: return "sal-t"; 183 case Token::SHL: return "sal-t";
183 case Token::SAR: return "sar-t"; 184 case Token::SAR: return "sar-t";
184 case Token::SHR: return "shr-t"; 185 case Token::SHR: return "shr-t";
185 default: 186 default:
186 UNREACHABLE(); 187 UNREACHABLE();
187 return NULL; 188 return NULL;
188 } 189 }
189 } 190 }
190 191
191 192
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 } 1154 }
1154 1155
1155 1156
1156 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { 1157 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
1157 argument_count_ -= instr->argument_count(); 1158 argument_count_ -= instr->argument_count();
1158 LOperand* context = UseFixed(instr->context(), esi); 1159 LOperand* context = UseFixed(instr->context(), esi);
1159 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), eax), instr); 1160 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), eax), instr);
1160 } 1161 }
1161 1162
1162 1163
1164 LInstruction* LChunkBuilder::DoRor(HRor* instr) {
1165 return DoShift(Token::ROR, instr);
1166 }
1167
1168
1163 LInstruction* LChunkBuilder::DoShr(HShr* instr) { 1169 LInstruction* LChunkBuilder::DoShr(HShr* instr) {
1164 return DoShift(Token::SHR, instr); 1170 return DoShift(Token::SHR, instr);
1165 } 1171 }
1166 1172
1167 1173
1168 LInstruction* LChunkBuilder::DoSar(HSar* instr) { 1174 LInstruction* LChunkBuilder::DoSar(HSar* instr) {
1169 return DoShift(Token::SAR, instr); 1175 return DoShift(Token::SAR, instr);
1170 } 1176 }
1171 1177
1172 1178
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2401 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2396 LOperand* object = UseRegister(instr->object()); 2402 LOperand* object = UseRegister(instr->object());
2397 LOperand* index = UseTempRegister(instr->index()); 2403 LOperand* index = UseTempRegister(instr->index());
2398 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2404 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2399 } 2405 }
2400 2406
2401 2407
2402 } } // namespace v8::internal 2408 } } // namespace v8::internal
2403 2409
2404 #endif // V8_TARGET_ARCH_IA32 2410 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698