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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 645553002: [ia32] Fix for no SSE4.1. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 2643 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 pcmpeqd(dst, dst); 2654 pcmpeqd(dst, dst);
2655 if (ntz == 0) { 2655 if (ntz == 0) {
2656 psrlq(dst, 64 - cnt); 2656 psrlq(dst, 64 - cnt);
2657 } else { 2657 } else {
2658 psllq(dst, 64 - cnt); 2658 psllq(dst, 64 - cnt);
2659 if (nlz != 0) psrlq(dst, nlz); 2659 if (nlz != 0) psrlq(dst, nlz);
2660 } 2660 }
2661 } else if (lower == 0) { 2661 } else if (lower == 0) {
2662 Move(dst, upper); 2662 Move(dst, upper);
2663 psllq(dst, 32); 2663 psllq(dst, 32);
2664 } else { 2664 } else if (CpuFeatures::IsSupported(SSE4_1)) {
2665 CpuFeatureScope scope(this, SSE4_1);
2665 push(eax); 2666 push(eax);
2666 Move(eax, Immediate(lower)); 2667 Move(eax, Immediate(lower));
2667 movd(dst, Operand(eax)); 2668 movd(dst, Operand(eax));
2668 Move(eax, Immediate(upper)); 2669 Move(eax, Immediate(upper));
2669 if (CpuFeatures::IsSupported(SSE4_1)) { 2670 pinsrd(dst, Operand(eax), 1);
2670 CpuFeatureScope scope(this, SSE4_1);
2671 pinsrd(dst, Operand(eax), 1);
2672 } else {
2673 psllq(dst, 32);
2674 movd(xmm0, Operand(eax));
2675 orpd(dst, xmm0);
2676 }
2677 pop(eax); 2671 pop(eax);
2672 } else {
2673 push(Immediate(upper));
2674 push(Immediate(lower));
2675 movsd(dst, Operand(esp, 0));
2676 add(esp, Immediate(kDoubleSize));
2678 } 2677 }
2679 } 2678 }
2680 } 2679 }
2681 2680
2682 2681
2683 void MacroAssembler::SetCounter(StatsCounter* counter, int value) { 2682 void MacroAssembler::SetCounter(StatsCounter* counter, int value) {
2684 if (FLAG_native_code_counters && counter->Enabled()) { 2683 if (FLAG_native_code_counters && counter->Enabled()) {
2685 mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value)); 2684 mov(Operand::StaticVariable(ExternalReference(counter)), Immediate(value));
2686 } 2685 }
2687 } 2686 }
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
3439 if (mag.shift > 0) sar(edx, mag.shift); 3438 if (mag.shift > 0) sar(edx, mag.shift);
3440 mov(eax, dividend); 3439 mov(eax, dividend);
3441 shr(eax, 31); 3440 shr(eax, 31);
3442 add(edx, eax); 3441 add(edx, eax);
3443 } 3442 }
3444 3443
3445 3444
3446 } } // namespace v8::internal 3445 } } // namespace v8::internal
3447 3446
3448 #endif // V8_TARGET_ARCH_IA32 3447 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698