[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Emitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 27 13:07:02 PDT 2004
Changes in directory llvm/lib/ExecutionEngine/JIT:
Emitter.cpp updated: 1.40 -> 1.41
---
Log message:
This code is a real mess, but at least get the JIT *building* on platforms
(such as plan 9) without mmap. Of course it won't RUN... but that's another
step. :)
---
Diffs of the changes: (+8 -0)
Index: llvm/lib/ExecutionEngine/JIT/Emitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.40 llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.41
--- llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.40 Fri Apr 23 12:11:14 2004
+++ llvm/lib/ExecutionEngine/JIT/Emitter.cpp Thu May 27 13:03:56 2004
@@ -60,6 +60,7 @@
static const long pageSize = sysconf(_SC_PAGESIZE);
unsigned NumPages = (NumBytes+pageSize-1)/pageSize;
+/* FIXME: This should use the proper autoconf flags */
#if defined(i386) || defined(__i386__) || defined(__x86__)
/* Linux and *BSD tend to have these flags named differently. */
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
@@ -70,8 +71,10 @@
#else
std::cerr << "This architecture is not supported by the JIT!\n";
abort();
+ return 0;
#endif
+#ifdef HAVE_MMAP
int fd = -1;
#if defined(__linux__)
fd = 0;
@@ -89,6 +92,11 @@
abort();
}
return pa;
+#else
+ std::cerr << "Do not know how to allocate mem for the JIT without mmap!\n";
+ abort();
+ return 0;
+#endif
}
JITMemoryManager::JITMemoryManager() {
More information about the llvm-commits
mailing list