Go to the documentation of this file.
13 #include "llvm/Config/config.h"
23 #ifdef HAVE_SYS_STAT_H
34 #if defined(HAVE_REGISTER_FRAME) && defined(HAVE_DEREGISTER_FRAME) && \
35 !defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__)
44 static bool Searched =
false;
45 static void((*rf)(
void *)) = 0;
57 static bool Searched =
false;
58 static void((*df)(
void *)) = 0;
63 "__deregister_frame");
72 #if defined(HAVE_UNW_ADD_DYNAMIC_FDE) || defined(__APPLE__)
74 static const char *processFDE(
const char *Entry,
bool isDeregister) {
75 const char *
P = Entry;
96 const char *
P = (
const char *)
Addr;
97 const char *End =
P +
Size;
99 P = processFDE(
P,
false);
104 const char *
P = (
const char *)
Addr;
105 const char *End =
P +
Size;
107 P = processFDE(
P,
true);
148 #if defined(__BIONIC__) && defined(__arm__)
155 #define ARM_MATH_IMPORTS(PP) \
189 PP(__aeabi_idivmod) \
193 PP(__aeabi_ldivmod) \
200 PP(__aeabi_uidivmod) \
210 #define ARM_MATH_DECL(name) extern "C" void name();
211 ARM_MATH_IMPORTS(ARM_MATH_DECL)
215 #if defined(__linux__) && defined(__GLIBC__) && \
216 (defined(__i386__) || defined(__x86_64__))
225 #if defined(__linux__) && defined(__GLIBC__)
244 #if defined(__i386__) || defined(__x86_64__)
246 if (&__morestack &&
Name ==
"__morestack")
249 #endif // __linux__ && __GLIBC__
252 #if defined(__BIONIC__) && defined(__arm__)
253 if (
Name.compare(0, 8,
"__aeabi_") == 0) {
256 #define ARM_MATH_CHECK(fn) if (Name == #fn) return (uint64_t)&fn;
257 ARM_MATH_IMPORTS(ARM_MATH_CHECK)
258 #undef ARM_MATH_CHECK
270 const char *NameStr =
Name.c_str();
275 if (NameStr[0] ==
'_')
283 bool AbortOnFailure) {
286 if (!
Addr && AbortOnFailure)
288 "' which could not be resolved!");
293 void RTDyldMemoryManager::anchor() {}
294 void MCJITMemoryManager::anchor() {}
void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override
Register the EH frames with the runtime so that c++ exceptions work.
void __deregister_frame(void *)
This is an optimization pass for GlobalISel generic memory operations.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
virtual void * getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure=true)
This method returns the address of the specified function.
the resulting code requires compare and branches when and if * p
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
static void * SearchForAddressOfSymbol(const char *symbolName)
This function will search through all previously loaded dynamic libraries for the symbol symbolName.
static void deregisterEHFramesInProcess(uint8_t *Addr, size_t Size)
Deregister EH frames in the current proces.
~RTDyldMemoryManager() override
void deregisterEHFrames() override
#define LLVM_ATTRIBUTE_WEAK
static uint64_t getSymbolAddressInProcess(const std::string &Name)
This method returns the address of the specified function or variable in the current process.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
virtual uint64_t getSymbolAddress(const std::string &Name)
Legacy symbol lookup - DEPRECATED! Please override findSymbol instead.
void __register_frame(void *)
static void registerEHFramesInProcess(uint8_t *Addr, size_t Size)
Register EH frames in the current process.