OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2793 context()->Plug(eax); | 2793 context()->Plug(eax); |
2794 } | 2794 } |
2795 | 2795 |
2796 | 2796 |
2797 void FullCodeGenerator::EmitMathPow(ZoneList<Expression*>* args) { | 2797 void FullCodeGenerator::EmitMathPow(ZoneList<Expression*>* args) { |
2798 // Load the arguments on the stack and call the runtime function. | 2798 // Load the arguments on the stack and call the runtime function. |
2799 ASSERT(args->length() == 2); | 2799 ASSERT(args->length() == 2); |
2800 VisitForStackValue(args->at(0)); | 2800 VisitForStackValue(args->at(0)); |
2801 VisitForStackValue(args->at(1)); | 2801 VisitForStackValue(args->at(1)); |
2802 | 2802 |
2803 MathPowStub stub; | 2803 if (masm()->isolate()->cpu_features()->IsSupported(SSE2)) { |
2804 __ CallStub(&stub); | 2804 MathPowStub stub; |
| 2805 __ CallStub(&stub); |
| 2806 } else { |
| 2807 __ CallRuntime(Runtime::kMath_pow, 2); |
| 2808 } |
2805 context()->Plug(eax); | 2809 context()->Plug(eax); |
2806 } | 2810 } |
2807 | 2811 |
2808 | 2812 |
2809 void FullCodeGenerator::EmitSetValueOf(ZoneList<Expression*>* args) { | 2813 void FullCodeGenerator::EmitSetValueOf(ZoneList<Expression*>* args) { |
2810 ASSERT(args->length() == 2); | 2814 ASSERT(args->length() == 2); |
2811 | 2815 |
2812 VisitForStackValue(args->at(0)); // Load the object. | 2816 VisitForStackValue(args->at(0)); // Load the object. |
2813 VisitForAccumulatorValue(args->at(1)); // Load the value. | 2817 VisitForAccumulatorValue(args->at(1)); // Load the value. |
2814 __ pop(ebx); // eax = value. ebx = object. | 2818 __ pop(ebx); // eax = value. ebx = object. |
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4286 // And return. | 4290 // And return. |
4287 __ ret(0); | 4291 __ ret(0); |
4288 } | 4292 } |
4289 | 4293 |
4290 | 4294 |
4291 #undef __ | 4295 #undef __ |
4292 | 4296 |
4293 } } // namespace v8::internal | 4297 } } // namespace v8::internal |
4294 | 4298 |
4295 #endif // V8_TARGET_ARCH_IA32 | 4299 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |