Browse Source

Use llvm.longjmp intrinsic for longjmp [Delivers #81792986]

cl-refactor
Paweł Bylica 10 years ago
parent
commit
a44a7ab4ad
  1. 3
      libevmjit/Runtime.cpp

3
libevmjit/Runtime.cpp

@ -3,6 +3,7 @@
#include <llvm/IR/GlobalVariable.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/IntrinsicInst.h>
#include <libevm/VM.h>
@ -105,7 +106,7 @@ RuntimeManager::RuntimeManager(llvm::IRBuilder<>& _builder): CompilerHelper(_bui
{
m_dataPtr = new llvm::GlobalVariable(*getModule(), Type::RuntimePtr, false, llvm::GlobalVariable::PrivateLinkage, llvm::UndefValue::get(Type::RuntimePtr), "rt");
llvm::Type* args[] = {Type::BytePtr, m_builder.getInt32Ty()};
m_longjmp = llvm::Function::Create(llvm::FunctionType::get(Type::Void, args, false), llvm::Function::ExternalLinkage, "longjmp", getModule());
m_longjmp = llvm::Intrinsic::getDeclaration(getModule(), llvm::Intrinsic::longjmp);
// Export data
auto mainFunc = getMainFunction();

Loading…
Cancel
Save