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

Side by Side Diff: src/x64/lithium-x64.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
« src/hydrogen-instructions.h ('K') | « 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 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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 return MarkAsCall(DefineFixed(result, rax), instr); 1103 return MarkAsCall(DefineFixed(result, rax), instr);
1103 } 1104 }
1104 1105
1105 1106
1106 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) { 1107 LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
1107 argument_count_ -= instr->argument_count(); 1108 argument_count_ -= instr->argument_count();
1108 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime, rax), instr); 1109 return MarkAsCall(DefineFixed(new(zone()) LCallRuntime, rax), instr);
1109 } 1110 }
1110 1111
1111 1112
1113 LInstruction* LChunkBuilder::DoRor(HRor* instr) {
1114 return DoShift(Token::ROR, instr);
1115 }
1116
1117
1112 LInstruction* LChunkBuilder::DoShr(HShr* instr) { 1118 LInstruction* LChunkBuilder::DoShr(HShr* instr) {
1113 return DoShift(Token::SHR, instr); 1119 return DoShift(Token::SHR, instr);
1114 } 1120 }
1115 1121
1116 1122
1117 LInstruction* LChunkBuilder::DoSar(HSar* instr) { 1123 LInstruction* LChunkBuilder::DoSar(HSar* instr) {
1118 return DoShift(Token::SAR, instr); 1124 return DoShift(Token::SAR, instr);
1119 } 1125 }
1120 1126
1121 1127
(...skipping 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2320 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2315 LOperand* object = UseRegister(instr->object()); 2321 LOperand* object = UseRegister(instr->object());
2316 LOperand* index = UseTempRegister(instr->index()); 2322 LOperand* index = UseTempRegister(instr->index());
2317 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2323 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2318 } 2324 }
2319 2325
2320 2326
2321 } } // namespace v8::internal 2327 } } // namespace v8::internal
2322 2328
2323 #endif // V8_TARGET_ARCH_X64 2329 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/hydrogen-instructions.h ('K') | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698