summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDisassembler
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't attach annotations to MCInst's. Instead, have the disassembler ↵Owen Anderson2011-09-152-20/+8
| | | | | | return, and the printer accept, an annotation string which can be passed through if the client cares about annotations. llvm-svn: 139876
* The the MC disassembler C API to print in verbose mode. Perhaps there ↵Owen Anderson2011-09-152-1/+31
| | | | | | should be a parameter to request verbose mode? llvm-svn: 139821
* Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= ↵James Molloy2011-09-073-4/+15
| | | | | | handling to llvm-mc. Reviewed by Owen Anderson. llvm-svn: 139237
* Fix apparent build error caused by r138948 on certain versions of GCC with ↵James Molloy2011-09-012-21/+36
| | | | | | -Werror. Sorry for the inconvenience. llvm-svn: 138973
* Fix the build for us -Werror users.Nick Lewycky2011-09-012-37/+24
| | | | | | | Remove broken emacs mode major notation marking a C++ file as C. No functionality change. llvm-svn: 138963
* Fix up r137380 based on post-commit review by Jim Grosbach.James Molloy2011-09-012-19/+32
| | | | llvm-svn: 138948
* Fix C++0x narrowing errors when char is unsigned.Jeffrey Yasskin2011-08-303-3/+3
| | | | | | | In the case of EDInstInfo, this would actually cause a bug when -1 became 255 and was then compared >=0 in llvm-mc/Disassembler.cpp. llvm-svn: 138825
* 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
* Fixed a memory bug in the MCDisassembler whereSean Callanan2011-08-191-1/+5
| | | | | | MCParsedAsmOperand objects were being leaked. llvm-svn: 138053
* Remove unused Target argument from AsmParser construction methods.Jim Grosbach2011-08-161-1/+1
| | | | | | The argument is unused, and is a layering violation in any case. llvm-svn: 137735
* I mis-interpreted the MCDisassembler's intended dependencies. Now to fixChandler Carruth2011-07-311-2/+9
| | | | | | | | | | | | | them properly. Specifically, the disassembler clearly attempts to initialiaze all TargetInfo, MCTargeDesc, AsmParser, and Disassembler sublibraries of registered targets. This makes the CMakeLists accurately reflect this intent in the code. This should fix the last of the link errors that I have gotten reports of on OS X, but if anyone continues to see link errors, continue to pester me and I'll look into it. llvm-svn: 136603
* On mac, it seems the MC disassembler is actually using the targetinfoChandler Carruth2011-07-291-0/+2
| | | | | | | | for targets that don't have an MC-ized disassembler. I'm suspicious that this shouldn't actually be happening, but hoping to fix the CMake build on macs first, and investigate why second. llvm-svn: 136508
* Fix the MCDisassembler dependencies. These were just absurdly wrong.Chandler Carruth2011-07-291-34/+7
| | | | | | | | | | | | First off, only depend on the actual MC-ized disassemblers in the targets, not all of the libraries those in turn depend on. Second off, only depend on those MC-ized disassemblers for targets we're building. This should fix builds of fewer than all targets. llvm-svn: 136455
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-291-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. llvm-svn: 136433
* Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to ↵Evan Cheng2011-07-262-8/+8
| | | | | | MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. llvm-svn: 136027
* Separate MCInstPrinter registration from AsmPrinter registration.Evan Cheng2011-07-252-2/+0
| | | | llvm-svn: 135974
* Fix last bits of MC layer issues. llvm-mc doesn't need to initialize ↵Evan Cheng2011-07-252-26/+8
| | | | | | 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-222-7/+3
| | | | | | InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. llvm-svn: 135812
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-203-29/+4
| | | | | | | 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
* Include MCRegisterInfo to eliminate a compilation warning.Evan Cheng2011-07-201-1/+2
| | | | llvm-svn: 135575
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-202-2/+2
| | | | | | | | 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-192-0/+2
| | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. llvm-svn: 135468
* Fixed a bug where the MC subtarget informationSean Callanan2011-07-191-0/+1
| | | | | | | wasn't being initialized by the enhanced disassembler, leading to assertion failures. llvm-svn: 135447
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-184-7/+26
| | | | | | | | | 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-2/+4
| | | | | | MCTargetDesc to prepare for next round of changes. llvm-svn: 135219
* Resynchronize EDInfo.h and EDEmitter.cpp.Shantonu Sen2011-07-112-11/+29
| | | | | | | | | | | | The enum names as well as order (i.e. value) had skewed, which means that consumers of the tablegen-ed table would see different values than intended. Make both files have a superset of enums, and add classification as needed for numMCOperands. Reviewed by Owen Anderson llvm-svn: 134905
* Change createAsmParser to take a MCSubtargetInfo instead of triple,Evan Cheng2011-07-091-1/+3
| | | | | | | | | 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-082-4/+7
| | | | | | | | | | - 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-062-3/+2
| | | | llvm-svn: 134525
* Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name toEvan Cheng2011-06-302-3/+5
| | | | | | | | | | 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
* switch to using a smallvector to avoid allocations for most normal size ↵Chris Lattner2011-05-221-2/+2
| | | | | | instructions. llvm-svn: 131837
* tidy some things up.Chris Lattner2011-05-221-16/+6
| | | | llvm-svn: 131836
* Give MC/MCDisassembler/Disassembler.h a header guard.Sebastian Redl2011-04-241-0/+6
| | | | llvm-svn: 130096
* Made the MC disassembler check before accessingSean Callanan2011-04-201-0/+9
| | | | | | | | MCInst operands for ARM. This allows it to be more tolerant of malformed MCInsts or incorrect instruction metadata. llvm-svn: 129840
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Adding support for printing operands symbolically to llvm's public 'C'Kevin Enderby2011-04-112-2/+3
| | | | | | | | | | | | | 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
* Fix potential buffer overflow on win32.Benjamin Kramer2011-04-091-12/+9
| | | | llvm-svn: 129214
* Redirected errors from the AsmParser to the properSean Callanan2011-04-091-0/+10
| | | | | | | | | error stream, in cases where the AsmParser is being invoked by EDDisassembler. Before, they were being sent to errs() because no error handler was installed in the SourceMgr. llvm-svn: 129177
* Fixed a bug where missing EDInstInfo would causeSean Callanan2011-04-071-0/+3
| | | | | | tokenization to crash and burn. llvm-svn: 129051
* An MCDisassembler has the option to not implementShantonu Sen2011-04-051-2/+4
| | | | | | | | | | getEDInfo(), in which case this code would dereference NULL. EDInst can already handle NULL info, so avoid the dereference and pass NULL through. Reviewed by Sean Callanan llvm-svn: 128904
* Fix the MSVC build.Francois Pichet2011-03-291-0/+4
| | | | llvm-svn: 128441
* Unbreak CMake build.Ted Kremenek2011-03-281-1/+2
| | | | llvm-svn: 128426
* Again adding a C API to the disassembler for use by such tools as Darwin'sKevin Enderby2011-03-282-0/+259
| | | | | | | | | | | otool(1), this time with the needed fix for case sensitive file systems :) . This is a work in progress as the interface for producing symbolic operands is not done. But a hacked prototype using information from the object file's relocation entiries and replacing immediate operands with MCExpr's has been shown to work with no changes to the instrucion printer. These APIs will be moved into a dynamic library at some point. llvm-svn: 128415
* Remove the files for r128308 as it is causing a buildbot failure.Kevin Enderby2011-03-262-259/+0
| | | | llvm-svn: 128309
* Adding a C API to the disassembler for use by such tools as Darwin's otool(1).Kevin Enderby2011-03-262-0/+259
| | | | | | | | | | This is a work in progress as the interface for producing symbolic operands is not done. But a hacked prototype using information from the object file's relocation entiries and replacing immediate operands with MCExpr's has been shown to work with no changes to the instrucion printer. These APIs will be moved into a dynamic library at some point. llvm-svn: 128308
* Add asm parsing support w/ testcases for strex/ldrex family of instructionsBruno Cardoso Lopes2011-03-242-1/+7
| | | | llvm-svn: 128236
* We need to pass the TargetMachine object to the InstPrinter if we are printingBill Wendling2011-03-211-1/+2
| | | | | | | | | 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
* Fixed the comparison operator for the enhancedSean Callanan2011-03-121-7/+2
| | | | | | disassembler's disassembler map. llvm-svn: 127527
* Plug some leaks in edis.Benjamin Kramer2011-02-241-0/+4
| | | | | | | - Don't leak parsed operands during tokenization. - Don't leak printed insts in llvm-mc. llvm-svn: 126381
OpenPOWER on IntegriCloud