| 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 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 LOperand* temp2 = TempRegister(); | 1138 LOperand* temp2 = TempRegister(); |
| 1139 LMathExp* result = new(zone()) LMathExp(value, temp1, temp2); | 1139 LMathExp* result = new(zone()) LMathExp(value, temp1, temp2); |
| 1140 return DefineAsRegister(result); | 1140 return DefineAsRegister(result); |
| 1141 } else if (op == kMathSin || op == kMathCos || op == kMathTan) { | 1141 } else if (op == kMathSin || op == kMathCos || op == kMathTan) { |
| 1142 LOperand* context = UseFixed(instr->context(), esi); | 1142 LOperand* context = UseFixed(instr->context(), esi); |
| 1143 LOperand* input = UseFixedDouble(instr->value(), xmm1); | 1143 LOperand* input = UseFixedDouble(instr->value(), xmm1); |
| 1144 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(context, | 1144 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(context, |
| 1145 input); | 1145 input); |
| 1146 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); | 1146 return MarkAsCall(DefineFixedDouble(result, xmm1), instr); |
| 1147 } else { | 1147 } else { |
| 1148 LOperand* input = UseRegisterAtStart(instr->value()); | 1148 LOperand* input; |
| 1149 if (op == kMathRound && |
| 1150 (!CpuFeatures::IsSupported(SSE4_1) || |
| 1151 instr->CheckFlag(HValue::kBailoutOnMinusZero))) { |
| 1152 // Math.round implemented without roundsd. Input may be overwritten. |
| 1153 ASSERT(instr->value()->representation().IsDouble()); |
| 1154 input = UseTempRegister(instr->value()); |
| 1155 } else { |
| 1156 input = UseRegisterAtStart(instr->value()); |
| 1157 } |
| 1149 LOperand* context = UseAny(instr->context()); // Deferred use by MathAbs. | 1158 LOperand* context = UseAny(instr->context()); // Deferred use by MathAbs. |
| 1150 if (op == kMathPowHalf) { | 1159 if (op == kMathPowHalf) { |
| 1151 LOperand* temp = TempRegister(); | 1160 LOperand* temp = TempRegister(); |
| 1152 LMathPowHalf* result = new(zone()) LMathPowHalf(context, input, temp); | 1161 LMathPowHalf* result = new(zone()) LMathPowHalf(context, input, temp); |
| 1153 return DefineSameAsFirst(result); | 1162 return DefineSameAsFirst(result); |
| 1154 } | 1163 } |
| 1155 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(context, | 1164 LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(context, |
| 1156 input); | 1165 input); |
| 1157 switch (op) { | 1166 switch (op) { |
| 1158 case kMathAbs: | 1167 case kMathAbs: |
| (...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2572 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2564 LOperand* object = UseRegister(instr->object()); | 2573 LOperand* object = UseRegister(instr->object()); |
| 2565 LOperand* index = UseTempRegister(instr->index()); | 2574 LOperand* index = UseTempRegister(instr->index()); |
| 2566 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2575 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2567 } | 2576 } |
| 2568 | 2577 |
| 2569 | 2578 |
| 2570 } } // namespace v8::internal | 2579 } } // namespace v8::internal |
| 2571 | 2580 |
| 2572 #endif // V8_TARGET_ARCH_IA32 | 2581 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |