Revision: 8002
Author: [email protected]
Date: Mon May 23 09:17:40 2011
Log: Remove stub call in non-VFP3 code path of external array load.
KeyedLoadStubCompiler::GenerateLoadExternalArray is tail-calling a stub,
which it is not allowed to, because its major key is higher than
InstanceOf. Instead of changing the major key I decided to provide an
inline implementation.
TEST=test-api/ExternalArrays with --noenable-vfp3
[email protected]
Review URL: http://codereview.chromium.org/7060007
http://code.google.com/p/v8/source/detail?r=8002
Modified:
/branches/bleeding_edge/src/arm/code-stubs-arm.cc
/branches/bleeding_edge/src/arm/stub-cache-arm.cc
=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Wed May 18 10:32:36
2011
+++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Mon May 23 09:17:40
2011
@@ -538,6 +538,8 @@
Register scratch2,
SwVfpRegister single_scratch)
{
ASSERT(!int_scratch.is(scratch2));
+ ASSERT(!int_scratch.is(dst1));
+ ASSERT(!int_scratch.is(dst2));
Label done;
=======================================
--- /branches/bleeding_edge/src/arm/stub-cache-arm.cc Mon May 23 08:04:32
2011
+++ /branches/bleeding_edge/src/arm/stub-cache-arm.cc Mon May 23 09:17:40
2011
@@ -3577,8 +3577,21 @@
__ vstr(d0, r3, HeapNumber::kValueOffset);
__ Ret();
} else {
- WriteInt32ToHeapNumberStub stub(value, r0, r3);
- __ TailCallStub(&stub);
+ Register dst1 = r1;
+ Register dst2 = r3;
+ FloatingPointHelper::Destination dest =
+ FloatingPointHelper::kCoreRegisters;
+ FloatingPointHelper::ConvertIntToDouble(masm,
+ value,
+ dest,
+ d0,
+ dst1,
+ dst2,
+ r9,
+ s0);
+ __ str(dst1, FieldMemOperand(r0, HeapNumber::kMantissaOffset));
+ __ str(dst2, FieldMemOperand(r0, HeapNumber::kExponentOffset));
+ __ Ret();
}
} else if (array_type == kExternalUnsignedIntArray) {
// The test is different for unsigned int values. Since we need
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev