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

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 11308158: MIPS: Fix register confusion in non-VFP3 BinaryOpStubs on ARM (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on r13080 Created 8 years 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 | « src/mips/code-stubs-mips.cc ('k') | 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 // 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 3850 matching lines...) Expand 10 before | Expand all | Expand 10 after
3861 __ sdc1(f0, MemOperand(v0, HeapNumber::kValueOffset)); 3861 __ sdc1(f0, MemOperand(v0, HeapNumber::kValueOffset));
3862 __ Addu(v0, v0, kHeapObjectTag); 3862 __ Addu(v0, v0, kHeapObjectTag);
3863 __ Ret(); 3863 __ Ret();
3864 } else { 3864 } else {
3865 // Allocate a HeapNumber for the result and perform int-to-double 3865 // Allocate a HeapNumber for the result and perform int-to-double
3866 // conversion. 3866 // conversion.
3867 // The arm version uses a temporary here to save r0, but we don't need to 3867 // The arm version uses a temporary here to save r0, but we don't need to
3868 // (a0 is not modified). 3868 // (a0 is not modified).
3869 __ LoadRoot(t1, Heap::kHeapNumberMapRootIndex); 3869 __ LoadRoot(t1, Heap::kHeapNumberMapRootIndex);
3870 __ AllocateHeapNumber(v0, a3, t0, t1, &slow, TAG_RESULT); 3870 __ AllocateHeapNumber(v0, a3, t0, t1, &slow, TAG_RESULT);
3871 Register dst1 = t2; 3871 Register dst_mantissa = t2;
3872 Register dst2 = t3; 3872 Register dst_exponent = t3;
3873 FloatingPointHelper::Destination dest = 3873 FloatingPointHelper::Destination dest =
3874 FloatingPointHelper::kCoreRegisters; 3874 FloatingPointHelper::kCoreRegisters;
3875 FloatingPointHelper::ConvertIntToDouble(masm, 3875 FloatingPointHelper::ConvertIntToDouble(masm,
3876 value, 3876 value,
3877 dest, 3877 dest,
3878 f0, 3878 f0,
3879 dst1, 3879 dst_mantissa,
3880 dst2, 3880 dst_exponent,
3881 t1, 3881 t1,
3882 f2); 3882 f2);
3883 __ sw(dst1, FieldMemOperand(v0, HeapNumber::kMantissaOffset)); 3883 __ sw(dst_mantissa, FieldMemOperand(v0, HeapNumber::kMantissaOffset));
3884 __ sw(dst2, FieldMemOperand(v0, HeapNumber::kExponentOffset)); 3884 __ sw(dst_exponent, FieldMemOperand(v0, HeapNumber::kExponentOffset));
3885 __ Ret(); 3885 __ Ret();
3886 } 3886 }
3887 } else if (elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS) { 3887 } else if (elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS) {
3888 // The test is different for unsigned int values. Since we need 3888 // The test is different for unsigned int values. Since we need
3889 // the value to be in the range of a positive smi, we can't 3889 // the value to be in the range of a positive smi, we can't
3890 // handle either of the top two bits being set in the value. 3890 // handle either of the top two bits being set in the value.
3891 if (CpuFeatures::IsSupported(FPU)) { 3891 if (CpuFeatures::IsSupported(FPU)) {
3892 CpuFeatures::Scope scope(FPU); 3892 CpuFeatures::Scope scope(FPU);
3893 Label pl_box_int; 3893 Label pl_box_int;
3894 __ And(t2, value, Operand(0xC0000000)); 3894 __ And(t2, value, Operand(0xC0000000));
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
4173 __ addu(a3, a3, t8); 4173 __ addu(a3, a3, t8);
4174 // a3: effective address of the double element 4174 // a3: effective address of the double element
4175 FloatingPointHelper::Destination destination; 4175 FloatingPointHelper::Destination destination;
4176 if (CpuFeatures::IsSupported(FPU)) { 4176 if (CpuFeatures::IsSupported(FPU)) {
4177 destination = FloatingPointHelper::kFPURegisters; 4177 destination = FloatingPointHelper::kFPURegisters;
4178 } else { 4178 } else {
4179 destination = FloatingPointHelper::kCoreRegisters; 4179 destination = FloatingPointHelper::kCoreRegisters;
4180 } 4180 }
4181 FloatingPointHelper::ConvertIntToDouble( 4181 FloatingPointHelper::ConvertIntToDouble(
4182 masm, t1, destination, 4182 masm, t1, destination,
4183 f0, t2, t3, // These are: double_dst, dst1, dst2. 4183 f0, t2, t3, // These are: double_dst, dst_mantissa, dst_exponent.
4184 t0, f2); // These are: scratch2, single_scratch. 4184 t0, f2); // These are: scratch2, single_scratch.
4185 if (destination == FloatingPointHelper::kFPURegisters) { 4185 if (destination == FloatingPointHelper::kFPURegisters) {
4186 CpuFeatures::Scope scope(FPU); 4186 CpuFeatures::Scope scope(FPU);
4187 __ sdc1(f0, MemOperand(a3, 0)); 4187 __ sdc1(f0, MemOperand(a3, 0));
4188 } else { 4188 } else {
4189 __ sw(t2, MemOperand(a3, 0)); 4189 __ sw(t2, MemOperand(a3, 0));
4190 __ sw(t3, MemOperand(a3, Register::kSizeInBytes)); 4190 __ sw(t3, MemOperand(a3, Register::kSizeInBytes));
4191 } 4191 }
4192 break; 4192 break;
4193 case FAST_ELEMENTS: 4193 case FAST_ELEMENTS:
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
4894 __ Jump(ic_slow, RelocInfo::CODE_TARGET); 4894 __ Jump(ic_slow, RelocInfo::CODE_TARGET);
4895 } 4895 }
4896 } 4896 }
4897 4897
4898 4898
4899 #undef __ 4899 #undef __
4900 4900
4901 } } // namespace v8::internal 4901 } } // namespace v8::internal
4902 4902
4903 #endif // V8_TARGET_ARCH_MIPS 4903 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698