OLD | NEW |
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 3661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3672 vadd(temp_double_reg, input_reg, temp_double_reg); | 3672 vadd(temp_double_reg, input_reg, temp_double_reg); |
3673 vcvt_u32_f64(temp_double_reg.low(), temp_double_reg); | 3673 vcvt_u32_f64(temp_double_reg.low(), temp_double_reg); |
3674 vmov(result_reg, temp_double_reg.low()); | 3674 vmov(result_reg, temp_double_reg.low()); |
3675 bind(&done); | 3675 bind(&done); |
3676 } | 3676 } |
3677 | 3677 |
3678 | 3678 |
3679 void MacroAssembler::LoadInstanceDescriptors(Register map, | 3679 void MacroAssembler::LoadInstanceDescriptors(Register map, |
3680 Register descriptors, | 3680 Register descriptors, |
3681 Register scratch) { | 3681 Register scratch) { |
3682 ldr(descriptors, | 3682 Register temp = descriptors; |
3683 FieldMemOperand(map, Map::kInstanceDescriptorsOrBackPointerOffset)); | 3683 ldr(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset)); |
3684 | 3684 |
3685 Label ok, fail; | 3685 Label ok, fail; |
3686 CheckMap(descriptors, | 3686 CheckMap(temp, |
3687 scratch, | 3687 scratch, |
3688 isolate()->factory()->fixed_array_map(), | 3688 isolate()->factory()->fixed_array_map(), |
3689 &fail, | 3689 &fail, |
3690 DONT_DO_SMI_CHECK); | 3690 DONT_DO_SMI_CHECK); |
| 3691 ldr(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset)); |
3691 jmp(&ok); | 3692 jmp(&ok); |
3692 bind(&fail); | 3693 bind(&fail); |
3693 mov(descriptors, Operand(FACTORY->empty_descriptor_array())); | 3694 mov(descriptors, Operand(FACTORY->empty_descriptor_array())); |
3694 bind(&ok); | 3695 bind(&ok); |
3695 } | 3696 } |
3696 | 3697 |
3697 | 3698 |
3698 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { | 3699 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { |
3699 Label next; | 3700 Label next; |
3700 // Preload a couple of values used in the loop. | 3701 // Preload a couple of values used in the loop. |
3701 Register empty_fixed_array_value = r6; | 3702 Register empty_fixed_array_value = r6; |
3702 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); | 3703 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); |
3703 Register empty_descriptor_array_value = r7; | |
3704 LoadRoot(empty_descriptor_array_value, | |
3705 Heap::kEmptyDescriptorArrayRootIndex); | |
3706 mov(r1, r0); | 3704 mov(r1, r0); |
3707 bind(&next); | 3705 bind(&next); |
3708 | 3706 |
3709 // Check that there are no elements. Register r1 contains the | 3707 // Check that there are no elements. Register r1 contains the |
3710 // current JS object we've reached through the prototype chain. | 3708 // current JS object we've reached through the prototype chain. |
3711 ldr(r2, FieldMemOperand(r1, JSObject::kElementsOffset)); | 3709 ldr(r2, FieldMemOperand(r1, JSObject::kElementsOffset)); |
3712 cmp(r2, empty_fixed_array_value); | 3710 cmp(r2, empty_fixed_array_value); |
3713 b(ne, call_runtime); | 3711 b(ne, call_runtime); |
3714 | 3712 |
3715 // Check that instance descriptors are not empty so that we can | 3713 // Check that instance descriptors are not empty so that we can |
3716 // check for an enum cache. Leave the map in r2 for the subsequent | 3714 // check for an enum cache. Leave the map in r2 for the subsequent |
3717 // prototype load. | 3715 // prototype load. |
3718 ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset)); | 3716 ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset)); |
3719 ldr(r3, FieldMemOperand(r2, Map::kInstanceDescriptorsOrBackPointerOffset)); | 3717 ldr(r3, FieldMemOperand(r2, Map::kTransitionsOrBackPointerOffset)); |
3720 | 3718 |
3721 CheckMap(r3, | 3719 CheckMap(r3, |
3722 r7, | 3720 r7, |
3723 isolate()->factory()->fixed_array_map(), | 3721 isolate()->factory()->fixed_array_map(), |
3724 call_runtime, | 3722 call_runtime, |
3725 DONT_DO_SMI_CHECK); | 3723 DONT_DO_SMI_CHECK); |
3726 | 3724 |
| 3725 LoadRoot(r7, Heap::kEmptyDescriptorArrayRootIndex); |
| 3726 ldr(r3, FieldMemOperand(r3, TransitionArray::kDescriptorsOffset)); |
| 3727 cmp(r3, r7); |
| 3728 b(eq, call_runtime); |
| 3729 |
3727 // Check that there is an enum cache in the non-empty instance | 3730 // Check that there is an enum cache in the non-empty instance |
3728 // descriptors (r3). This is the case if the next enumeration | 3731 // descriptors (r3). This is the case if the next enumeration |
3729 // index field does not contain a smi. | 3732 // index field does not contain a smi. |
3730 ldr(r3, FieldMemOperand(r3, DescriptorArray::kEnumCacheOffset)); | 3733 ldr(r3, FieldMemOperand(r3, DescriptorArray::kEnumCacheOffset)); |
3731 JumpIfSmi(r3, call_runtime); | 3734 JumpIfSmi(r3, call_runtime); |
3732 | 3735 |
3733 // For all objects but the receiver, check that the cache is empty. | 3736 // For all objects but the receiver, check that the cache is empty. |
3734 Label check_prototype; | 3737 Label check_prototype; |
3735 cmp(r1, r0); | 3738 cmp(r1, r0); |
3736 b(eq, &check_prototype); | 3739 b(eq, &check_prototype); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3805 void CodePatcher::EmitCondition(Condition cond) { | 3808 void CodePatcher::EmitCondition(Condition cond) { |
3806 Instr instr = Assembler::instr_at(masm_.pc_); | 3809 Instr instr = Assembler::instr_at(masm_.pc_); |
3807 instr = (instr & ~kCondMask) | cond; | 3810 instr = (instr & ~kCondMask) | cond; |
3808 masm_.emit(instr); | 3811 masm_.emit(instr); |
3809 } | 3812 } |
3810 | 3813 |
3811 | 3814 |
3812 } } // namespace v8::internal | 3815 } } // namespace v8::internal |
3813 | 3816 |
3814 #endif // V8_TARGET_ARCH_ARM | 3817 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |