Adding instruction generation loop.

Not yet doing anything, but close.
This commit is contained in:
Ben Vanik
2013-01-21 01:11:57 -08:00
parent 25af5f410a
commit b91d550ef1
6 changed files with 145 additions and 127 deletions

View File

@@ -50,13 +50,11 @@ public:
int GenerateModule();
private:
CodegenFunction* GetCodegenFunction(uint32_t address);
void AddImports();
void AddMissingImport(
const xe_xex2_import_library_t *library,
const xe_xex2_import_info_t* info, kernel::KernelExport* kernel_export);
void AddPresentImport(
const xe_xex2_import_library_t *library,
const xe_xex2_import_info_t* info, kernel::KernelExport* kernel_export);
void AddMissingImport(sdb::FunctionSymbol* fn);
void AddPresentImport(sdb::FunctionSymbol* fn);
void PrepareFunction(sdb::FunctionSymbol* fn);
void BuildFunction(CodegenFunction* cgf);
void OptimizeFunction(llvm::Module* m, llvm::Function* fn);
@@ -71,7 +69,7 @@ private:
llvm::DIBuilder* di_builder_;
llvm::MDNode* cu_;
std::map<sdb::FunctionSymbol*, CodegenFunction*> functions_;
std::map<uint32_t, CodegenFunction*> functions_;
};

View File

@@ -108,6 +108,7 @@ public:
FunctionType type;
uint32_t flags;
kernel::KernelExport* kernel_export;
ExceptionEntrySymbol* ee;
vector<FunctionCall*> incoming_calls;