summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for passing -main-file-name all the way through toEric Christopher2012-12-181-0/+6
| | | | | | | | the assembler. Part of PR14624 llvm-svn: 170390
* Prepare LLVM to fix PR14625, exposing a hook in MCContext to manage theChandler Carruth2012-12-171-1/+7
| | | | | | | | | | compilation directory. This defaults to the current working directory, just as it always has, but now an assembler can choose to override it with a custom directory. I've taught llvm-mc about this option and added a test case. llvm-svn: 170371
* Added a option to the disassembler to print immediates as hex.Kevin Enderby2012-12-051-4/+16
| | | | | | | | | | | | | | | | | | | | 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
* Sort the #include lines for tools/...Chandler Carruth2012-12-042-10/+10
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. llvm-svn: 169252
* Add a -disable-cfi option to llvm-mc. This is useful for debugging asRafael Espindola2012-11-231-1/+5
| | | | | | | | | it will expand any .cfi_* directives in the input assembly. Unfortunately this cannot replace elf-dump in tests as the asm streamer cannot relax the line advance opcodes. llvm-svn: 168522
* Add support for annotated disassembly output for X86 and arm.Kevin Enderby2012-10-221-2/+9
| | | | | | | | | | | Per the October 12, 2012 Proposal for annotated disassembly output sent out by Jim Grosbach this set of changes implements this for X86 and arm. The llvm-mc tool now has a -mdis option to produced the marked up disassembly and a couple of small example test cases have been added. rdar://11764962 llvm-svn: 166445
* When creating MCAsmBackend pass the CPU string as well. In X86AsmBackendRoman Divacky2012-09-181-2/+2
| | | | | | | | | store this and use it to not emit long nops when the CPU is geode which doesnt support them. Fixes PR11212. llvm-svn: 164132
* Allow MCCodeEmitter access to the target MCRegisterInfo.Jim Grosbach2012-05-151-2/+2
| | | | | | | | Add the MCRegisterInfo to the factories and constructors. Patch by Tom Stellard <Tom.Stellard@amd.com>. llvm-svn: 156828
* Fix it so llvm-objdump -arch does accept x86 and x86-64 as valid arch names.Kevin Enderby2012-05-081-30/+8
| | | | | | PR12731. Patch by Meador Inge! llvm-svn: 156444
* Add -disassemble support for -show-inst and -show-encode capability llvm-mc. ↵Richard Barton2012-04-163-174/+80
| | | | | | | | Also refactor so all MC paraphernalia are created once for all uses as much as possible. The test change is to account for the fact that the default disassembler behaviour has changed with regards to specifying the assembly syntax to use. llvm-svn: 154809
* Make member variables of AsmToken private. Remove unnecessary forward ↵Craig Topper2012-04-151-0/+1
| | | | | | declarations. Remove an unnecessary include. llvm-svn: 154775
* Make MCInstrInfo available to the MCInstPrinter. This will be used to remove ↵Craig Topper2012-04-022-4/+12
| | | | | | getInstructionName and the static data it contains since the same tables are already in MCInstrInfo. llvm-svn: 153860
* Have llvm-mc --version print the list of registered targets like llc does.Duncan Sands2012-03-081-0/+3
| | | | | | Patch by jey. llvm-svn: 152315
* Make MCRegisterInfo available to the the MCInstPrinter.Jim Grosbach2012-03-052-3/+10
| | | | | | | Used to allow context sensitive printing of super-register or sub-register references. llvm-svn: 152043
* Make MemoryObject accessor members const againDerek Schuff2012-02-291-3/+2
| | | | llvm-svn: 151687
* Enable streaming of bitcodeDerek Schuff2012-02-061-2/+2
| | | | | | | This CL delays reading of function bodies from initial parse until materialization, allowing overlap of compilation with bitcode download. llvm-svn: 149918
* llvm-mc pass through SourceMgr to MCContext.Jim Grosbach2012-01-261-1/+1
| | | | llvm-svn: 149091
* Remove unreachable code. (replace with llvm_unreachable to help GCC where ↵David Blaikie2012-01-171-2/+0
| | | | | | necessary) llvm-svn: 148284
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-102-2/+0
| | | | llvm-svn: 147855
* Remove the logging streamer.Rafael Espindola2012-01-101-7/+0
| | | | llvm-svn: 147820
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* The second part of support for generating dwarf for assembly source files. ThisKevin Enderby2011-12-091-0/+14
| | | | | | | | | | generates the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. The next part will be to get the clang driver to enable this when assembling a .s file. rdar://9275556 llvm-svn: 146262
* Tidy up.Jim Grosbach2011-12-051-1/+1
| | | | llvm-svn: 145870
* LLVMBuild: Add description files for the LLVM tools.Daniel Dunbar2011-11-111-0/+23
| | | | llvm-svn: 144417
* Clients are responsible for initializing the targets, remove it from the ↵Benjamin Kramer2011-11-111-1/+0
| | | | | | | | | | disassembler API. This will break users of the LLVMCreateDisasm API (not that I know of any). They have to call the LLVMInitializeAll* functions from llvm-c/Target.h themselves now. edis' C API in all its horribleness should be unaffected. llvm-svn: 144385
* First part of support for generating dwarf for assembly source files with theKevin Enderby2011-11-011-0/+6
| | | | | | | | | | | | -g flag. In this part we generate the .file for the source being assembled and the .loc's for the assembled instructions. The next part will be to generate the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. Once the next part is done test cases will be added. rdar://9275556 llvm-svn: 143509
* rename getHostTriple into getDefaultTargetTripleSebastian Pop2011-11-011-1/+1
| | | | llvm-svn: 143502
* build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar2011-10-181-12/+5
| | | | | | new all-targets pseudo-component. llvm-svn: 142401
* Add support for a new extension to the .file directive:Nick Lewycky2011-10-171-3/+4
| | | | | | | | | | .file filenumber "directory" "filename" This removes one join+split of the directory+filename in MC internals. Because bitcode files have independent fields for directory and filenames in debug info, this patch may change the .o files written by existing .bc files. llvm-svn: 142300
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-162-5/+8
| | | | | | | | note/warning/error as a string, pass it around as an enum. llvm-svn: 142107
* Don't attach annotations to MCInst's. Instead, have the disassembler ↵Owen Anderson2011-09-151-2/+2
| | | | | | return, and the printer accept, an annotation string which can be passed through if the client cares about annotations. llvm-svn: 139876
* Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= ↵James Molloy2011-09-073-7/+39
| | | | | | handling to llvm-mc. Reviewed by Owen Anderson. llvm-svn: 139237
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-242-4/+4
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* Allow the MCDisassembler to return a "soft fail" status code, indicating an ↵Owen Anderson2011-08-171-5/+16
| | | | | | | | instruction that is disassemblable, but invalid. Only used for ARM UNPREDICTABLE instructions at the moment. Patch by James Molloy. llvm-svn: 137830
* Remove unused Target argument from AsmParser construction methods.Jim Grosbach2011-08-161-2/+2
| | | | | | The argument is unused, and is a layering violation in any case. llvm-svn: 137735
* Fix llvm-mc target detection code to match llc.Evan Cheng2011-07-261-12/+33
| | | | llvm-svn: 136115
* Rename createCodeEmitter to createMCCodeEmitter; createObjectStreamer to ↵Evan Cheng2011-07-261-5/+5
| | | | | | createMCObjectStreamer. llvm-svn: 136031
* Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to ↵Evan Cheng2011-07-261-2/+2
| | | | | | MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. llvm-svn: 136027
* Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng2011-07-251-6/+6
| | | | | | createMCAsmBackend. llvm-svn: 136010
* Separate MCInstPrinter registration from AsmPrinter registration.Evan Cheng2011-07-251-5/+0
| | | | llvm-svn: 135974
* Fix last bits of MC layer issues. llvm-mc doesn't need to initialize ↵Evan Cheng2011-07-251-3/+0
| | | | | | TargetMachine's anymore. llvm-svn: 135963
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-231-2/+2
| | | | | | they belong. llvm-svn: 135833
* Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,Evan Cheng2011-07-221-5/+1
| | | | | | InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. llvm-svn: 135812
* Move the registered target printing in version strings completely out ofChandler Carruth2011-07-221-0/+4
| | | | | | | | | | | | | | | | | the Support library. Now its part of the TargetRegistry, and the three commands that care about this explicitly register this extra bit of version information. The set of commands which care was computed by intersecting those which use the Support library's version string printing and those that initialize all the registered targets in a way that produces a meaningful list. The only odd ball out is that 'clang -cc1as -version' no longer prints the registered targets. I don't think anyone is really interested in that (especially as the fact that llvm-mc does so is under a FIXME), but if someone really does want this back I'll happily apply the same patch there. llvm-svn: 135757
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-201-27/+2
| | | | | | | There is still a bit more refactoring left to do in Targets. But we are now very close to fixing all the layering issues in MC. llvm-svn: 135611
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-201-1/+18
| | | | | | | | - Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. llvm-svn: 135580
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-201-1/+8
| | | | | | | | TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! llvm-svn: 135569
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-191-1/+18
| | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-181-1/+5
| | | | | | | | | to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
* Rename createAsmInfo to createMCAsmInfo and move registration code to ↵Evan Cheng2011-07-142-3/+4
| | | | | | MCTargetDesc to prepare for next round of changes. llvm-svn: 135219
OpenPOWER on IntegriCloud