| OLD | NEW | 
|---|
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 343              (RelocInfo::IsDebugBreakSlot(mode) && | 343              (RelocInfo::IsDebugBreakSlot(mode) && | 
| 344               IsPatchedDebugBreakSlotSequence()))) { | 344               IsPatchedDebugBreakSlotSequence()))) { | 
| 345     visitor->VisitDebugTarget(this); | 345     visitor->VisitDebugTarget(this); | 
| 346 #endif | 346 #endif | 
| 347   } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 347   } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 
| 348     visitor->VisitRuntimeEntry(this); | 348     visitor->VisitRuntimeEntry(this); | 
| 349   } | 349   } | 
| 350 } | 350 } | 
| 351 | 351 | 
| 352 | 352 | 
|  | 353 template<typename StaticVisitor> | 
|  | 354 void RelocInfo::Visit() { | 
|  | 355   RelocInfo::Mode mode = rmode(); | 
|  | 356   if (mode == RelocInfo::EMBEDDED_OBJECT) { | 
|  | 357     StaticVisitor::VisitPointer(target_object_address()); | 
|  | 358   } else if (RelocInfo::IsCodeTarget(mode)) { | 
|  | 359     StaticVisitor::VisitCodeTarget(this); | 
|  | 360   } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 
|  | 361     StaticVisitor::VisitExternalReference(target_reference_address()); | 
|  | 362 #ifdef ENABLE_DEBUGGER_SUPPORT | 
|  | 363   } else if (Debug::has_break_points() && | 
|  | 364              ((RelocInfo::IsJSReturn(mode) && | 
|  | 365               IsPatchedReturnSequence()) || | 
|  | 366              (RelocInfo::IsDebugBreakSlot(mode) && | 
|  | 367               IsPatchedDebugBreakSlotSequence()))) { | 
|  | 368     StaticVisitor::VisitDebugTarget(this); | 
|  | 369 #endif | 
|  | 370   } else if (mode == RelocInfo::RUNTIME_ENTRY) { | 
|  | 371     StaticVisitor::VisitRuntimeEntry(this); | 
|  | 372   } | 
|  | 373 } | 
|  | 374 | 
|  | 375 | 
| 353 // ----------------------------------------------------------------------------- | 376 // ----------------------------------------------------------------------------- | 
| 354 // Implementation of Operand | 377 // Implementation of Operand | 
| 355 | 378 | 
| 356 void Operand::set_modrm(int mod, Register rm_reg) { | 379 void Operand::set_modrm(int mod, Register rm_reg) { | 
| 357   ASSERT(is_uint2(mod)); | 380   ASSERT(is_uint2(mod)); | 
| 358   buf_[0] = mod << 6 | rm_reg.low_bits(); | 381   buf_[0] = mod << 6 | rm_reg.low_bits(); | 
| 359   // Set REX.B to the high bit of rm.code(). | 382   // Set REX.B to the high bit of rm.code(). | 
| 360   rex_ |= rm_reg.high_bit(); | 383   rex_ |= rm_reg.high_bit(); | 
| 361 } | 384 } | 
| 362 | 385 | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 384   ASSERT(len_ == 1 || len_ == 2); | 407   ASSERT(len_ == 1 || len_ == 2); | 
| 385   int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 408   int32_t* p = reinterpret_cast<int32_t*>(&buf_[len_]); | 
| 386   *p = disp; | 409   *p = disp; | 
| 387   len_ += sizeof(int32_t); | 410   len_ += sizeof(int32_t); | 
| 388 } | 411 } | 
| 389 | 412 | 
| 390 | 413 | 
| 391 } }  // namespace v8::internal | 414 } }  // namespace v8::internal | 
| 392 | 415 | 
| 393 #endif  // V8_X64_ASSEMBLER_X64_INL_H_ | 416 #endif  // V8_X64_ASSEMBLER_X64_INL_H_ | 
| OLD | NEW | 
|---|