Commit bb380cf9 authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Cleaned up CpuFeature scope handling.

Port r13823 (cb37ab63)

BUG=

Review URL: https://codereview.chromium.org/12424004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4c91b742
...@@ -3520,7 +3520,7 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray( ...@@ -3520,7 +3520,7 @@ void KeyedStoreStubCompiler::GenerateStoreExternalArray(
f0, t2, t3, // These are: double_dst, dst_mantissa, dst_exponent. f0, t2, t3, // These are: double_dst, dst_mantissa, dst_exponent.
t0, f2); // These are: scratch2, single_scratch. t0, f2); // These are: scratch2, single_scratch.
if (destination == FloatingPointHelper::kFPURegisters) { if (destination == FloatingPointHelper::kFPURegisters) {
CpuFeatureScope scope(masm(), FPU); CpuFeatureScope scope(masm, FPU);
__ sdc1(f0, MemOperand(a3, 0)); __ sdc1(f0, MemOperand(a3, 0));
} else { } else {
__ sw(t2, MemOperand(a3, 0)); __ sw(t2, MemOperand(a3, 0));
......
...@@ -287,7 +287,7 @@ TEST(MIPS3) { ...@@ -287,7 +287,7 @@ TEST(MIPS3) {
Label L, C; Label L, C;
if (CpuFeatures::IsSupported(FPU)) { if (CpuFeatures::IsSupported(FPU)) {
CpuFeatures::Scope scope(FPU); CpuFeatureScope scope(&assm, FPU);
__ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) );
__ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) ); __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) );
...@@ -370,7 +370,7 @@ TEST(MIPS4) { ...@@ -370,7 +370,7 @@ TEST(MIPS4) {
Label L, C; Label L, C;
if (CpuFeatures::IsSupported(FPU)) { if (CpuFeatures::IsSupported(FPU)) {
CpuFeatures::Scope scope(FPU); CpuFeatureScope scope(&assm, FPU);
__ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) );
__ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) ); __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) );
...@@ -431,7 +431,7 @@ TEST(MIPS5) { ...@@ -431,7 +431,7 @@ TEST(MIPS5) {
Label L, C; Label L, C;
if (CpuFeatures::IsSupported(FPU)) { if (CpuFeatures::IsSupported(FPU)) {
CpuFeatures::Scope scope(FPU); CpuFeatureScope scope(&assm, FPU);
// Load all structure elements to registers. // Load all structure elements to registers.
__ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) );
...@@ -579,7 +579,7 @@ TEST(MIPS7) { ...@@ -579,7 +579,7 @@ TEST(MIPS7) {
Label neither_is_nan, less_than, outa_here; Label neither_is_nan, less_than, outa_here;
if (CpuFeatures::IsSupported(FPU)) { if (CpuFeatures::IsSupported(FPU)) {
CpuFeatures::Scope scope(FPU); CpuFeatureScope scope(&assm, FPU);
__ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) ); __ ldc1(f4, MemOperand(a0, OFFSET_OF(T, a)) );
__ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) ); __ ldc1(f6, MemOperand(a0, OFFSET_OF(T, b)) );
...@@ -792,7 +792,7 @@ TEST(MIPS10) { ...@@ -792,7 +792,7 @@ TEST(MIPS10) {
Label L, C; Label L, C;
if (CpuFeatures::IsSupported(FPU) && kArchVariant == kMips32r2) { if (CpuFeatures::IsSupported(FPU) && kArchVariant == kMips32r2) {
CpuFeatures::Scope scope(FPU); CpuFeatureScope scope(&assm, FPU);
// Load all structure elements to registers. // Load all structure elements to registers.
__ ldc1(f0, MemOperand(a0, OFFSET_OF(T, a))); __ ldc1(f0, MemOperand(a0, OFFSET_OF(T, a)));
...@@ -1097,7 +1097,7 @@ TEST(MIPS13) { ...@@ -1097,7 +1097,7 @@ TEST(MIPS13) {
MacroAssembler assm(Isolate::Current(), NULL, 0); MacroAssembler assm(Isolate::Current(), NULL, 0);
if (CpuFeatures::IsSupported(FPU)) { if (CpuFeatures::IsSupported(FPU)) {
CpuFeatures::Scope scope(FPU); CpuFeatureScope scope(&assm, FPU);
__ sw(t0, MemOperand(a0, OFFSET_OF(T, cvt_small_in))); __ sw(t0, MemOperand(a0, OFFSET_OF(T, cvt_small_in)));
__ Cvt_d_uw(f10, t0, f22); __ Cvt_d_uw(f10, t0, f22);
...@@ -1180,7 +1180,7 @@ TEST(MIPS14) { ...@@ -1180,7 +1180,7 @@ TEST(MIPS14) {
MacroAssembler assm(Isolate::Current(), NULL, 0); MacroAssembler assm(Isolate::Current(), NULL, 0);
if (CpuFeatures::IsSupported(FPU)) { if (CpuFeatures::IsSupported(FPU)) {
CpuFeatures::Scope scope(FPU); CpuFeatureScope scope(&assm, FPU);
// Save FCSR. // Save FCSR.
__ cfc1(a1, FCSR); __ cfc1(a1, FCSR);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment