Changeset 46209 in webkit for trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h
- Timestamp:
- Jul 21, 2009, 8:24:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/assembler/AbstractMacroAssembler.h
r46202 r46209 36 36 #if ENABLE(ASSEMBLER) 37 37 38 // FIXME: keep transitioning this out into MacroAssemblerX86_64.39 #if PLATFORM(X86_64)40 #define REPTACH_OFFSET_CALL_R11 341 #endif42 43 38 namespace JSC { 44 39 … … 296 291 template<class TemplateAssemblerType> 297 292 friend class AbstractMacroAssembler; 298 friend class LinkBuffer; 293 299 294 public: 300 295 enum Flags { … … 331 326 } 332 327 328 JmpSrc m_jmp; 333 329 private: 334 JmpSrc m_jmp;335 330 Flags m_flags; 336 331 }; … … 486 481 AssemblerType m_assembler; 487 482 488 private:489 483 friend class LinkBuffer; 490 484 friend class RepatchBuffer; … … 495 489 } 496 490 497 static void linkCall(void* code, Call call, FunctionPtr function)498 {499 #if PLATFORM(X86_64)500 if (!call.isFlagSet(Call::Near)) {501 char* callLocation = reinterpret_cast<char*>(getLinkerAddress(code, call.m_jmp)) - REPTACH_OFFSET_CALL_R11;502 AssemblerType::linkPointerForCall(callLocation, function.value());503 } else504 #endif505 AssemblerType::linkCall(code, call.m_jmp, function.value());506 }507 508 491 static void linkPointer(void* code, typename AssemblerType::JmpDst label, void* value) 509 492 { … … 531 514 } 532 515 533 static void repatchCall(CodeLocationCall call, CodeLocationLabel destination)534 {535 #if PLATFORM(X86_64)536 AssemblerType::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress());537 #else538 AssemblerType::relinkCall(call.dataLocation(), destination.executableAddress());539 #endif540 }541 542 static void repatchCall(CodeLocationCall call, FunctionPtr destination)543 {544 #if PLATFORM(X86_64)545 AssemblerType::repatchPointer(call.dataLabelPtrAtOffset(-REPTACH_OFFSET_CALL_R11).dataLocation(), destination.executableAddress());546 #else547 AssemblerType::relinkCall(call.dataLocation(), destination.executableAddress());548 #endif549 }550 551 516 static void repatchNearCall(CodeLocationNearCall nearCall, CodeLocationLabel destination) 552 517 {
Note:
See TracChangeset
for help on using the changeset viewer.