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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 stream->Add("#%d / ", arity()); | 292 stream->Add("#%d / ", arity()); |
293 } | 293 } |
294 | 294 |
295 | 295 |
296 void LUnaryMathOperation::PrintDataTo(StringStream* stream) { | 296 void LUnaryMathOperation::PrintDataTo(StringStream* stream) { |
297 stream->Add("/%s ", hydrogen()->OpName()); | 297 stream->Add("/%s ", hydrogen()->OpName()); |
298 value()->PrintTo(stream); | 298 value()->PrintTo(stream); |
299 } | 299 } |
300 | 300 |
301 | 301 |
| 302 void LMathExp::PrintDataTo(StringStream* stream) { |
| 303 value()->PrintTo(stream); |
| 304 } |
| 305 |
| 306 |
302 void LMathPowHalf::PrintDataTo(StringStream* stream) { | 307 void LMathPowHalf::PrintDataTo(StringStream* stream) { |
303 stream->Add("/pow_half "); | 308 stream->Add("/pow_half "); |
304 value()->PrintTo(stream); | 309 value()->PrintTo(stream); |
305 } | 310 } |
306 | 311 |
307 | 312 |
308 void LLoadContextSlot::PrintDataTo(StringStream* stream) { | 313 void LLoadContextSlot::PrintDataTo(StringStream* stream) { |
309 context()->PrintTo(stream); | 314 context()->PrintTo(stream); |
310 stream->Add("[%d]", slot_index()); | 315 stream->Add("[%d]", slot_index()); |
311 } | 316 } |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { | 1085 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { |
1081 BuiltinFunctionId op = instr->op(); | 1086 BuiltinFunctionId op = instr->op(); |
1082 if (op == kMathLog) { | 1087 if (op == kMathLog) { |
1083 ASSERT(instr->representation().IsDouble()); | 1088 ASSERT(instr->representation().IsDouble()); |
1084 ASSERT(instr->value()->representation().IsDouble()); | 1089 ASSERT(instr->value()->representation().IsDouble()); |
1085 LOperand* context = UseAny(instr->context()); // Not actually used. | 1090 LOperand* context = UseAny(instr->context()); // Not actually used. |
1086 LOperand* input = UseRegisterAtStart(instr->value()); | 1091 LOperand* input = UseRegisterAtStart(instr->value()); |
1087 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(context, | 1092 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(context, |
1088 input); | 1093 input); |
1089 return DefineSameAsFirst(result); | 1094 return DefineSameAsFirst(result); |
| 1095 } else if (op == kMathExp) { |
| 1096 ASSERT(instr->representation().IsDouble()); |
| 1097 ASSERT(instr->value()->representation().IsDouble()); |
| 1098 LOperand* value = UseTempRegister(instr->value()); |
| 1099 LOperand* temp1 = TempRegister(); |
| 1100 LOperand* temp2 = TempRegister(); |
| 1101 LMathExp* result = new(zone()) LMathExp(value, temp1, temp2); |
| 1102 return DefineAsRegister(result); |
1090 } else if (op == kMathSin || op == kMathCos || op == kMathTan) { | 1103 } else if (op == kMathSin || op == kMathCos || op == kMathTan) { |
1091 LOperand* context = UseFixed(instr->context(), esi); | 1104 LOperand* context = UseFixed(instr->context(), esi); |
1092 LOperand* input = UseFixedDouble(instr->value(), xmm1); | 1105 LOperand* input = UseFixedDouble(instr->value(), xmm1); |
1093 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(context, | 1106 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(context, |
1094 input); | 1107 input); |
1095 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); | 1108 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); |
1096 } else { | 1109 } else { |
1097 LOperand* input = UseRegisterAtStart(instr->value()); | 1110 LOperand* input = UseRegisterAtStart(instr->value()); |
1098 LOperand* context = UseAny(instr->context()); // Deferred use by MathAbs. | 1111 LOperand* context = UseAny(instr->context()); // Deferred use by MathAbs. |
1099 if (op == kMathPowHalf) { | 1112 if (op == kMathPowHalf) { |
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2412 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2425 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2413 LOperand* object = UseRegister(instr->object()); | 2426 LOperand* object = UseRegister(instr->object()); |
2414 LOperand* index = UseTempRegister(instr->index()); | 2427 LOperand* index = UseTempRegister(instr->index()); |
2415 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2428 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2416 } | 2429 } |
2417 | 2430 |
2418 | 2431 |
2419 } } // namespace v8::internal | 2432 } } // namespace v8::internal |
2420 | 2433 |
2421 #endif // V8_TARGET_ARCH_IA32 | 2434 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |