summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/Disassembler
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up a pile of hacks in our CMake build relating to TableGen.Chandler Carruth2011-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first problem to fix is to stop creating synthetic *Table_gen targets next to all of the LLVM libraries. These had no real effect as CMake specifies that add_custom_command(OUTPUT ...) directives (what the 'tablegen(...)' stuff expands to) are implicitly added as dependencies to all the rules in that CMakeLists.txt. These synthetic rules started to cause problems as we started more and more heavily using tablegen files from *subdirectories* of the one where they were generated. Within those directories, the set of tablegen outputs was still available and so these synthetic rules added them as dependencies of those subdirectories. However, they were no longer properly associated with the custom command to generate them. Most of the time this "just worked" because something would get to the parent directory first, and run tablegen there. Once run, the files existed and the build proceeded happily. However, as more and more subdirectories have started using this, the probability of this failing to happen has increased. Recently with the MC refactorings, it became quite common for me when touching a large enough number of targets. To add insult to injury, several of the backends *tried* to fix this by adding explicit dependencies back to the parent directory's tablegen rules, but those dependencies didn't work as expected -- they weren't forming a linear chain, they were adding another thread in the race. This patch removes these synthetic rules completely, and adds a much simpler function to declare explicitly that a collection of tablegen'ed files are referenced by other libraries. From that, we can add explicit dependencies from the smaller libraries (such as every architectures Desc library) on this and correctly form a linear sequence. All of the backends are updated to use it, sometimes replacing the existing attempt at adding a dependency, sometimes adding a previously missing dependency edge. Please let me know if this causes any problems, but it fixes a rather persistent and problematic source of build flakiness on our end. llvm-svn: 136023
* Merge XXXGenRegisterDesc.inc XXXGenRegisterNames.inc XXXGenRegisterInfo.h.incEvan Cheng2011-06-271-1/+2
| | | | | | into XXXGenRegisterInfo.inc. llvm-svn: 133922
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Add support for the VIA PadLock instructions.Joerg Sonnenberger2011-04-042-1/+37
| | | | llvm-svn: 128826
* X86 table-generator and disassembler support for the AVXSean Callanan2011-03-154-42/+319
| | | | | | | | | instruction set. This code adds support for the VEX prefix and for the YMM registers accessible on AVX-enabled architectures. Instruction table support that enables AVX instructions for the disassembler is in an upcoming patch. llvm-svn: 127644
* Silence enum conversion warnings.Benjamin Kramer2011-02-271-2/+2
| | | | llvm-svn: 126578
* Fixed a bug in the X86 disassembler where a member of theSean Callanan2011-02-212-5/+5
| | | | | | | | X86 instruction decode structure was being interpreted as being in units of bits, although it is actually stored in units of bytes. llvm-svn: 126147
* Fixed a bug in the disassembler where the mandatory 0x66Sean Callanan2011-02-021-0/+1
| | | | | | | | prefix would be misinterpreted in some cases on 32-bit x86 platforms. Thanks to Olivier Meurant for identifying the bug. llvm-svn: 124709
* Null initialize a few variables flagged byTed Kremenek2011-01-231-1/+1
| | | | | | | | | | clang's -Wuninitialized-experimental warning. While these don't look like real bugs, clang's -Wuninitialized-experimental analysis is stricter than GCC's, and these fixes have the benefit of being general nice cleanups. llvm-svn: 124073
* Correctly disassemble truncated asm.Rafael Espindola2011-01-061-2/+4
| | | | | | Patch by Richard Simth. llvm-svn: 122962
* CMake: Add disabling optimization on MSVC8 and MSVC10 as workaround for some ↵NAKAMURA Takumi2010-12-291-1/+1
| | | | | | files in Target/ARM and Target/X86. llvm-svn: 122623
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120298
* Make the disassembler tables const so they end up in read-only memory.Benjamin Kramer2010-10-234-19/+16
| | | | llvm-svn: 117206
* Remove a define which is never referenced.Chandler Carruth2010-10-231-6/+0
| | | | llvm-svn: 117202
* Fixed handling of immediate operand sizes, whichSean Callanan2010-10-221-1/+1
| | | | | | | | | weren't properly reflecting the OperandSize attribute of the instruction leading to improper decoding of certain instructions with the 66H prefix. Also added a test case for this. llvm-svn: 117084
* add basic avx support to the disassembler, also teach it about ssmem/sdmemChris Lattner2010-09-291-0/+1
| | | | | | | | | | operands. With this done, we can remove the _Int suffixes from the round instructions without the disassembler blowing up. This allows the assembler to support them, implementing rdar://8456376 - llvm-mc rejects 'roundss' llvm-svn: 115019
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-131-2/+0
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake llvm-svn: 113819
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-101-0/+2
| | | | llvm-svn: 113632
* my work on adding segment registers to LEA missed the Chris Lattner2010-07-131-12/+3
| | | | | | | disassembler. Remove some code from the disassembler to compensate, unbreaking disassembly of lea's. llvm-svn: 108226
* This bug is also present in MSVC10. Requested by Elrood on IRC.Duncan Sands2010-06-051-2/+2
| | | | llvm-svn: 105527
* Eliminated the classification of control registers into %ecr_Sean Callanan2010-05-064-32/+15
| | | | | | | | | and %rcr_, leaving just %cr_ which is what people expect. Updated the disassembler to support this unified register set. Added a testcase to verify that the registers continue to be decoded correctly. llvm-svn: 103196
* Fixed a sign-extension bug in the X86 disassemblerSean Callanan2010-05-051-3/+55
| | | | | | | | that was causing PC-relative branch targets to be evaluated incorrectly. Also added support for checking operand values to the llvm-mc tester. llvm-svn: 103128
* disable optimizations in this directory for MSVC9. This avoidsChris Lattner2010-04-201-0/+7
| | | | | | an optimizer infinite loop on the file, PR6866. llvm-svn: 101854
* add a missing break back, patch by Nico Schmidt!Chris Lattner2010-04-161-0/+1
| | | | llvm-svn: 101538
* Fixed a nasty layering violation in the edis sourceSean Callanan2010-04-132-0/+11
| | | | | | | | | | | | | | | code. It used to #include the enhanced disassembly information for the targets it supported straight out of lib/Target/{X86,ARM,...} but now it uses a new interface provided by MCDisassembler, and (so far) implemented by X86 and ARM. Also removed hacky #define-controlled initialization of targets in edis. If clients only want edis to initialize a limited set of targets, they can set --enable-targets on the configure command line. llvm-svn: 101179
* Fixed a bug where the disassembler would allow an immediateSean Callanan2010-04-072-0/+4
| | | | | | | | | argument that had to be between 0 and 7 to have any value, firing an assert later in the AsmPrinter. Now, the disassembler rejects instructions with out-of-range values for that immediate. llvm-svn: 100694
* Fixes to the X86 disassembler. The disassembler will nowSean Callanan2010-04-023-136/+203
| | | | | | | return an error status in all failure cases, printing messages to debugs() only when debugging is enabled. llvm-svn: 100229
* TargetRegistry: Fix create{AsmInfo,MCDisassembler} to return non-const objects.Daniel Dunbar2010-03-201-2/+2
| | | | llvm-svn: 99097
* Try to fix a valgrind error on 32 bit platforms: use %zu instead of %llu to ↵Benjamin Kramer2010-03-181-2/+2
| | | | | | format a size_t. llvm-svn: 98819
* Fix LLVM build when the user specifies CPPFLAGS on the make command line.Jeffrey Yasskin2010-03-121-1/+1
| | | | llvm-svn: 98394
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94378
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+1
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* More fixes for Visual C++. Replaced several very smallSean Callanan2009-12-231-10/+10
| | | | | | static inline functions with macros. llvm-svn: 91973
* Removed the "inline" keyword from the disassembler decoder,Sean Callanan2009-12-221-30/+30
| | | | | | because the Visual C++ build does not build .c files as C99 llvm-svn: 91935
* Fixes to the X86 disassembler:Sean Callanan2009-12-222-5/+17
| | | | | | | | Made LEA memory operands emit only 4 MCInst operands. Made the scale operand equal 1 for instructions that have no SIB byte. llvm-svn: 91919
* Include based on the current path, since we already -I the X86 target's ↵Douglas Gregor2009-12-221-1/+1
| | | | | | path. Fixes CMake build llvm-svn: 91908
* Changed REG_* to MODRM_REG_* to avoid conflictsSean Callanan2009-12-222-17/+21
| | | | | | with symbols in AuroraUX's global namespace. llvm-svn: 91879
* Fix some may-be-uninitialized var warnings.Daniel Dunbar2009-12-221-3/+3
| | | | llvm-svn: 91878
* Fixed library dependencies between the X86 disassembler andSean Callanan2009-12-222-14/+5
| | | | | | X86 codegen that were causing circular symbol dependencies. llvm-svn: 91871
* #if 0 out X86 disassembler for now, it is breaking the build in multiple places.Daniel Dunbar2009-12-192-0/+13
| | | | llvm-svn: 91778
* rename dprintf to dbgpritnf, in order to fix build with glibc (which already ↵Nuno Lopes2009-12-191-29/+29
| | | | | | defines dprintf in stdio.h llvm-svn: 91775
* Use memset instead of bzero, its more portable.Daniel Dunbar2009-12-191-2/+2
| | | | llvm-svn: 91754
* Table-driven disassembler for the X86 architecture (16-, 32-, and 64-bit Sean Callanan2009-12-196-3/+2816
| | | | | | | | | | | | | | | | | | | | incarnations), integrated into the MC framework. The disassembler is table-driven, using a custom TableGen backend to generate hierarchical tables optimized for fast decode. The disassembler consumes MemoryObjects and produces arrays of MCInsts, adhering to the abstract base class MCDisassembler (llvm/MC/MCDisassembler.h). The disassembler is documented in detail in - lib/Target/X86/Disassembler/X86Disassembler.cpp (disassembler runtime) - utils/TableGen/DisassemblerEmitter.cpp (table emitter) You can test the disassembler by running llvm-mc -disassemble for i386 or x86_64 targets. Please let me know if you encounter any problems with it. llvm-svn: 91749
* Sketch structure for X86 disassembler.Daniel Dunbar2009-11-253-0/+51
llvm-svn: 89850
OpenPOWER on IntegriCloud