With Kasper's suggestion this LGTM

On Mon, Oct 27, 2008 at 2:57 PM, Kasper Lund <[EMAIL PROTECTED]> wrote:
> Why don't you load it directly into r3 and change the first and to be
> and_(r1, r3, Operand(kIsNotStringMask))?
>
> On Mon, Oct 27, 2008 at 2:54 PM,  <[EMAIL PROTECTED]> wrote:
>>
>> Reviewers: Mads Ager,
>>
>> Description:
>> Fix mistake in ARM version of string length stub.
>>
>> Please review this at http://codereview.chromium.org/8193
>>
>> SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
>>
>> Affected files:
>>   M     src/ic-arm.cc
>>
>>
>> Index: src/ic-arm.cc
>> ===================================================================
>> --- src/ic-arm.cc       (revision 605)
>> +++ src/ic-arm.cc       (working copy)
>> @@ -174,12 +174,13 @@
>>    // Check that the object is a string.
>>    __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
>>    __ ldrb(r1, FieldMemOperand(r1, Map::kInstanceTypeOffset));
>> +  __ mov(r3, Operand(r1));
>>    __ and_(r1, r1, Operand(kIsNotStringMask));
>>    // The cast is to resolve the overload for the argument of 0x0.
>>    __ cmp(r1, Operand(static_cast<int32_t>(kStringTag)));
>>    __ b(ne, &miss);
>>
>> -  __ and_(r1, r1, Operand(kStringSizeMask));
>> +  __ and_(r1, r3, Operand(kStringSizeMask));
>>    __ add(r1, r1, Operand(String::kHashShift));
>>    // Load length directly from the string.
>>    __ ldr(r0, FieldMemOperand(r0, String::kLengthOffset));
>>
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to