Changeset 153197 in webkit for trunk/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.cpp
- Timestamp:
- Jul 24, 2013, 9:01:38 PM (12 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/MacroAssemblerARMv7.cpp
r153196 r153197 25 25 26 26 #include "config.h" 27 #include "MacroAssemblerX86Common.h" 27 28 #if ENABLE(ASSEMBLER) && CPU(ARM_THUMB2) 29 #include "MacroAssemblerARMv7.h" 30 31 #if USE(MASM_PROBE) 32 #include <wtf/StdLibExtras.h> 33 #endif 28 34 29 35 namespace JSC { … … 31 37 #if USE(MASM_PROBE) 32 38 33 void MacroAssembler X86Common::ProbeContext::dumpCPURegisters(const char* indentation)39 void MacroAssemblerARMv7::ProbeContext::dumpCPURegisters(const char* indentation) 34 40 { 35 #if CPU(X86)36 41 #define DUMP_GPREGISTER(_type, _regName) { \ 37 42 int32_t value = reinterpret_cast<int32_t>(cpu._regName); \ 38 dataLogF("%s % 4s: 0x%08x %d\n", indentation, #_regName, value, value) ; \43 dataLogF("%s %5s: 0x%08x %d\n", indentation, #_regName, value, value) ; \ 39 44 } 40 #elif CPU(X86_64)41 #define DUMP_GPREGISTER(_type, _regName) { \42 int64_t value = reinterpret_cast<int64_t>(cpu._regName); \43 dataLogF("%s %4s: 0x%016llx %lld\n", indentation, #_regName, value, value) ; \44 }45 #endif46 45 FOR_EACH_CPU_GPREGISTER(DUMP_GPREGISTER) 46 FOR_EACH_CPU_SPECIAL_REGISTER(DUMP_GPREGISTER) 47 47 #undef DUMP_GPREGISTER 48 48 … … 50 50 uint32_t* u = reinterpret_cast<uint32_t*>(&cpu._regName); \ 51 51 double* d = reinterpret_cast<double*>(&cpu._regName); \ 52 dataLogF("%s % s: 0x%08x%08x 0x%08x%08x %12g%12g\n", \53 indentation, #_regName, u[ 3], u[2], u[1], u[0], d[1], d[0]); \52 dataLogF("%s %5s: 0x %08x %08x %12g\n", \ 53 indentation, #_regName, u[1], u[0], d[0]); \ 54 54 } 55 55 FOR_EACH_CPU_FPREGISTER(DUMP_FPREGISTER) … … 57 57 } 58 58 59 void MacroAssembler X86Common::ProbeContext::dump(const char* indentation)59 void MacroAssemblerARMv7::ProbeContext::dump(const char* indentation) 60 60 { 61 61 if (!indentation) … … 75 75 } 76 76 77 78 extern "C" void ctiMasmProbeTrampoline(); 79 80 // For details on "What code is emitted for the probe?" and "What values are in 81 // the saved registers?", see comment for MacroAssemblerX86::probe() in 82 // MacroAssemblerX86_64.h. 83 84 void MacroAssemblerARMv7::probe(MacroAssemblerARMv7::ProbeFunction function, void* arg1, void* arg2) 85 { 86 push(RegisterID::sp); 87 push(RegisterID::lr); 88 push(RegisterID::ip); 89 push(RegisterID::r0); 90 // The following uses RegisterID::ip. So, they must come after we push ip above. 91 push(trustedImm32FromPtr(arg2)); 92 push(trustedImm32FromPtr(arg1)); 93 push(trustedImm32FromPtr(function)); 94 95 move(trustedImm32FromPtr(ctiMasmProbeTrampoline), RegisterID::ip); 96 m_assembler.blx(RegisterID::ip); 97 } 77 98 #endif // USE(MASM_PROBE) 78 99 79 100 } // namespace JSC 101 102 #endif // ENABLE(ASSEMBLER) 103
Note:
See TracChangeset
for help on using the changeset viewer.