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

Side by Side Diff: src/arm/assembler-arm-inl.h

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 months 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
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/builtins-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 Assembler::set_target_address_at(pc_, reinterpret_cast<Address>(target)); 103 Assembler::set_target_address_at(pc_, reinterpret_cast<Address>(target));
104 } 104 }
105 105
106 106
107 Address* RelocInfo::target_reference_address() { 107 Address* RelocInfo::target_reference_address() {
108 ASSERT(rmode_ == EXTERNAL_REFERENCE); 108 ASSERT(rmode_ == EXTERNAL_REFERENCE);
109 return reinterpret_cast<Address*>(Assembler::target_address_address_at(pc_)); 109 return reinterpret_cast<Address*>(Assembler::target_address_address_at(pc_));
110 } 110 }
111 111
112 112
113 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() {
114 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
115 Address address = Memory::Address_at(pc_);
116 return Handle<JSGlobalPropertyCell>(
117 reinterpret_cast<JSGlobalPropertyCell**>(address));
118 }
119
120
121 JSGlobalPropertyCell* RelocInfo::target_cell() {
122 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
123 Address address = Memory::Address_at(pc_);
124 Object* object = HeapObject::FromAddress(
125 address - JSGlobalPropertyCell::kValueOffset);
126 return reinterpret_cast<JSGlobalPropertyCell*>(object);
127 }
128
129
130 void RelocInfo::set_target_cell(JSGlobalPropertyCell* cell) {
131 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL);
132 Address address = cell->address() + JSGlobalPropertyCell::kValueOffset;
133 Memory::Address_at(pc_) = address;
134 }
135
136
113 Address RelocInfo::call_address() { 137 Address RelocInfo::call_address() {
114 // The 2 instructions offset assumes patched debug break slot or return 138 // The 2 instructions offset assumes patched debug break slot or return
115 // sequence. 139 // sequence.
116 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || 140 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
117 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); 141 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
118 return Memory::Address_at(pc_ + 2 * Assembler::kInstrSize); 142 return Memory::Address_at(pc_ + 2 * Assembler::kInstrSize);
119 } 143 }
120 144
121 145
122 void RelocInfo::set_call_address(Address target) { 146 void RelocInfo::set_call_address(Address target) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // CPU::FlushICache(pc, sizeof(target)); 340 // CPU::FlushICache(pc, sizeof(target));
317 // However, on ARM, no instruction was actually patched by the assignment 341 // However, on ARM, no instruction was actually patched by the assignment
318 // above; the target address is not part of an instruction, it is patched in 342 // above; the target address is not part of an instruction, it is patched in
319 // the constant pool and is read via a data access; the instruction accessing 343 // the constant pool and is read via a data access; the instruction accessing
320 // this address in the constant pool remains unchanged. 344 // this address in the constant pool remains unchanged.
321 } 345 }
322 346
323 } } // namespace v8::internal 347 } } // namespace v8::internal
324 348
325 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ 349 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/builtins-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698