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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 12391055: Cleaned up CpuFeature scope handling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed nits Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
index 5368811a1e9a52e15ab2b74da58ac8f626c66aeb..b3fce81a32fda8679333d01b0f9341445d2c4255 100644
--- a/src/ia32/codegen-ia32.cc
+++ b/src/ia32/codegen-ia32.cc
@@ -114,7 +114,7 @@ UnaryMathFunction CreateExpFunction() {
// esp[1 * kPointerSize]: raw double input
// esp[0 * kPointerSize]: return address
{
- CpuFeatures::Scope use_sse2(SSE2);
+ CpuFeatureScope use_sse2(&masm, SSE2);
XMMRegister input = xmm1;
XMMRegister result = xmm2;
__ movdbl(input, Operand(esp, 1 * kPointerSize));
@@ -154,7 +154,7 @@ UnaryMathFunction CreateSqrtFunction() {
// esp[0 * kPointerSize]: return address
// Move double input into registers.
{
- CpuFeatures::Scope use_sse2(SSE2);
+ CpuFeatureScope use_sse2(&masm, SSE2);
__ movdbl(xmm0, Operand(esp, 1 * kPointerSize));
__ sqrtsd(xmm0, xmm0);
__ movdbl(Operand(esp, 1 * kPointerSize), xmm0);
@@ -214,7 +214,7 @@ OS::MemCopyFunction CreateMemCopyFunction() {
__ bind(&ok);
}
if (CpuFeatures::IsSupported(SSE2)) {
- CpuFeatures::Scope enable(SSE2);
+ CpuFeatureScope enable(&masm, SSE2);
__ push(edi);
__ push(esi);
stack_offset += 2 * kPointerSize;
@@ -479,7 +479,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
ExternalReference::address_of_the_hole_nan();
XMMRegister the_hole_nan = xmm1;
if (CpuFeatures::IsSupported(SSE2)) {
- CpuFeatures::Scope use_sse2(SSE2);
+ CpuFeatureScope use_sse2(masm, SSE2);
__ movdbl(the_hole_nan,
Operand::StaticVariable(canonical_the_hole_nan_reference));
}
@@ -504,7 +504,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
// Normal smi, convert it to double and store.
__ SmiUntag(ebx);
if (CpuFeatures::IsSupported(SSE2)) {
- CpuFeatures::Scope fscope(SSE2);
+ CpuFeatureScope fscope(masm, SSE2);
__ cvtsi2sd(xmm0, ebx);
__ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize),
xmm0);
@@ -525,7 +525,7 @@ void ElementsTransitionGenerator::GenerateSmiToDouble(
}
if (CpuFeatures::IsSupported(SSE2)) {
- CpuFeatures::Scope use_sse2(SSE2);
+ CpuFeatureScope use_sse2(masm, SSE2);
__ movdbl(FieldOperand(eax, edi, times_4, FixedDoubleArray::kHeaderSize),
the_hole_nan);
} else {
@@ -635,7 +635,7 @@ void ElementsTransitionGenerator::GenerateDoubleToObject(
__ AllocateHeapNumber(edx, esi, no_reg, &gc_required);
// edx: new heap number
if (CpuFeatures::IsSupported(SSE2)) {
- CpuFeatures::Scope fscope(SSE2);
+ CpuFeatureScope fscope(masm, SSE2);
__ movdbl(xmm0,
FieldOperand(edi, ebx, times_4, FixedDoubleArray::kHeaderSize));
__ movdbl(FieldOperand(edx, HeapNumber::kValueOffset), xmm0);
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698