Projects
Essentials
lightspark
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 81
View file
build.patch
Changed
@@ -12,6 +12,41 @@ INCLUDE(FindZLIB REQUIRED) INCLUDE(FindFreetype REQUIRED) IF(NOT(ENABLE_GLES2)) +diff --git a/conf/FindLLVM.cmake b/conf/FindLLVM.cmake +index e60dd4a..0f4f950 100644 +--- a/conf/FindLLVM.cmake ++++ b/conf/FindLLVM.cmake +@@ -57,6 +57,7 @@ else (LLVM_INCLUDE_DIR) + /usr/lib/llvm-3.4/bin + /usr/lib/llvm-3.5/bin + /usr/lib/llvm-3.6/bin ++ /usr/lib/llvm-3.7/bin + ) + + find_program(LLVM_GCC_EXECUTABLE +@@ -177,10 +178,12 @@ else (LLVM_INCLUDE_DIR) + check_include_file_cxx("llvm/DataLayout.h" HAVE_DATALAYOUT_H) + check_include_file_cxx("llvm/IR/DataLayout.h" HAVE_IR_DATALAYOUT_H) + check_include_file_cxx("llvm/IR/Verifier.h" HAVE_IR_VERIFIER_H) ++ check_include_file_cxx("llvm/PassManager.h" HAVE_PASSMANAGER_H) + unset(CMAKE_REQUIRED_INCLUDES) + MESSAGE(STATUS "HAVE_DATALAYOUT_H: " ${HAVE_DATALAYOUT_H}) + MESSAGE(STATUS "HAVE_IR_DATALAYOUT_H: " ${HAVE_IR_DATALAYOUT_H}) + MESSAGE(STATUS "HAVE_IR_VERIFIER_H: " ${HAVE_IR_VERIFIER_H}) ++ MESSAGE(STATUS "HAVE_PASSMANAGER_H: " ${HAVE_PASSMANAGER_H}) + IF(HAVE_DATALAYOUT_H) + ADD_DEFINITIONS(-DHAVE_DATALAYOUT_H) + ENDIF(HAVE_DATALAYOUT_H) +@@ -190,6 +193,9 @@ else (LLVM_INCLUDE_DIR) + IF(HAVE_IR_VERIFIER_H) + ADD_DEFINITIONS(-DHAVE_IR_VERIFIER_H) + ENDIF(HAVE_IR_VERIFIER_H) ++ IF(HAVE_PASSMANAGER_H) ++ ADD_DEFINITIONS(-DHAVE_PASSMANAGER_H) ++ ENDIF(HAVE_PASSMANAGER_H) + + exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags OUTPUT_VARIABLE LLVM_COMPILE_FLAGS ) + MESSAGE(STATUS "LLVM CXX flags: " ${LLVM_COMPILE_FLAGS}) diff --git a/src/backends/decoder.cpp b/src/backends/decoder.cpp index fbdfcdb..e1d6e95 100755 --- a/src/backends/decoder.cpp @@ -115,6 +150,923 @@ #else th->FPM=new llvm::FunctionPassManager(th->module); #ifdef LLVM_35 +diff --git a/src/scripting/abc_codesynt.cpp b/src/scripting/abc_codesynt.cpp +index 2eb28fe..3034b67 100644 +--- a/src/scripting/abc_codesynt.cpp ++++ b/src/scripting/abc_codesynt.cpp +@@ -26,7 +26,11 @@ + + #include "compat.h" + #include <llvm/ExecutionEngine/ExecutionEngine.h> +-#include <llvm/PassManager.h> ++#ifdef HAVE_PASSMANAGER_H ++# include <llvm/PassManager.h> ++#else ++# include <llvm/IR/LegacyPassManager.h> ++#endif + #ifdef HAVE_IR_DATALAYOUT_H + # include <llvm/IR/Constants.h> + # include <llvm/IR/DerivedTypes.h> +@@ -819,13 +823,13 @@ inline llvm::Value* getMultiname(llvm::ExecutionEngine* ex,llvm::IRBuilder<>& Bu + stack_entry rt1=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); + + /*if(rt1.second==STACK_INT) //TODO: for them, first parameter is call_context, not ABCContext +- name = Builder.CreateCall3(ex->FindFunctionNamed("getMultiname_i"), context, rt1.first, mindx); ++ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname_i"). {context, rt1.first, mindx}); + else if(rt1.second==STACK_NUMBER) +- name = Builder.CreateCall3(ex->FindFunctionNamed("getMultiname_d"), context, rt1.first, mindx); ++ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname_d"). {context, rt1.first, mindx}); + else*/ + { + abstract_value(ex,Builder,rt1); +- name = Builder.CreateCall4(ex->FindFunctionNamed("getMultiname"), context, rt1.first, constnull, mindx); ++ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname"). {context, rt1.first, constnull, mindx}); + } + } + else if(rtdata==2) +@@ -834,7 +838,7 @@ inline llvm::Value* getMultiname(llvm::ExecutionEngine* ex,llvm::IRBuilder<>& Bu + stack_entry rt2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); + abstract_value(ex,Builder,rt1); + abstract_value(ex,Builder,rt2); +- name = Builder.CreateCall4(ex->FindFunctionNamed("getMultiname"), context, rt1.first, rt2.first, mindx); ++ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname"). {context, rt1.first, rt2.first, mindx}); + } + else + assert(false); +@@ -1866,9 +1870,12 @@ SyntheticFunction::synt_function method_info::synt_method() + llvm::Function::ArgumentListType::iterator it=llvmf->getArgumentList().begin(); + //The first and only argument to this function is the call_context* + llvm::Value* context=it; +- + //let's give access to local data storage +- value=Builder.CreateStructGEP(context,0); ++ value=Builder.CreateStructGEP( ++#ifdef LLVM_37 ++ nullptr, ++#endif ++ context, 0); + llvm::Value* locals=Builder.CreateLoad(value); + + //the stack is statically handled as much as possible to allow llvm optimizations +@@ -1876,12 +1883,24 @@ SyntheticFunction::synt_function method_info::synt_method() + vector<stack_entry> static_stack; + static_stack.reserve(body->max_stack); + //Get the pointer to the dynamic stack +- value=Builder.CreateStructGEP(context,1); ++ value=Builder.CreateStructGEP( ++#ifdef LLVM_37 ++ nullptr, ++#endif ++ context,1); + llvm::Value* dynamic_stack=Builder.CreateLoad(value); + //Get the index of the dynamic stack +- llvm::Value* dynamic_stack_index=Builder.CreateStructGEP(context,2); ++ llvm::Value* dynamic_stack_index=Builder.CreateStructGEP( ++#ifdef LLVM_37 ++ nullptr, ++#endif ++ context,2); + +- llvm::Value* exec_pos=Builder.CreateStructGEP(context,3); ++ llvm::Value* exec_pos=Builder.CreateStructGEP( ++#ifdef LLVM_37 ++ nullptr, ++#endif ++ context,3); + + /* //Allocate a fast dynamic stack based on LLVM alloca instruction + //This is used on branches +@@ -2098,7 +2117,7 @@ SyntheticFunction::synt_function method_info::synt_method() + u30 t; + code >> t; + constant = llvm::ConstantInt::get(int_type, t); +- Builder.CreateCall2(ex->FindFunctionNamed("getSuper"), context, constant); ++ Builder.CreateCall(ex->FindFunctionNamed("getSuper"). {context, constant}); + break; + } + case 0x05: +@@ -2109,7 +2128,7 @@ SyntheticFunction::synt_function method_info::synt_method() + u30 t; + code >> t; + constant = llvm::ConstantInt::get(int_type, t); +- Builder.CreateCall2(ex->FindFunctionNamed("setSuper"), context, constant); ++ Builder.CreateCall(ex->FindFunctionNamed("setSuper"). {context, constant}); + break; + } + case 0x06: +@@ -2119,7 +2138,7 @@ SyntheticFunction::synt_function method_info::synt_method() + u30 t; + code >> t; + constant = llvm::ConstantInt::get(int_type, t); +- Builder.CreateCall2(ex->FindFunctionNamed("dxns"), context, constant); ++ Builder.CreateCall(ex->FindFunctionNamed("dxns"). {context, constant}); + break; + } + case 0x07: +@@ -2128,7 +2147,7 @@ SyntheticFunction::synt_function method_info::synt_method() + LOG(LOG_TRACE, _("synt dxnslate") ); + stack_entry v=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); + abstract_value(ex,Builder,v); +- Builder.CreateCall2(ex->FindFunctionNamed("dxns"), context, v.first); ++ Builder.CreateCall(ex->FindFunctionNamed("dxns"). {context, v.first}); + break; + } + case 0x08: +@@ -2179,7 +2198,7 @@ SyntheticFunction::synt_function method_info::synt_method() + { + abstract_value(ex,Builder,v1); + abstract_value(ex,Builder,v2); +- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNLT"), v1.first, v2.first); ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNLT"). {v1.first, v2.first}); + } + + syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); +@@ -2212,7 +2231,7 @@ SyntheticFunction::synt_function method_info::synt_method() + + abstract_value(ex,Builder,v1); + abstract_value(ex,Builder,v2); +- llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNLE"), v1.first, v2.first); ++ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifNLE"). {v1.first, v2.first}); + + syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); + +@@ -2245,7 +2264,7 @@ SyntheticFunction::synt_function method_info::synt_method() + + abstract_value(ex,Builder,v1); + abstract_value(ex,Builder,v2); +- llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNGT"), v1.first, v2.first); ++ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifNGT"). {v1.first, v2.first}); + + syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); + +@@ -2278,7 +2297,7 @@ SyntheticFunction::synt_function method_info::synt_method() + + abstract_value(ex,Builder,v1); + abstract_value(ex,Builder,v2); +- llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNGE"), v1.first, v2.first);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.