summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Revert accidental commit.Evan Cheng2011-07-131-2/+0
| | | | llvm-svn: 135059
* It's not safe to fold (fptrunc (sqrt (fpext x))) to (sqrtf x) if there is ↵Evan Cheng2011-07-131-0/+2
| | | | | | another use of sqrt. rdar://9763193 llvm-svn: 135058
* Disassembler doesn't need TargetMachine anymore.Evan Cheng2011-07-111-17/+0
| | | | llvm-svn: 134920
* - Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfoEvan Cheng2011-07-111-2/+5
| | | | | | | | | | | | and MCSubtargetInfo. - Added methods to update subtarget features (used when targets automatically detect subtarget features or switch modes). - Teach X86Subtarget to update MCSubtargetInfo features bits since the MCSubtargetInfo layer can be shared with other modules. - These fixes .code 16 / .code 32 support since mode switch is updated in MCSubtargetInfo so MC code emitter can do the right thing. llvm-svn: 134884
* Change createAsmParser to take a MCSubtargetInfo instead of triple,Evan Cheng2011-07-091-2/+6
| | | | | | | | | CPU, and feature string. Parsing some asm directives can change subtarget state (e.g. .code 16) and it must be reflected in other modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance must be shared. llvm-svn: 134795
* Eliminate asm parser's dependency on TargetMachine:Evan Cheng2011-07-081-1/+2
| | | | | | | | | | - Each target asm parser now creates its own MCSubtatgetInfo (if needed). - Changed AssemblerPredicate to take subtarget features which tablegen uses to generate asm matcher subtarget feature queries. e.g. "ModeThumb,FeatureThumb2" is translated to "(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0". llvm-svn: 134678
* createMCInstPrinter doesn't need TargetMachine anymore.Evan Cheng2011-07-063-6/+4
| | | | llvm-svn: 134525
* Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name toEvan Cheng2011-06-301-10/+2
| | | | | | | | | | be the first encoded as the first feature. It then uses the CPU name to look up features / scheduling itineray even though clients know full well the CPU name being used to query these properties. The fix is to just have the clients explictly pass the CPU name! llvm-svn: 134127
* Sink SubtargetFeature and TargetInstrItineraries (renamed ↵Evan Cheng2011-06-291-1/+1
| | | | | | MCInstrItineraries) into MC. llvm-svn: 134049
* Use the verbose asm flag instead of a new flag for decoding the LSDA.Bill Wendling2011-06-171-6/+1
| | | | llvm-svn: 133292
* Add an option that allows one to "decode" the LSDA.Bill Wendling2011-06-171-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The LSDA is a bit difficult for the non-initiated to read. Even with comments, it's not always clear what's going on. This wraps the ASM streamer in a class that retains the LSDA and then emits a human-readable description of what's going on in it. So instead of having to make sense of: Lexception1: .byte 255 .byte 155 .byte 168 .space 1 .byte 3 .byte 26 Lset0 = Ltmp7-Leh_func_begin1 .long Lset0 Lset1 = Ltmp812-Ltmp7 .long Lset1 Lset2 = Ltmp913-Leh_func_begin1 .long Lset2 .byte 3 Lset3 = Ltmp812-Leh_func_begin1 .long Lset3 Lset4 = Leh_func_end1-Ltmp812 .long Lset4 .long 0 .byte 0 .byte 1 .byte 0 .byte 2 .byte 125 .long __ZTIi@GOTPCREL+4 .long __ZTIPKc@GOTPCREL+4 you can read this instead: ## Exception Handling Table: Lexception1 ## @LPStart Encoding: omit ## @TType Encoding: indirect pcrel sdata4 ## @TType Base: 40 bytes ## @CallSite Encoding: udata4 ## @Action Table Size: 26 bytes ## Action 1: ## A throw between Ltmp7 and Ltmp812 jumps to Ltmp913 on an exception. ## For type(s): __ZTIi@GOTPCREL+4 __ZTIPKc@GOTPCREL+4 ## Action 2: ## A throw between Ltmp812 and Leh_func_end1 does not have a landing pad. llvm-svn: 133286
* Tidy up. 80-column and whitespace.Jim Grosbach2011-05-093-72/+73
| | | | llvm-svn: 131094
* Add all the plumbing needed for MC to expand cfi to the old tables inRafael Espindola2011-04-301-1/+2
| | | | | | | the final assembly. It is the same technique used when targeting assemblers that don't support .loc. llvm-svn: 130587
* Moved an access to an object past a NULL check,Sean Callanan2011-04-091-2/+2
| | | | | | making the MC disassembler tester more robust. llvm-svn: 129175
* MC: Add support for disabling "temporary label" behavior. Useful for debuggingDaniel Dunbar2011-03-281-0/+6
| | | | | | on Darwin. llvm-svn: 128430
* We need to pass the TargetMachine object to the InstPrinter if we are printingBill Wendling2011-03-213-8/+33
| | | | | | | | | the alias of an InstAlias instead of the thing being aliased. Because we need to know the features that are valid for an InstAlias. This is part of a work-in-progress. llvm-svn: 127986
* Plug some leaks in edis.Benjamin Kramer2011-02-241-5/+5
| | | | | | | - Don't leak parsed operands during tokenization. - Don't leak printed insts in llvm-mc. llvm-svn: 126381
* Fixed a bug in the enhanced disassembly tester thatSean Callanan2011-02-231-82/+86
| | | | | | caused it to only parse one line of input. llvm-svn: 126301
* Fixed llvm-mc in edis mode to use the result ofSean Callanan2011-02-221-1/+4
| | | | | | | operand.evaluate as an error code, not as the contents of the operand. llvm-svn: 126181
* Add support for the --noexecstack option.Rafael Espindola2011-01-231-1/+6
| | | | llvm-svn: 124077
* Correctly disassemble truncated asm.Rafael Espindola2011-01-061-1/+1
| | | | | | Patch by Richard Simth. llvm-svn: 122962
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-161-11/+12
| | | | | | via an out parm. llvm-svn: 121958
* MC: Make TargetAsmBackend available to the AsmStreamer.Daniel Dunbar2010-12-161-2/+6
| | | | | | - Treaty talks on the non-proliferation of MC objects broke down. llvm-svn: 121949
* Fixed version of 121434 with no new memory leaks.Rafael Espindola2010-12-101-5/+12
| | | | llvm-svn: 121471
OpenPOWER on IntegriCloud