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

Side by Side Diff: src/arm/ic-arm.cc

Issue 5736008: Provide baseline for experimental GC implementation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 10 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize; 256 PropertyDetails::AttributesField::encode(READ_ONLY)) << kSmiTagSize;
257 __ ldr(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); 257 __ ldr(scratch1, FieldMemOperand(scratch2, kDetailsOffset));
258 __ tst(scratch1, Operand(kTypeAndReadOnlyMask)); 258 __ tst(scratch1, Operand(kTypeAndReadOnlyMask));
259 __ b(ne, miss); 259 __ b(ne, miss);
260 260
261 // Store the value at the masked, scaled index and return. 261 // Store the value at the masked, scaled index and return.
262 const int kValueOffset = kElementsStartOffset + kPointerSize; 262 const int kValueOffset = kElementsStartOffset + kPointerSize;
263 __ add(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag)); 263 __ add(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag));
264 __ str(value, MemOperand(scratch2)); 264 __ str(value, MemOperand(scratch2));
265 265
266 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER
266 // Update the write barrier. Make sure not to clobber the value. 267 // Update the write barrier. Make sure not to clobber the value.
267 __ mov(scratch1, value); 268 __ mov(scratch1, value);
268 __ RecordWrite(elements, scratch2, scratch1); 269 __ RecordWrite(elements, scratch2, scratch1);
270 #endif
269 } 271 }
270 272
271 273
272 static void GenerateNumberDictionaryLoad(MacroAssembler* masm, 274 static void GenerateNumberDictionaryLoad(MacroAssembler* masm,
273 Label* miss, 275 Label* miss,
274 Register elements, 276 Register elements,
275 Register key, 277 Register key,
276 Register result, 278 Register result,
277 Register t0, 279 Register t0,
278 Register t1, 280 Register t1,
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 if (map != Heap::null_value()) { 1047 if (map != Heap::null_value()) {
1046 // Patch the offset in the actual store instruction. 1048 // Patch the offset in the actual store instruction.
1047 Address str_property_instr_address = 1049 Address str_property_instr_address =
1048 ldr_map_instr_address + 3 * Assembler::kInstrSize; 1050 ldr_map_instr_address + 3 * Assembler::kInstrSize;
1049 Instr str_property_instr = Assembler::instr_at(str_property_instr_address); 1051 Instr str_property_instr = Assembler::instr_at(str_property_instr_address);
1050 ASSERT(Assembler::IsStrRegisterImmediate(str_property_instr)); 1052 ASSERT(Assembler::IsStrRegisterImmediate(str_property_instr));
1051 str_property_instr = Assembler::SetStrRegisterImmediateOffset( 1053 str_property_instr = Assembler::SetStrRegisterImmediateOffset(
1052 str_property_instr, offset - kHeapObjectTag); 1054 str_property_instr, offset - kHeapObjectTag);
1053 Assembler::instr_at_put(str_property_instr_address, str_property_instr); 1055 Assembler::instr_at_put(str_property_instr_address, str_property_instr);
1054 1056
1057 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER
1055 // Patch the offset in the add instruction that is part of the 1058 // Patch the offset in the add instruction that is part of the
1056 // write barrier. 1059 // write barrier.
1057 Address add_offset_instr_address = 1060 Address add_offset_instr_address =
1058 str_property_instr_address + Assembler::kInstrSize; 1061 str_property_instr_address + Assembler::kInstrSize;
1059 Instr add_offset_instr = Assembler::instr_at(add_offset_instr_address); 1062 Instr add_offset_instr = Assembler::instr_at(add_offset_instr_address);
1060 ASSERT(Assembler::IsAddRegisterImmediate(add_offset_instr)); 1063 ASSERT(Assembler::IsAddRegisterImmediate(add_offset_instr));
1061 add_offset_instr = Assembler::SetAddRegisterImmediateOffset( 1064 add_offset_instr = Assembler::SetAddRegisterImmediateOffset(
1062 add_offset_instr, offset - kHeapObjectTag); 1065 add_offset_instr, offset - kHeapObjectTag);
1063 Assembler::instr_at_put(add_offset_instr_address, add_offset_instr); 1066 Assembler::instr_at_put(add_offset_instr_address, add_offset_instr);
1067 #endif
1064 1068
1065 // Indicate that code has changed. 1069 // Indicate that code has changed.
1066 CPU::FlushICache(str_property_instr_address, 2 * Assembler::kInstrSize); 1070 CPU::FlushICache(str_property_instr_address, 2 * Assembler::kInstrSize);
1067 } 1071 }
1068 1072
1069 // Patch the map check. 1073 // Patch the map check.
1070 Assembler::set_target_address_at(ldr_map_instr_address, 1074 Assembler::set_target_address_at(ldr_map_instr_address,
1071 reinterpret_cast<Address>(map)); 1075 reinterpret_cast<Address>(map));
1072 1076
1073 return true; 1077 return true;
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 // Fall through to fast case. 1823 // Fall through to fast case.
1820 1824
1821 __ bind(&fast); 1825 __ bind(&fast);
1822 // Fast case, store the value to the elements backing store. 1826 // Fast case, store the value to the elements backing store.
1823 __ add(r5, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 1827 __ add(r5, elements, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
1824 __ add(r5, r5, Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize)); 1828 __ add(r5, r5, Operand(key, LSL, kPointerSizeLog2 - kSmiTagSize));
1825 __ str(value, MemOperand(r5)); 1829 __ str(value, MemOperand(r5));
1826 // Skip write barrier if the written value is a smi. 1830 // Skip write barrier if the written value is a smi.
1827 __ tst(value, Operand(kSmiTagMask)); 1831 __ tst(value, Operand(kSmiTagMask));
1828 __ Ret(eq); 1832 __ Ret(eq);
1833
1834 #ifdef ENABLE_CARDMARKING_WRITE_BARRIER
1829 // Update write barrier for the elements array address. 1835 // Update write barrier for the elements array address.
1830 __ sub(r4, r5, Operand(elements)); 1836 __ sub(r4, r5, Operand(elements));
1831 __ RecordWrite(elements, Operand(r4), r5, r6); 1837 __ RecordWrite(elements, Operand(r4), r5, r6);
1838 #endif
1832 1839
1833 __ Ret(); 1840 __ Ret();
1834 } 1841 }
1835 1842
1836 1843
1837 // Convert and store int passed in register ival to IEEE 754 single precision 1844 // Convert and store int passed in register ival to IEEE 754 single precision
1838 // floating point value at memory location (dst + 4 * wordoffset) 1845 // floating point value at memory location (dst + 4 * wordoffset)
1839 // If VFP3 is available use it for conversion. 1846 // If VFP3 is available use it for conversion.
1840 static void StoreIntAsFloat(MacroAssembler* masm, 1847 static void StoreIntAsFloat(MacroAssembler* masm,
1841 Register dst, 1848 Register dst,
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 GetStateName(previous_state), 2386 GetStateName(previous_state),
2380 GetStateName(state), 2387 GetStateName(state),
2381 Token::Name(op_)); 2388 Token::Name(op_));
2382 } 2389 }
2383 #endif 2390 #endif
2384 } 2391 }
2385 2392
2386 } } // namespace v8::internal 2393 } } // namespace v8::internal
2387 2394
2388 #endif // V8_TARGET_ARCH_ARM 2395 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698