| OLD | NEW |
| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // FLAG_enable_ool_constant_pool is true. | 239 // FLAG_enable_ool_constant_pool is true. |
| 240 return FLAG_enable_ool_constant_pool; | 240 return FLAG_enable_ool_constant_pool; |
| 241 } | 241 } |
| 242 | 242 |
| 243 | 243 |
| 244 bool RelocInfo::IsInConstantPool() { | 244 bool RelocInfo::IsInConstantPool() { |
| 245 return Assembler::is_constant_pool_load(pc_); | 245 return Assembler::is_constant_pool_load(pc_); |
| 246 } | 246 } |
| 247 | 247 |
| 248 | 248 |
| 249 void RelocInfo::PatchCode(byte* instructions, int instruction_count) { | |
| 250 // Patch the code at the current address with the supplied instructions. | |
| 251 Instr* pc = reinterpret_cast<Instr*>(pc_); | |
| 252 Instr* instr = reinterpret_cast<Instr*>(instructions); | |
| 253 for (int i = 0; i < instruction_count; i++) { | |
| 254 *(pc + i) = *(instr + i); | |
| 255 } | |
| 256 | |
| 257 // Indicate that code has changed. | |
| 258 CpuFeatures::FlushICache(pc_, instruction_count * Assembler::kInstrSize); | |
| 259 } | |
| 260 | |
| 261 | |
| 262 // Patch the code at the current PC with a call to the target address. | |
| 263 // Additional guard instructions can be added if required. | |
| 264 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { | |
| 265 // Patch the code at the current address with a call to the target. | |
| 266 UNIMPLEMENTED(); | |
| 267 } | |
| 268 | |
| 269 | |
| 270 // ----------------------------------------------------------------------------- | 249 // ----------------------------------------------------------------------------- |
| 271 // Implementation of Operand and MemOperand | 250 // Implementation of Operand and MemOperand |
| 272 // See assembler-arm-inl.h for inlined constructors | 251 // See assembler-arm-inl.h for inlined constructors |
| 273 | 252 |
| 274 Operand::Operand(Handle<Object> handle) { | 253 Operand::Operand(Handle<Object> handle) { |
| 275 AllowDeferredHandleDereference using_raw_address; | 254 AllowDeferredHandleDereference using_raw_address; |
| 276 rm_ = no_reg; | 255 rm_ = no_reg; |
| 277 // Verify all Objects referred by code are NOT in new space. | 256 // Verify all Objects referred by code are NOT in new space. |
| 278 Object* obj = *handle; | 257 Object* obj = *handle; |
| 279 if (obj->IsHeapObject()) { | 258 if (obj->IsHeapObject()) { |
| (...skipping 3727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4007 assm->instr_at_put( | 3986 assm->instr_at_put( |
| 4008 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); | 3987 rinfo.pc(), Assembler::SetLdrRegisterImmediateOffset(instr, offset)); |
| 4009 } | 3988 } |
| 4010 } | 3989 } |
| 4011 } | 3990 } |
| 4012 | 3991 |
| 4013 | 3992 |
| 4014 } } // namespace v8::internal | 3993 } } // namespace v8::internal |
| 4015 | 3994 |
| 4016 #endif // V8_TARGET_ARCH_ARM | 3995 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |