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

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: Created 8 years, 2 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
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 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 } 1163 }
1163 1164
1164 1165
1165 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { 1166 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
1166 argument_count_ -= instr->argument_count(); 1167 argument_count_ -= instr->argument_count();
1167 LOperand* context = UseFixed(instr->context(), esi); 1168 LOperand* context = UseFixed(instr->context(), esi);
1168 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), eax), instr); 1169 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime(context), eax), instr);
1169 } 1170 }
1170 1171
1171 1172
1173 LInstruction* LChunkBuilder::DoRor(HRor* instr) {
1174 return DoShift(Token::ROR, instr);
1175 }
1176
1177
1172 LInstruction* LChunkBuilder::DoShr(HShr* instr) { 1178 LInstruction* LChunkBuilder::DoShr(HShr* instr) {
1173 return DoShift(Token::SHR, instr); 1179 return DoShift(Token::SHR, instr);
1174 } 1180 }
1175 1181
1176 1182
1177 LInstruction* LChunkBuilder::DoSar(HSar* instr) { 1183 LInstruction* LChunkBuilder::DoSar(HSar* instr) {
1178 return DoShift(Token::SAR, instr); 1184 return DoShift(Token::SAR, instr);
1179 } 1185 }
1180 1186
1181 1187
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2439 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2434 LOperand* object = UseRegister(instr->object()); 2440 LOperand* object = UseRegister(instr->object());
2435 LOperand* index = UseTempRegister(instr->index()); 2441 LOperand* index = UseTempRegister(instr->index());
2436 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2442 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2437 } 2443 }
2438 2444
2439 2445
2440 } } // namespace v8::internal 2446 } } // namespace v8::internal
2441 2447
2442 #endif // V8_TARGET_ARCH_IA32 2448 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« src/hydrogen-instructions.h ('K') | « 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