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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 1081033003: [x86] Allow (v)divsd->(v)mulsd to execute in parallel. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months 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
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 __ mulsd(left, right); 2033 __ mulsd(left, right);
2034 } 2034 }
2035 break; 2035 break;
2036 case Token::DIV: 2036 case Token::DIV:
2037 if (CpuFeatures::IsSupported(AVX)) { 2037 if (CpuFeatures::IsSupported(AVX)) {
2038 CpuFeatureScope scope(masm(), AVX); 2038 CpuFeatureScope scope(masm(), AVX);
2039 __ vdivsd(result, left, right); 2039 __ vdivsd(result, left, right);
2040 } else { 2040 } else {
2041 DCHECK(result.is(left)); 2041 DCHECK(result.is(left));
2042 __ divsd(left, right); 2042 __ divsd(left, right);
2043 // Don't delete this mov. It may improve performance on some CPUs,
2044 // when there is a mulsd depending on the result
2045 __ movaps(left, left);
2046 } 2043 }
2044 // Don't delete this mov. It may improve performance on some CPUs,
2045 // when there is a (v)mulsd depending on the result
2046 __ movaps(result, result);
2047 break; 2047 break;
2048 case Token::MOD: { 2048 case Token::MOD: {
2049 // Pass two doubles as arguments on the stack. 2049 // Pass two doubles as arguments on the stack.
2050 __ PrepareCallCFunction(4, eax); 2050 __ PrepareCallCFunction(4, eax);
2051 __ movsd(Operand(esp, 0 * kDoubleSize), left); 2051 __ movsd(Operand(esp, 0 * kDoubleSize), left);
2052 __ movsd(Operand(esp, 1 * kDoubleSize), right); 2052 __ movsd(Operand(esp, 1 * kDoubleSize), right);
2053 __ CallCFunction( 2053 __ CallCFunction(
2054 ExternalReference::mod_two_doubles_operation(isolate()), 2054 ExternalReference::mod_two_doubles_operation(isolate()),
2055 4); 2055 4);
2056 2056
(...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after
5762 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5762 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5763 RecordSafepoint(Safepoint::kNoLazyDeopt); 5763 RecordSafepoint(Safepoint::kNoLazyDeopt);
5764 } 5764 }
5765 5765
5766 5766
5767 #undef __ 5767 #undef __
5768 5768
5769 } } // namespace v8::internal 5769 } } // namespace v8::internal
5770 5770
5771 #endif // V8_TARGET_ARCH_IA32 5771 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698