summaryrefslogtreecommitdiff
path: root/lib/MC/MCInstPrinter.cpp
Commit message (Collapse)AuthorAge
* [MC] When MCInstPrint::printAnnotation uses a comment stream, it has to ensureQuentin Colombet2013-10-01
| | | | | | | | | | that each comment ends with a newline to match the definition in the header file. This is part of <rdar://problem/14687488>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191787 91177308-0d34-0410-b5e6-96231b3b80d8
* Pacify GCC, which worries about falling off the end of the switch.Duncan Sands2013-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187649 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed the Intel-syntax X86 disassembler to respect the (existing) option for ↵Daniel Malea2013-08-01
| | | | | | | | | | | hexadecimal immediates, to match AT&T syntax. This also brings a new option for C-vs-MASM-style hex. Patch by Richard Mitton Reviewed: http://llvm-reviews.chandlerc.com/D1243 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187614 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to unbreak the build on hosts that don't transitively pull in a ↵Benjamin Kramer2012-12-05
| | | | | | | | definition for int64_t. Also use the portable (ugly) format string macros, for MSVC compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169396 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a option to the disassembler to print immediates as hex.Kevin Enderby2012-12-05
| | | | | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169393 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | 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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Make branch heavy code for generating marked up disassembly simplerKevin Enderby2012-10-23
| | | | | | | | and easier to read by adding a couple helper functions. Suggestion by Chandler Carruth and seconded by Meador Inge! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166515 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getOpcodeName from the various target InstPrinters into the superclass ↵Benjamin Kramer2012-04-02
| | | | | | | | MCInstPrinter. All implementations used the same code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153866 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding back support for printing operands symbolically to ARM's new disassemblerKevin Enderby2011-10-04
| | | | | | | | | | | | | | | | | | | | 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) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141129 91177308-0d34-0410-b5e6-96231b3b80d8
* In the disassembler C API, be careful not to confuse the comment streamer ↵Owen Anderson2011-09-21
| | | | | | that the disassembler outputs annotations on with the streamer that the InstPrinter will print them on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140217 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attach annotations to MCInst's. Instead, have the disassembler ↵Owen Anderson2011-09-15
| | | | | | return, and the printer accept, an annotation string which can be passed through if the client cares about annotations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139876 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for stored annotations to MCInst, and provide facilities for ↵Owen Anderson2011-09-15
| | | | | | MC-based InstPrinters to print them out. Enhance the ARM and X86 InstPrinter's to do so in verbose mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139820 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't hardcode the %reg format in the streamer.Rafael Espindola2011-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132451 91177308-0d34-0410-b5e6-96231b3b80d8
* Preliminary support for ARM frame save directives emission via MI flags.Anton Korobeynikov2011-03-05
| | | | | | | This is just very first approximation how the stuff should be done (e.g. ARM-only for now). More to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127101 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new MCInstPrinter::getOpcodeName interface, when it is Chris Lattner2010-02-11
| | | | | | | | implemented, llvm-mc --show-inst now uses it to print the instruction opcode as well as the number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95929 91177308-0d34-0410-b5e6-96231b3b80d8
* No newline at end of files.Edward O'Callaghan2009-10-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83318 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new MCInstPrinter class, move the (trivial) MCDisassmbler ctor inline.Chris Lattner2009-09-14
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81745 91177308-0d34-0410-b5e6-96231b3b80d8