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

R=danno@chromium.org

Review URL: http://codereview.chromium.org/7060007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
karlklose@chromium.org 2011-05-23 16:17:40 +00:00
parent 70d5e6d582
commit b082e6cc73
2 changed files with 17 additions and 2 deletions

View File

@ -538,6 +538,8 @@ void FloatingPointHelper::ConvertIntToDouble(MacroAssembler* masm,
Register scratch2, Register scratch2,
SwVfpRegister single_scratch) { SwVfpRegister single_scratch) {
ASSERT(!int_scratch.is(scratch2)); ASSERT(!int_scratch.is(scratch2));
ASSERT(!int_scratch.is(dst1));
ASSERT(!int_scratch.is(dst2));
Label done; Label done;

View File

@ -3577,8 +3577,21 @@ void KeyedLoadStubCompiler::GenerateLoadExternalArray(
__ vstr(d0, r3, HeapNumber::kValueOffset); __ vstr(d0, r3, HeapNumber::kValueOffset);
__ Ret(); __ Ret();
} else { } else {
WriteInt32ToHeapNumberStub stub(value, r0, r3); Register dst1 = r1;
__ TailCallStub(&stub); 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) { } else if (array_type == kExternalUnsignedIntArray) {
// The test is different for unsigned int values. Since we need // The test is different for unsigned int values. Since we need