| OLD | NEW |
| 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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 | 1275 |
| 1276 | 1276 |
| 1277 LInstruction* LChunkBuilder::DoMathFloor(HUnaryMathOperation* instr) { | 1277 LInstruction* LChunkBuilder::DoMathFloor(HUnaryMathOperation* instr) { |
| 1278 LOperand* input = UseRegisterAtStart(instr->value()); | 1278 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1279 LMathFloor* result = new(zone()) LMathFloor(input); | 1279 LMathFloor* result = new(zone()) LMathFloor(input); |
| 1280 return AssignEnvironment(DefineAsRegister(result)); | 1280 return AssignEnvironment(DefineAsRegister(result)); |
| 1281 } | 1281 } |
| 1282 | 1282 |
| 1283 | 1283 |
| 1284 LInstruction* LChunkBuilder::DoMathRound(HUnaryMathOperation* instr) { | 1284 LInstruction* LChunkBuilder::DoMathRound(HUnaryMathOperation* instr) { |
| 1285 LOperand* context = UseAny(instr->context()); | |
| 1286 LOperand* input = UseRegister(instr->value()); | 1285 LOperand* input = UseRegister(instr->value()); |
| 1287 LOperand* temp = FixedTemp(xmm4); | 1286 LOperand* temp = FixedTemp(xmm4); |
| 1288 LMathRound* result = new(zone()) LMathRound(context, input, temp); | 1287 LMathRound* result = new(zone()) LMathRound(input, temp); |
| 1289 return AssignEnvironment(DefineAsRegister(result)); | 1288 return AssignEnvironment(DefineAsRegister(result)); |
| 1290 } | 1289 } |
| 1291 | 1290 |
| 1292 | 1291 |
| 1293 LInstruction* LChunkBuilder::DoMathAbs(HUnaryMathOperation* instr) { | 1292 LInstruction* LChunkBuilder::DoMathAbs(HUnaryMathOperation* instr) { |
| 1294 LOperand* context = UseAny(instr->context()); // Deferred use. | 1293 LOperand* context = UseAny(instr->context()); // Deferred use. |
| 1295 LOperand* input = UseRegisterAtStart(instr->value()); | 1294 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1296 LMathAbs* result = new(zone()) LMathAbs(context, input); | 1295 LMathAbs* result = new(zone()) LMathAbs(context, input); |
| 1297 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1296 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
| 1298 } | 1297 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 | 1339 |
| 1341 | 1340 |
| 1342 LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { | 1341 LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { |
| 1343 LOperand* input = UseRegisterAtStart(instr->value()); | 1342 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1344 LMathSqrt* result = new(zone()) LMathSqrt(input); | 1343 LMathSqrt* result = new(zone()) LMathSqrt(input); |
| 1345 return DefineSameAsFirst(result); | 1344 return DefineSameAsFirst(result); |
| 1346 } | 1345 } |
| 1347 | 1346 |
| 1348 | 1347 |
| 1349 LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) { | 1348 LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) { |
| 1350 LOperand* context = UseAny(instr->context()); | |
| 1351 LOperand* input = UseRegisterAtStart(instr->value()); | 1349 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1352 LOperand* temp = TempRegister(); | 1350 LOperand* temp = TempRegister(); |
| 1353 LMathPowHalf* result = new(zone()) LMathPowHalf(context, input, temp); | 1351 LMathPowHalf* result = new(zone()) LMathPowHalf(input, temp); |
| 1354 return DefineSameAsFirst(result); | 1352 return DefineSameAsFirst(result); |
| 1355 } | 1353 } |
| 1356 | 1354 |
| 1357 | 1355 |
| 1358 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { | 1356 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { |
| 1359 ASSERT(instr->key()->representation().IsTagged()); | 1357 ASSERT(instr->key()->representation().IsTagged()); |
| 1360 LOperand* context = UseFixed(instr->context(), esi); | 1358 LOperand* context = UseFixed(instr->context(), esi); |
| 1361 LOperand* key = UseFixed(instr->key(), ecx); | 1359 LOperand* key = UseFixed(instr->key(), ecx); |
| 1362 LCallKeyed* result = new(zone()) LCallKeyed(context, key); | 1360 LCallKeyed* result = new(zone()) LCallKeyed(context, key); |
| 1363 return MarkAsCall(DefineFixed(result, eax), instr); | 1361 return MarkAsCall(DefineFixed(result, eax), instr); |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2091 LClampTToUint8NoSSE2* res = | 2089 LClampTToUint8NoSSE2* res = |
| 2092 new(zone()) LClampTToUint8NoSSE2(value, TempRegister(), | 2090 new(zone()) LClampTToUint8NoSSE2(value, TempRegister(), |
| 2093 TempRegister(), TempRegister()); | 2091 TempRegister(), TempRegister()); |
| 2094 return AssignEnvironment(DefineFixed(res, ecx)); | 2092 return AssignEnvironment(DefineFixed(res, ecx)); |
| 2095 } | 2093 } |
| 2096 } | 2094 } |
| 2097 } | 2095 } |
| 2098 | 2096 |
| 2099 | 2097 |
| 2100 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 2098 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
| 2101 LOperand* context = info()->IsStub() | 2099 LOperand* context = info()->IsStub() ? UseFixed(instr->context(), esi) : NULL; |
| 2102 ? UseFixed(instr->context(), esi) | |
| 2103 : NULL; | |
| 2104 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); | 2100 LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count()); |
| 2105 return new(zone()) LReturn(UseFixed(instr->value(), eax), context, | 2101 return new(zone()) LReturn( |
| 2106 parameter_count); | 2102 UseFixed(instr->value(), eax), context, parameter_count); |
| 2107 } | 2103 } |
| 2108 | 2104 |
| 2109 | 2105 |
| 2110 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 2106 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
| 2111 Representation r = instr->representation(); | 2107 Representation r = instr->representation(); |
| 2112 if (r.IsSmi()) { | 2108 if (r.IsSmi()) { |
| 2113 return DefineAsRegister(new(zone()) LConstantS); | 2109 return DefineAsRegister(new(zone()) LConstantS); |
| 2114 } else if (r.IsInteger32()) { | 2110 } else if (r.IsInteger32()) { |
| 2115 return DefineAsRegister(new(zone()) LConstantI); | 2111 return DefineAsRegister(new(zone()) LConstantI); |
| 2116 } else if (r.IsDouble()) { | 2112 } else if (r.IsDouble()) { |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2732 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2728 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2733 LOperand* object = UseRegister(instr->object()); | 2729 LOperand* object = UseRegister(instr->object()); |
| 2734 LOperand* index = UseTempRegister(instr->index()); | 2730 LOperand* index = UseTempRegister(instr->index()); |
| 2735 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2731 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2736 } | 2732 } |
| 2737 | 2733 |
| 2738 | 2734 |
| 2739 } } // namespace v8::internal | 2735 } } // namespace v8::internal |
| 2740 | 2736 |
| 2741 #endif // V8_TARGET_ARCH_IA32 | 2737 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |