Fix the alignment of loads from constant pool entries when the
[oota-llvm.git] / lib / ExecutionEngine / ExecutionEngineBindings.cpp
index 4521d9b1b28d2146711e9999f32eaecc910323ef..7c55db0af2583f5efbf066b24540b8b7fa6801eb 100644 (file)
@@ -104,7 +104,7 @@ int LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp,
                           char **OutError) {
   std::string Error;
   if (ExecutionEngine *Interp =
-      ExecutionEngine::create(unwrap(MP), false, &Error)) {
+      ExecutionEngine::create(unwrap(MP), true, &Error)) {
     *OutInterp = wrap(Interp);
     return 0;
   }
@@ -114,9 +114,11 @@ int LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp,
 
 int LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT,
                           LLVMModuleProviderRef MP,
+                          int Fast,
                           char **OutError) {
   std::string Error;
-  if (ExecutionEngine *JIT = ExecutionEngine::createJIT(unwrap(MP), &Error)) {
+  if (ExecutionEngine *JIT = ExecutionEngine::createJIT(unwrap(MP), &Error, 0,
+                                                        Fast != 0)) {
     *OutJIT = wrap(JIT);
     return 0;
   }
@@ -192,3 +194,8 @@ int LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name,
 LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE) {
   return wrap(unwrap(EE)->getTargetData());
 }
+
+void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global,
+                          void* Addr) {
+  unwrap(EE)->addGlobalMapping(unwrap<GlobalValue>(Global), Addr);
+}