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

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

Issue 104203003: Remove unused trigonometric code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 7 years 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-x64.h ('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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1180 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1181 } 1181 }
1182 1182
1183 1183
1184 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1184 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1185 switch (instr->op()) { 1185 switch (instr->op()) {
1186 case kMathFloor: return DoMathFloor(instr); 1186 case kMathFloor: return DoMathFloor(instr);
1187 case kMathRound: return DoMathRound(instr); 1187 case kMathRound: return DoMathRound(instr);
1188 case kMathAbs: return DoMathAbs(instr); 1188 case kMathAbs: return DoMathAbs(instr);
1189 case kMathLog: return DoMathLog(instr); 1189 case kMathLog: return DoMathLog(instr);
1190 case kMathSin: return DoMathSin(instr);
1191 case kMathCos: return DoMathCos(instr);
1192 case kMathTan: return DoMathTan(instr);
1193 case kMathExp: return DoMathExp(instr); 1190 case kMathExp: return DoMathExp(instr);
1194 case kMathSqrt: return DoMathSqrt(instr); 1191 case kMathSqrt: return DoMathSqrt(instr);
1195 case kMathPowHalf: return DoMathPowHalf(instr); 1192 case kMathPowHalf: return DoMathPowHalf(instr);
1196 default: 1193 default:
1197 UNREACHABLE(); 1194 UNREACHABLE();
1198 return NULL; 1195 return NULL;
1199 } 1196 }
1200 } 1197 }
1201 1198
1202 1199
(...skipping 21 matching lines...) Expand all
1224 1221
1225 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { 1222 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) {
1226 ASSERT(instr->representation().IsDouble()); 1223 ASSERT(instr->representation().IsDouble());
1227 ASSERT(instr->value()->representation().IsDouble()); 1224 ASSERT(instr->value()->representation().IsDouble());
1228 LOperand* input = UseRegisterAtStart(instr->value()); 1225 LOperand* input = UseRegisterAtStart(instr->value());
1229 LMathLog* result = new(zone()) LMathLog(input); 1226 LMathLog* result = new(zone()) LMathLog(input);
1230 return DefineSameAsFirst(result); 1227 return DefineSameAsFirst(result);
1231 } 1228 }
1232 1229
1233 1230
1234 LInstruction* LChunkBuilder::DoMathSin(HUnaryMathOperation* instr) {
1235 LOperand* input = UseFixedDouble(instr->value(), xmm1);
1236 LMathSin* result = new(zone()) LMathSin(input);
1237 return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
1238 }
1239
1240
1241 LInstruction* LChunkBuilder::DoMathCos(HUnaryMathOperation* instr) {
1242 LOperand* input = UseFixedDouble(instr->value(), xmm1);
1243 LMathCos* result = new(zone()) LMathCos(input);
1244 return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
1245 }
1246
1247
1248 LInstruction* LChunkBuilder::DoMathTan(HUnaryMathOperation* instr) {
1249 LOperand* input = UseFixedDouble(instr->value(), xmm1);
1250 LMathTan* result = new(zone()) LMathTan(input);
1251 return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
1252 }
1253
1254
1255 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { 1231 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) {
1256 ASSERT(instr->representation().IsDouble()); 1232 ASSERT(instr->representation().IsDouble());
1257 ASSERT(instr->value()->representation().IsDouble()); 1233 ASSERT(instr->value()->representation().IsDouble());
1258 LOperand* value = UseTempRegister(instr->value()); 1234 LOperand* value = UseTempRegister(instr->value());
1259 LOperand* temp1 = TempRegister(); 1235 LOperand* temp1 = TempRegister();
1260 LOperand* temp2 = TempRegister(); 1236 LOperand* temp2 = TempRegister();
1261 LMathExp* result = new(zone()) LMathExp(value, temp1, temp2); 1237 LMathExp* result = new(zone()) LMathExp(value, temp1, temp2);
1262 return DefineAsRegister(result); 1238 return DefineAsRegister(result);
1263 } 1239 }
1264 1240
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2600 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2625 LOperand* object = UseRegister(instr->object()); 2601 LOperand* object = UseRegister(instr->object());
2626 LOperand* index = UseTempRegister(instr->index()); 2602 LOperand* index = UseTempRegister(instr->index());
2627 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2603 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2628 } 2604 }
2629 2605
2630 2606
2631 } } // namespace v8::internal 2607 } } // namespace v8::internal
2632 2608
2633 #endif // V8_TARGET_ARCH_X64 2609 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698