gallivm: Remove stub disassemblerSymbolLookupCB.
authorJose Fonseca <jfonseca@vmware.com>
Fri, 29 May 2015 13:33:18 +0000 (14:33 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Mon, 1 Jun 2015 09:43:28 +0000 (10:43 +0100)
It's incompletete -- it wasn't filling ReferenceType so it was causing
garbagge on the disassembly.  Furthermore it seems impossible to get the
jump information through this interface.

The solution for function size problem is to effectively book-keep the
machine code start and end address while JIT'ing.

src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

index 64fb044868fd7e405f8aa695c5d74c8acfbf2a9b..9a85248018c07acd9612264fa99e319807086ba9 100644 (file)
@@ -115,18 +115,6 @@ lp_debug_dump_value(LLVMValueRef value)
 }
 
 
-static const char *
-disassemblerSymbolLookupCB(void *DisInfo,
-                           uint64_t ReferenceValue,
-                           uint64_t *ReferenceType,
-                           uint64_t ReferencePC,
-                           const char **ReferenceName)
-{
-   // TODO: Maybe this can be used to guess jumps
-   return NULL;
-}
-
-
 /*
  * Disassemble a function, using the LLVM MC disassembler.
  *
@@ -149,7 +137,7 @@ disassemble(const void* func, llvm::raw_ostream & Out)
     */
 
    std::string Triple = llvm::sys::getProcessTriple();
-   LLVMDisasmContextRef D = LLVMCreateDisasm(Triple.c_str(), NULL, 0, NULL, &disassemblerSymbolLookupCB);
+   LLVMDisasmContextRef D = LLVMCreateDisasm(Triple.c_str(), NULL, 0, NULL, NULL);
    char outline[1024];
 
    if (!D) {