Skip to content
  1. Mar 12, 2013
    • Kevin Enderby's avatar
      Remove the assert()'s from the LLVMCreateDisasmCPU() library API and just · f536c6af
      Kevin Enderby authored
      return 0 to indicate failure to create the disassembler.  A library routine
      should not assert and just let the caller handler the error.  For example
      darwin's otool(1) will simply print an error if it ends up using a library
      that is not configured for a target it wants:
      
      % otool -tv ViewController.o
      ViewController.o:
      (__TEXT,__text) section
      can't create arm llvm disassembler
      
      This is much better than an abort which appears as a crash to the user or
      even the assert when using a Debug+Asserts built library:
      
      Assertion failed: (MAI && "Unable to create target asm info!"), function LLVMCreateDisasmCPU, file /Volumes/SandBox/llvm/lib/MC/MCDisassembler/Disassembler.cpp, line 47.
      
      radr://12539918
      
      llvm-svn: 176880
      f536c6af
  2. Dec 19, 2012
    • Kevin Enderby's avatar
      Add to the disassembler C API an option to print the disassembled · 85cf5315
      Kevin Enderby authored
      instructions in the assembly code variant if one exists.
      
      The intended use for this is so tools like lldb and darwin's otool(1)
      can be switched to print Intel-flavored disassembly.
      
      I discussed extensively this API with Jim Grosbach and we feel
      while it may not be fully general, in reality there is only one syntax
      for each assembly with the exception of X86 which has exactly
      two for historical reasons.
      
      rdar://10989182
      
      llvm-svn: 170477
      85cf5315
  3. Dec 08, 2012
  4. Dec 05, 2012
    • Kevin Enderby's avatar
      Added a option to the disassembler to print immediates as hex. · 168ffb36
      Kevin Enderby authored
      This is for the lldb team so most of but not all of the values are
      to be printed as hex with this option.  Some small values like the
      scale in an X86 address were requested to printed in decimal
      without the leading 0x.
      
      There may be some tweaks need to places that may still be in
      decimal that they want in hex.  Specially for arm.  I made my best
      guess.  Any tweaks from here should be simple.
      
      I also did the best I know now with help from the C++ gurus
      creating the cleanest formatImm() utility function and containing
      the changes.  But if someone has a better idea to make something
      cleaner I'm all ears and game for changing the implementation.
      
      rdar://8109283
      
      llvm-svn: 169393
      168ffb36
  5. Dec 03, 2012
    • Chandler Carruth's avatar
      Use the new script to sort the includes of every file under lib. · ed0881b2
      Chandler Carruth authored
      Sooooo many of these had incorrect or strange main module includes.
      I have manually inspected all of these, and fixed the main module
      include to be the nearest plausible thing I could find. If you own or
      care about any of these source files, I encourage you to take some time
      and check that these edits were sensible. I can't have broken anything
      (I strictly added headers, and reordered them, never removed), but they
      may not be the headers you'd really like to identify as containing the
      API being implemented.
      
      Many forward declarations and missing includes were added to a header
      files to allow them to parse cleanly when included first. The main
      module rule does in fact have its merits. =]
      
      llvm-svn: 169131
      ed0881b2
  6. Nov 24, 2012
    • Benjamin Kramer's avatar
      libLTO: Add a utility method to initialize the disassemblers. · 9bcb9226
      Benjamin Kramer authored
      Necessary to give disassembler users (like darwin's otool) a possibility to
      dlopen libLTO and still initialize the required LLVM bits. This used to go
      through libMCDisassembler but that's a gross layering violation, the MC layer
      can't pull in functions from the targets. Adding a function to libLTO is a bit
      of a hack but not worse than exposing other disassembler bits from libLTO.
      
      Fixes PR14362.
      
      llvm-svn: 168545
      9bcb9226
  7. Oct 23, 2012
  8. Apr 06, 2012
    • Sean Callanan's avatar
      Fixed two leaks in the MC disassembler. The MC · e804b5b7
      Sean Callanan authored
      disassembler requires a MCSubtargetInfo and a
      MCInstrInfo to exist in order to initialize the
      instruction printer and disassembler; however,
      although the printer and disassembler keep
      references to these objects they do not own them.
      Previously, the MCSubtargetInfo and MCInstrInfo
      objects were just leaked.
      
      I have extended LLVMDisasmContext to own these
      objects and delete them when it is destroyed.
      
      llvm-svn: 154192
      e804b5b7
  9. Apr 02, 2012
  10. Mar 05, 2012
  11. Feb 29, 2012
  12. Feb 17, 2012
  13. Feb 06, 2012
    • Derek Schuff's avatar
      Enable streaming of bitcode · 8b2dcad4
      Derek Schuff authored
      This CL delays reading of function bodies from initial parse until
      materialization, allowing overlap of compilation with bitcode download.
      
      llvm-svn: 149918
      8b2dcad4
  14. Jan 20, 2012
  15. Nov 11, 2011
  16. Oct 05, 2011
    • Kevin Enderby's avatar
      Adding back support for printing operands symbolically to ARM's new disassembler · 5dcda643
      Kevin Enderby authored
      using llvm's public 'C' disassembler API now including annotations.
      
      Hooked this up to Darwin's otool(1) so it can again print things like branch
      targets for example this:
       blx _puts
      instead of this:
       blx #-36
      and includes support for annotations for branches to symbol stubs like:
       bl	0x40 @ symbol stub for: _puts
      and annotations for pc relative loads like this:
       ldr	r3, #8 @ literal pool for: Hello, world!
      Also again can print the expression encoded in the Mach-O relocation entries for
      things like this:
       movt r0, :upper16:((_foo-_bar)+1234)
      
      llvm-svn: 141129
      5dcda643
  17. Sep 21, 2011
  18. Sep 16, 2011
  19. Sep 15, 2011
  20. Sep 07, 2011
  21. Sep 02, 2011
  22. Sep 01, 2011
  23. Aug 24, 2011
  24. Jul 25, 2011
  25. Jul 22, 2011
  26. Jul 20, 2011
  27. Jul 19, 2011
  28. Jul 18, 2011
  29. Jul 15, 2011
  30. Jul 06, 2011
  31. Jun 30, 2011
  32. May 22, 2011
  33. Apr 15, 2011
  34. Apr 11, 2011
    • Kevin Enderby's avatar
      Adding support for printing operands symbolically to llvm's public 'C' · 9377a52c
      Kevin Enderby authored
      disassembler API.  Hooked this up to the ARM target so such tools as Darwin's
      otool(1) can now print things like branch targets for example this:
        blx _puts
      instead of this:
        blx #-36
      And even print the expression encoded in the Mach-O relocation entried for
      things like this:
        movt r0, :upper16:((_foo-_bar)+1234)
      
      llvm-svn: 129284
      9377a52c
  35. Apr 09, 2011
Loading